<% Dim sPath, sScriptDir, sDSN Const adOpenKeyset = 1 Const adLockPessimistic = 2 sScriptDir = Request.ServerVariables("SCRIPT_NAME") sScriptDir = StrReverse(sScriptDir) sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/")) sScriptDir = StrReverse(sScriptDir) sPath = Server.MapPath(sScriptDir) & "\" sDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/dados/mcruz3z.mdb") sSQLCatx = "SELECT * FROM home ORDER BY ordem" set RsCatx=Server.CreateObject("ADODB.Recordset") RsCatx.Open sSQLCatx, sDSN, adOpenKeySet, adLockPessimistic If Not RsCatx.Bof then RsCatx.Movefirst End if %> MARCOS CRUZ || || 2011 <% if RsCatx("imgfundo")<>"" then %> bgcolor="#000000"<% else %>bgcolor="<%= RsCatx("cor") %>"<% end if %> leftmargin="0" topmargin="0"> <% else %> bgcolor="#000000"<% else %>bgcolor="<%= RsCatx("cor") %>"<% end if %> background="../upload/<%= RsCatx("imgfundo") %>" leftmargin="0" topmargin="0"> <% end if %>
  <%= RsCatx("banner") %>  
<% if RsCatx("imagem1")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt1") %>"> <% end if %> <% if RsCatx("imagem2")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt2") %>"> <% end if %> <% if RsCatx("imagem3")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt3") %>"> <% end if %> <% if RsCatx("imagem4")<>"" then %> " target="blank">" border="0" alt="<%= RsCatx("alt4") %>"> <% end if %>   
<% ' Your username and password to access the admin uname = "admin" password = "admin" showcounter = "since" since = Date() sScriptDir = Request.ServerVariables("SCRIPT_NAME") sScriptDir = StrReverse(sScriptDir) sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/")) sScriptDir = StrReverse(sScriptDir) sPath = Server.MapPath(sScriptDir) & "\" sDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/dados/counter1.mdb") set Rs=Server.CreateObject("ADODB.Recordset") sSQL="SELECT * FROM conter" '' where path='" & sPath & "'" Rs.Open sSQL, sDSN, adOpenKeySet, adLockPessimistic If Rs.Eof Then Rs.AddNew Rs("path")= path Rs("visits")="1" Rs("since")=since Rs.update End If If Not Rs.Eof Then Rs("visits") = Rs("visits")+1 Rs("since") = Rs("since") Rs.Update Else Rs("visits") = 1 Rs("since") = date() Rs.Update End If If showcounter = "since" Then Response.Write "" & Rs("visits") & " visitantes até " & since &" " ElseIf showcounter = "no" Then Response.Write " " Else Response.Write RS("visits") End If Rs.close Set Rs = Nothing Set sSQL = Nothing %>
Powered by Ramon Campmany
<% RsCatx.close Set RsCatx = Nothing %>