% @LANGUAGE = "VBScript" %>
<% Response.Buffer = True %>
MarThoma Evangelistic Association
<%
Dim strconn, mySQL
Dim cn, rs, n, m
n = 0
m = 0
If Request.Cookies("marthovan") <> "9656469501" then
strconn="Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & Server.Mappath("directory/dir1.mdb")
'strconn=strconn & "USER ID=;PASSWORD=;"
mySQL="select count(MID) as cmid from sitecounter where MID = " & Month(Date) & " and cyear = " & Year(Date)
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open strconn
Set rs = cn.Execute(mySQL)
m = rs.fields("cmid")
rs.Close
Set rs = nothing
If m = 0 then
mySQL="sitecounter"
set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorType = 2
rs.LockType = 3
rs.Open mySQL, cn
rs.addnew
rs.fields("MID") = Month(Date)
rs.fields("cyear") = Year(Date)
rs.fields("ccount") = 1
rs.update
Response.Cookies("marthovan") = "9656469501"
Else
mySQL="select ccount from sitecounter where MID = " & Month(Date) & " and cyear = " & Year(Date)
Set rs = cn.Execute(mySQL)
n = rs.fields("ccount")
n = n+1
rs.Close
Set rs = nothing
mySQL="select ccount from sitecounter where MID = " & Month(Date) & " and cyear = " & Year(Date)
set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorType = 2
rs.LockType = 3
rs.Open mySQL, cn
rs.fields("ccount") = n
rs.update
Response.Cookies("marthovan") = "9656469501"
End If
rs.Close
Set rs = nothing
cn.close
Set cn = nothing
End If
%>
Mar Thoma Evangelistic Association.1888 -
<%response.write(Year(Date))%> , All Rights Reserved