|
WEB MAIL ADRESLERİ |
||||||||||||||||||||||
|
||||||||||||||||||||||
|
EN SON EKLENENLER |
||||||||||||||||||||||
|
Half-Life 2 Türkçe yama |
||||||||||||||||||||||
|
Kelebek Script 7.2 TR |
||||||||||||||||||||||
|
Add Remove 4 Good |
||||||||||||||||||||||
| - |
| ||||||||||||||||||||||||||||||
|
<%
'declare your variables
Dim oConnection, sSQL, oRecordset
Dim iPage, iPagecount, iRecordcount
Dim iStart, ifinish, iRecord, i
'declare SQL statement that will query the database
sSQL = "SELECT * FROM tblGuestbook ORDER BY Date_Time DESC;"
'create ADO connection and recordset object
Set oConnection = Server.CreateObject("ADODB.Connection")
Set oRecordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
oConnection.Open(sConnString)
'Open the recordset object executing the SQL statement and returning the records
oRecordset.Cursorlocation=3
oRecordset.Cursortype=3
oRecordset.Open sSQL, oConnection
If Request.Querystring("NAV")="" then
iPage=1
Else
iPage=request.querystring("NAV")
End if
oRecordset.pagesize=10
iPagecount=oRecordset.pagecount
iRecordcount=oRecordset.recordcount
If Cint(iPage)>Cint(iPagecount) then iPage=iPagecount
If Cint(iPage)<=0 then iPage=1
If iRecordcount>0 then
oRecordset.absolutepage=iPage
iStart=oRecordset.absoluteposition
If Cint(iPage)=Cint(iPagecount) then
ifinish=iRecordcount
Else
ifinish=iStart+(oRecordset.pagesize-1)
End If
End If
'Check to see if there are any records with the End of File (EOF) property
If oRecordset.Eof Then
Response.write "
Sorry there are no Guestbook messages. Be the first to post!" Else Response.write " "
If iRecordcount=1 Then
Response.write "There is 1 message"
Else
Response.write "There are " & iRecordcount & " messages"
End If
If iRecordcount >0 Then
Response.write " - Messages " & iStart & " through " & ifinish & " are displayed below."
Response.write " "
End If
Response.write "" 'As there are records lets loop through the records until we come to the end For iRecord=1 to oRecordset.pagesize Response.write "
" 'move on to the next record oRecordset.movenext If oRecordset.eof Then Exit For Next End if For i=1 to oRecordset.pagecount If i=Cint(iPage) then Response.write "[Page"&i&"]" Else Response.write "[Page "&i&"]" End if Next 'We are done so lets close the connection and the recordset oRecordset.Close Set oRecordset = Nothing oConnection.Close Set oConnection = Nothing %>
Please click on the browser back button and fill in all required fields and make sure you enter a valid email. "
Else
'declare SQL statement that will query the database
sSQL = "INSERT INTO tblGuestBook(FirstName, SurName, StateCounty, Country, Message, Heard_About_Website," & _
" Email, Website, IPAddress, Date_Time) VALUES ('" & sFirstName & "','" & sSurName & "','" & sStateCounty & "'," & _
"'" & sCountry & "','" & sMessage & "','" & sHeard_About_Website & "','" & sEmail & "', '" & sWebsiteURL & "', '" & IPAddress & "', #" & NOW() & "#)"
'create ADO connection object
Set oConnection = Server.CreateObject("ADODB.Connection")
'Open the connection to the database
oConnection.Open(sConnString)
'Execute the SQL
oConnection.Execute(sSQL)
'We are done so lets close the connection
oConnection.Close
Set oConnection = Nothing
Response.write "Thank you for your message.
|