
05.04.2009, 10:01
|
Прохожий
|
|
Регистрация: 13.10.2008
Сообщения: 42
Репутация: 10
|
|
Код:
<%@LANGUAGE="VBSCRIPT"CODEPAGE="1251"%>
<!--#include file="Connections/conn_aliyparus.asp" -->
<!--#include file="Connections/conn_newland.asp" -->
<%
Dim rs_tourprice
Dim rs_tourprice_numRows
Set rs_tourprice = Server.CreateObject("ADODB.Recordset")
rs_tourprice.ActiveConnection = MM_conn_aliyparus_STRING
rs_tourprice.Source = "SELECT numbertur, nametur FROM tbl_turiy ORDER BY nametur ASC"
rs_tourprice.CursorType = 0
rs_tourprice.CursorLocation = 2
rs_tourprice.LockType = 1
rs_tourprice.Open()
rs_tourprice_numRows = 0
%>
<%
Dim rs_torprice1
Dim rs_torprice1_numRows
Set rs_torprice1 = Server.CreateObject("ADODB.Recordset")
rs_torprice1.ActiveConnection = MM_conn_newland_STRING
rs_torprice1.Source = "SELECT tourID, tourName FROM tbl_tours ORDER BY tourName ASC"
rs_torprice1.CursorType = 0
rs_torprice1.CursorLocation = 2
rs_torprice1.LockType = 1
rs_torprice1.Open()
rs_torprice1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Алый парус: калькулятор путешествий</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type="text/css">
<!--
body {
background-color: #FFFF99;
}
.style3 {font-family: "Comic Sans MS"; font-weight: bold; }
.style13 {font-family: "Comic Sans MS"; font-weight: bold; color: #0000FF; font-size: 16px; }
.style14 {
font-family: "Bookman Old Style";
font-weight: bold;
font-style: italic;
color: #000099;
}
.style15 {
font-style: italic;
color: #000099;
font-family: "Bookman Old Style";
font-size: 18px;
}
.style16 {font-size: 18px}
.style17 {font-family: "Bookman Old Style"; font-weight: bold; font-style: italic; color: #000099; font-size: 18px; }
-->
</style></head>
<body>
<table width="902" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="896" height="79"><div align="center"><img src="images/логотип.jpg" width="225" height="57"></div></td>
</tr>
<tr>
<td><div align="center">
<table width="655" border="0" cellspacing="0" cellpadding="3">
<tr class="style3">
<td width="106"><span class="style13">На главную </span></td>
<td width="76"><span class="style13">О нас </span></td>
<td width="77"><span class="style13">Контакты</span></td>
<td width="191"><span class="style13">Информация о странах </span></td>
<td width="175"><span class="style13">Информация о турах </span></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td><h1 class="style14">Калькулятор путешествий </h1>
<p class="style15">Введите количество взрослых и детей для тура, стоимость которого вы хотите рассчитать.</p>
<p class="style15">Все поля являютяс обязательными (при необходимости введите 0).</p>
<%
If Request.QueryString("error") = "notnumeric" Then
Response.Write("<p>*** Ошибка! Одно или более полей не содержат информации.</p>")
End If
%>
<form action="tourprice_processor.asp" method="post" name="frm_tourprice" id="frm_tourprice">
<table width="481" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="241" class="style14 style16">Количество взрослых </td>
<td width="228"><input name="numAdults" type="text" id="numAdults"></td>
</tr>
<tr>
<td class="style17">Количество детей </td>
<td><input name="numChildren" type="text" id="numChildren"></td>
</tr>
<tr>
<td class="style17">Название тура </td>
<td><select name="tourName" id="tourName">
<%
While (NOT rs_torprice1.EOF)
%>
<option value="<%=(rs_torprice1.Fields.Item("tourID").Value)%>"><%=(rs_torprice1.Fields.Item("tourName").Value)%></option>
<%
rs_torprice1.MoveNext()
Wend
If (rs_torprice1.CursorType > 0) Then
rs_torprice1.MoveFirst
Else
rs_torprice1.Requery
End If
%>
</select></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
<p class="style14"> </p></td>
</tr>
</table>
</body>
</html>
<%
rs_tourprice.Close()
Set rs_tourprice = Nothing
%>
<%
rs_torprice1.Close()
Set rs_torprice1 = Nothing
%>
вот и код 
|