<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%=site_title%> <% Function randomPassword(Min, Max) Dim Password Dim AddConsonant Dim Letter Dim Length Dim index Dim random Const DoubleConsonants = "cdfglmnprst" Const SingleConsonants = "bcdfghjklmnprstv" Const Vowels = "aeiou" randomize() Length = int(Rnd * (Max - (Min - 1))) + Min While Len(Password) < Length random = int(Rnd * 100) If Not Password = "" And AddConsonant And random < 10 Then index = int(Rnd * Len(DoubleConsonants)) + 1 Letter = Mid(DoubleConsonants, index, 1) Password = Password & Letter & Letter AddConsonant = False ElseIf Not Password = "" And AddConsonant And random < 90 Then index = int(Rnd * Len(SingleConsonants)) + 1 Letter = Mid(SingleConsonants, index, 1) Password = Password & Letter AddConsonant = False Else index = int(Rnd * Len(Vowels)) + 1 Letter = Mid(Vowels, index, 1) Password = Password & Letter AddConsonant = True End If Wend If Len(Password) > Max Then Password = Left(Password, Max) randomPassword = Password End Function 'Then call it with something like Function getRandomnum() Randomize dim randomVar1, randomVar2, randomVar3 randomVar1 = (Rnd() * 1000000) randomVar2 = Sqr(randomVar1) randomVar3 = Round(1000000 * (randomVar1 * randomVar2)) getRandomnum = (randomVar3) End Function numb=getRandomnum() function getWorkingDays(d1, d2) if not (isdate(d1) and isdate(d2)) then response.write "At least one date is invalid." exit function else d1 = cdate(d1): d2 = cdate(d2) if d1 > d2 then response.write "Invalid date range." exit function end if end if ' figure out how many actual days getWorkingDays = datediff("d", d1, d2) + 1 - subtract ' subtract the in-between weekends 'getWorkingDays = absdays '- cint(2 * (absdays \ 7)) ' in case both are in the same weekend 'if getWorkingDays < 0 then getWorkingDays = 0 end function d1=request("d1") d2=request("d2") cumulative_total=0 rw getWorkingDays(d1, d2) sub rw(s) a = s-1 'response.Write(d1) & "
" & a & "
" Resultdate=d1 for i=1 to a Resultdate= DateSerial(Year(Resultdate), Month(Resultdate), Day(Resultdate)+1) 'response.Write(resultdate) & "
" next b=request("price") price=b*a %>
booking now
 
booking : select ACCOMMODATION type and capacity
 
 
<%end sub %>
<%'response.End()%>
<% cumulative_total = cumulative_total+request(rs_type("roomtype_id")&"_pr") rs_roominfo.MoveNext wend end if rs_type.MoveNext wend ' ' room_id=request("room_id") ' set rs_roominfo=server.CreateObject("adodb.recordset") ' sql_roominfo="select * from h_room where room_id=" &room_id ' rs_roominfo.open sql_roominfo,conn,1,3 ' response.Write rs_roominfo("room_no") %>
Accommodation Type Capacity Gross Total
<% set rs_tax=server.CreateObject("adodb.recordset") sql_tax="select * from site_configration" rs_tax.open sql_tax,conn,1,3 tax=rs_tax("tax") set rs_type=server.CreateObject("adodb.recordset") sql_type="select distinct roomtype_id,type_name from h_roomtype" rs_type.open sql_type,conn,1,3 'response.Write rs_type("type_name") while not rs_type.eof rooms_requested = request("requested_"&rs_type("roomtype_id")) if rooms_requested>0 then %>_requested" value="<%=rooms_requested%>"> <% set rs_roominfo=server.CreateObject("adodb.recordset") sql_roominfo="Select t.hotels_id,t.roomtype_id,t.capacity,t.room_no,t.room_id from h_room t where t.hotels_id="&request("id")&" and t.capacity="&request("capacity")&" and not exists (SELECT DISTINCT b.room_id FROM h_bookinfo a,h_room_booked b WHERE a.bookinfo_id=val(b.bookinfo_id) and hotels_id="&request("id")&" and b.room_id=t.room_id and ((manual_booking=true or status=true) or (manual_booking=true and status=true)) and ((#" & request("startdate") & "# Between checkin_date And checkout_date Or checkin_date between #" & request("startdate") & "# and #" & DateAdd("d",-1,request("closingdate")) & "#) Or (#" & DateAdd("d",-1,request("closingdate")) & "# Between checkin_date And checkout_date Or checkout_date between #" & request("startdate") & "# and #" & DateAdd("d",-1,request("closingdate")) & "#) )) and t.roomtype_id="&rs_type("roomtype_id")&"" rs_roominfo.open sql_roominfo,conn,1,3 while not rs_roominfo.eof and rooms_requested>0 rooms_requested = rooms_requested-1 %>
<%response.Write rs_roominfo("room_no") %> _requested[<%=rooms_requested%>]" value="<%=rs_roominfo("room_id")%>"> <%response.Write rs_type("type_name") %> <%response.Write rs_roominfo("capacity") %>
<%=d_currency%><%=FormatNumber(Round(request(rs_type("roomtype_id")&"_pr"),2),2)%>
<% type_id="46"'rs_roominfo("roomtype_id") set rs_typeinfo=server.CreateObject("adodb.recordset") sql_typeinfo="select * from h_roomtype where roomtype_id=" &type_id rs_typeinfo.open sql_typeinfo,conn,1,3 price=request("per_n_price") 'response.Write rs_typeinfo("price") %>
Check in date Check out date Total night(s) Cumulative Total
<%=request("d1")%> <%=request("d2")%> <%=a%>
<%=d_currency%><%=FormatNumber(Round(cumulative_total,2),2)%>
<% 'set rs_tax=server.CreateObject("adodb.recordset") 'sql_tax="select * from site_configration" 'rs_tax.open sql_tax,conn,1,3 tax=rs_tax("tax") tax_total=(cumulative_total*tax)/100 grand_total=cumulative_total+tax_total %>Paypal expenses ( <%=tax%>% )  
<%=d_currency%> <%=FormatNumber(Round(tax_total,2),2)%>
Grand Total
 
<%=d_currency%><%=FormatNumber(Round(grand_total,2),2)%>
   
Full Name:    
Address:    
Zip Code:    
City:    
Country:    
Phone Number:    
Arrival Time:  
Fax Number:    
E-mail:    
Check in Date:   " readonly="true">  
Check out Date:   ">  
Payment Type: <% payment_gateway="" set rs67=server.CreateObject("adodb.recordset") sql67="select * from payment_gateway where status1=true" rs67.open sql67,conn,1,3 while not rs67.eof 'payment_gateway = ""&payment_gateway payment_gateway = ""&rs67("gateway_name")&"
"&payment_gateway rs67.movenext wend %> <%=payment_gateway%>
 
Please enter any additional requests below  
   
 
     "> "> "> "> ">