<%
Stranice = trim(request.querystring("Stranice"))
If Stranice = "" Then
Stranice = 1
else
Stranice = cint(Stranice)
End If
prikaziBroj = 0
Set Spojka = Server.CreateObject ("ADODB.Connection")
Set Zapis = Server.CreateObject ("ADODB.Recordset")
Spojka.Open mojSpoj
Zapis.PageSize = 100
Zapis.CursorLocation = adUseClient
SQL = "SELECT * FROM gbook order by ID desc"
Zapis.Open SQL, Spojka
if Zapis.EOF OR Zapis.BOF Then
response.write ""
response.write "
"
response.write "We are sorry, but there are no records in database ... "
else
brojStranica = Zapis.PageCount
if Stranice = 0 or Stranice > brojStranica Then
Zapis.AbsolutePage = brojStranica
else
Zapis.AbsolutePage = Stranice
end if
Do While Not Zapis.EOF AND prikaziBroj < 10
response.write ""
response.write ""
response.write "Date : | "
response.write "" & Zapis("DATUM") & " | "
response.write " "
response.write ""
response.write "Name & Surname : | "
response.write "" & Zapis("IME") & " | "
response.write " "
response.write ""
response.write "City : | "
response.write "" & Zapis("GRAD") & " | "
response.write " "
response.write ""
response.write "State : | "
response.write "" & Zapis("DRZAVA") & " | "
response.write " "
response.write ""
response.write "E-mail : | "
response.write "" & Zapis("EMAIL") & " | "
response.write " "
response.write ""
response.write "Message : | "
response.write "" & REPLACE(Zapis("PORUKA").Value,chr(13)," ") & " | "
response.write " "
response.write " "
response.write ""
brBroj = brBroj + 1
prikaziBroj = prikaziBroj + 1
Zapis.MoveNext
Loop
end if
response.write ""
response.write ""
' Ovaj dio se bavi dijeljem po stranicama '
response.write ""
if brojStranica > 1 And Stranice > 1 Then
response.write "Previous - "
end if
If brojStranica > 1 Then
prikaziStranice = ""
For z = 1 to brojStranica
If z = Stranice then
prikaziStranice = prikaziStranice & Stranice & " "
Else
prikaziStranice = prikaziStranice & " " & z & "" & " "
End If
Next
response.write prikaziStranice & " "
End If
response.write " "
If brojStranica > 1 And Stranice < brojStranica Then
response.write "- Next"
end if
response.write ""
Zapis.Close
Spojka.Close
set Zapis = nothing
set Spojka = nothing
response.write " | "
%>
|
Naše Kniha návštěv.
Váš EMSA
Holidays! |
|