<%@LANGUAGE="VBSCRIPT"%> <% Dim adoCon Dim strCon Dim strSQL Dim rsconfiguration ' verifica notifica email ' verify if the notify via email to the administrator is activated Dim blnEmail ' numero di messaggi per pagina ' number of messages per page Dim intRecordsPerPage ' indirizzo email amministratore ' administrator email address Dim emailamministratore Dim Uguestname ' titolo delle pagine che ospitano Uguestbook ' numero massimo di caratteri ammesso per un nuovo messaggio ' max number of characters allowed for each message Dim maxchar ' numero di pagine da visualizzare i blocco ' number of pages per block Dim PagesPerBlock ' lingua in cui visualizzare il guestbook ' language chosen Dim Uguestlanguage ' percorso virtuale del database ' virtual database path Dim strPath ' Componente email ' Email Component Dim strEmailComponent ' SMTP Mail Server Dim strSmtpServer '####################################### ' INIZIO MODIFICA ' CHANGE THESE LINES '####################################### strPath = Server.MapPath("mdb-database/guestbook.mdb") PagesPerBlock = 10 '####################################### ' FINE MODIFICA ' END OF CHANGE '####################################### 'apertura connessione al db 'open db connection Set adoCon = Server.CreateObject("ADODB.Connection") strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & strPath adoCon.Open strCon Set rsconfiguration = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT config.* FROM config;" rsconfiguration.CursorType = 3 rsconfiguration.Open strSQL, adoCon If NOT rsconfiguration.EOF Then Uguestname = rsconfiguration("guestname") emailamministratore = rsconfiguration("email_address") strEmailComponent = rsconfiguration("email_component") strSmtpServer = rsconfiguration("smtp_server") blnEmail = CBool(rsconfiguration("email_notify")) intRecordsPerPage = CInt(rsconfiguration("n_record")) maxchar = rsconfiguration("maxchar") Uguestlanguage = rsconfiguration("language") End if rsconfiguration.Close Set rsconfiguration = Nothing Select Case Uguestlanguage Case "italian" %> [an error occurred while processing this directive] <% Case "english" %> [an error occurred while processing this directive] <% 'Case Else End Select %> <% Dim rsguest Dim vpage Dim page Dim Block Dim Blocks Dim i Dim totale Dim maxpages Dim PagStart Dim PagStop Dim RemainingRecords Dim msg Block = Request.querystring("Block") page = Request.querystring("page") If Block="" Then Block=1 If page="" Then page=1 %> <% = Uguestname %>
Astrological
Compatibility

Guestbook

Thank you for visiting our pages. We would love it if you would Add to this guestbook we are keeping!


<% Set rsguest = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT message.* FROM message ORDER BY msg_id DESC;" msg = "


" & strLangErrorMessageNomessage1 & "
" rsguest.Open strSQL, adoCon, 1, 3 rsguest.PageSize = intRecordsPerPage If NOT rsguest.EOF Then rsguest.AbsolutePage = page If rsguest.EOF Then Response.Write msg Else totale = rsguest.RecordCount For u=1 to intRecordsPerPage If rsguest.EOF Then Exit For msg_name = rsguest("Name") msg_email= rsguest("Email") msg_city = rsguest("City") msg_country = rsguest("Country") msg_homepage= rsguest("Homepage") msg_icq =rsguest("Icq") message= rsguest("Message") msg_date =rsguest("Date") %>
<%=formatDateTIME( msg_date, vbLongDate )%> <% = strLangGlobAt %> <%=formatDateTIME( msg_date, vbShortTime )%>
 
<% = message %>
 
  <% = msg_name %>  <% If msg_email <>"" Then response.write"|  " & strLangFormEmail & "  " %> <% If msg_city <>"" Or msg_country <> "" Then response.write "|    "%> <% If msg_city <>"" then response.write msg_city & "  " If msg_country <>"" then response.write "" & msg_country & "  "%> <% If msg_homepage <>"" Then response.write "|  " & strLangFormHomepage & "  "%> <% If msg_icq <>"" Then response.write "|  " & strLangAltSendIcq & msg_name & "  "%>

<% rsguest.movenext Next %>

<% 'paginazione Response.Write "" Response.Write "
" maxpages = int(totale / intRecordsPerPage) If (totale mod intRecordsPerPage) <> 0 Then maxpages = maxpages + 1 End If Blocks=0 Blocks = int(maxpages / PagesPerBlock) If (maxpages mod PagesPerBlock) <> 0 Then Blocks = Blocks + 1 End If Response.Write "" & strLangGlobPage & " " & page & " " & strLangGlobOf & " " & maxpages & "" PagStop=Block*PagesPerBlock PagStart=(PagStop-PagesPerBlock)+1 i=0 If maxpages>1 Then For vpage=PagStart to PagStop i=i+1 If Block=1 Then i=0 If i=1 And Block>1 Then Response.Write "" & _ "  " End If RemainingRecords = totale-(vpage*intRecordsPerPage) If RemainingRecords > 0 Then If vpage=CInt(page) Then Response.Write"" & vpage & " " Else Response.Write "" & vpage & " " End If Else If vpage=CInt(page) Then Response.Write"" & vpage & " " Else Response.Write "" & vpage & " " End If Exit For End If If vpage=PagStop And Blocks>1 and int(Block-1)" & _ "" End If Next End If Response.Write "
" %> <% End If %>

<% rsguest.Close Set rsguest = Nothing Set strCon = Nothing Set adoCon = Nothing %>
<% =LCase(strLangSelectNewMessage) %>   <% = strLangSelectNewMessage %>
<% =LCase(strLangSelectReadMessage) %>   <% = strLangSelectReadMessage %>
<% =UCase(strLangSelectAdminSection) %>
<% If Session("admin") = False then %>
<%= request.querystring("msg") %>

<% = strLangFormUsername %>:
 
<% = strLangFormPassword %>:
 
">   
<% Else %> <% End If %>
uapplication.com