<%@ Language=VBScript Codepage=1255 %> <% Dim flag set conn=server.CreateObject("adodb.connection") Conn.open "dsn=friendly" set rs=server.CreateObject("adodb.recordset") rs.ActiveConnection=conn set rs2=server.CreateObject("adodb.recordset") rs2.ActiveConnection=conn %> Friendly Tours Eilat, The Best way to book your Hotel,Vacation in Eilat Friendly Tours

Eilat Friendly Tours

Are On line 24 hours a day! Communicate to our friendly experts one on one. Ask anything about Hotels, Attractions, Tours, Diving or anything else to help you plan your vacation here in Eilat from the comfort of your own home.

         
Attractions,Diving and Excursions in Eilat
Recommendations

<% if request("mode")="sent" then %> <% end if %>
Your message was sent successfuly
MESSAGES
[Add Your Message +]
<% ' BEGIN RUNTIME CODE ' Declare our vars Dim iPageSize 'How big our pages are Dim iPageCount 'The number of pages we get back Dim iPageCurrent 'The page we want to show Dim strOrderBy 'A fake parameter used to illustrate passing them Dim strSQL 'SQL command to execute Dim objPagingConn 'The ADODB connection object Dim objPagingRS 'The ADODB recordset object Dim iRecordsShown 'Loop controller for displaying just iPageSize records Dim I 'Standard looping var ' Get parameters iPageSize = 5 ' You could easily allow users to change this ' Retrieve page to show or default to 1 If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If If Request.QueryString("order") = "" Then strOrderBy = "dates desc" Else strOrderBy = Request.QueryString("order") End If strSQL = "SELECT * FROM gbook where hide=1 ORDER BY " & strOrderBy & ";" rs.PageSize = iPageSize rs.CacheSize = iPageSize rs.Open strSQL,,3,1 ' Get the count of the pages using the given page size iPageCount = rs.PageCount ' If the request page falls outside the acceptable range, ' give them the closest match (1 or max) If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 ' Start output with a page x of n line %> <% 'Check page count to prevent bombing when zero results are returned! If iPageCount = 0 Then %>
No messages found. Be the first to write a message!
<% Else %> <% ' Move to the selected page rs.AbsolutePage = iPageCurrent iRecordsShown = 0 Do While iRecordsShown < iPageSize And Not rs.EOF %>
  Page No <%= iPageCurrent %> of <%= iPageCount %>
<%=rs("dates")%>
SENDER:  <%=rs("name")%>
<%=rs("content")%>

<% ' Increment the number of records we've shown iRecordsShown = iRecordsShown + 1 ' Can't forget to move to the next record! rs.MoveNext Loop 'End If ' Close DB objects and free variables rs.Close Set rs = Nothing ' Show "previous" and "next" page links which pass the page to view ' and any parameters needed to rebuild the query. You could just as ' easily use a form but you'll need to change the lines that read ' the info back in at the top of the script. If iPageCurrent > 1 Then %> Back <% End If ' You can also show page numbers: For I = 1 To iPageCount If I = iPageCurrent Then %> <%= I %> <% Else %> <%= I %> <% End If Next 'I If iPageCurrent < iPageCount Then %> Next <% End If ' END RUNTIME CODE %>
 
<%end if%>