% @LANGUAGE = VBScript%> <% REM This program records and displays the values of hit counter of a REM site. It also stores the IP ADDRESS of the client with date and REM time in a log table. REM The good feature is that it does not increment the counter upon REM repeated refresh request from the browser. It does so only when REM the either the DATE or IP ADDRESS changes. REM JUST CHANGE THE VALUE OF THE COMPANY NAME BEFORE INSTALLATION. REM REM Author : Sujoy Dutta Option Explicit Response.Expires=0 REM Indian Style Date Time set Session.LCID=4105 Session.LCID=4105 %> <% Dim objConn, objRS, strQ, strOut, strC, current_ipaddress, current_date Dim old_ipaddress, previous_date, m_countervalue, company_name current_ipaddress = Request.Servervariables("REMOTE_ADDR") current_date = date company_name="saibabaofshirdi" %> <% strC = "DSN=COUNTER;DATABASE=;UID=;PWD=;" Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open strC Set objRS = Server.CreateObject("ADODB.Recordset") objRS.CursorLocation = adUseClient objRS.CursorType = adOpenStatic objRS.LockType = adLockOptimistic strQ = " SELECT COUNTERVALUE, IPADDRESS, DATE FROM COUNTER " strQ = strQ & " WHERE COMPANY='"&company_name&"' " objRS.Open strQ, objConn, , , adCmdText m_countervalue = objRS("COUNTERVALUE") old_ipaddress = objrs("IPADDRESS") previous_date = objRS("DATE") IF (current_ipaddress = old_ipaddress) AND (current_date = previous_date) THEN m_countervalue = objRS("COUNTERVALUE") ELSE m_countervalue = m_countervalue+1 objRS("IPADDRESS") = current_ipaddress objRS("DATE") = current_date objRS("COUNTERVALUE") = m_countervalue objRS.Update Set objRS.ActiveConnection = Nothing objConn.Close Set objConn = Nothing Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open strC Set objRS = Server.CreateObject("ADODB.Recordset") objRS.CursorLocation = adUseClient objRS.CursorType = adOpenStatic objRS.LockType = adLockOptimistic objRS.Open "select * from iplog where 1=2", objConn, , , adCmdText objRS.Addnew objRS("COMPANY") = company_name objRS("IPADDRESS") = current_ipaddress objRS.Update END IF Set objRS.ActiveConnection = Nothing objConn.Close Set objConn = Nothing %>
'Shri Sai Satcharitra'
Therefore, 'Shri Sai Satcharitra' should be utilized by all Sai devotees in the following manner:
|