%@ Language=VBScript %>
<%Response.Buffer= true%>
<%
dim rs,cn,str
set cn=Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")
cn.Open Application("ConnectionString")
str="select CategoryName,CategoryDescription from SEBAG_CATEGORY order by CategoryDescription"
set rs=cn.Execute(str)
%>
<%
function GetVisits(rs,cn)
dim sql
sql="select count(*) from sebag_counter"
rs=cn.execute(sql)
GetVisits=rs(0)
if trim(session("sessionid"))="" then
sql="select NewID()"
set rs=cn.execute(sql)
Session("sessionid")=rs(0)
sql="insert into SEBAG_Counter(ClientIP,ReferrerURL,SessionID) values('"& _
Request.ServerVariables("REMOTE_ADDR") _
&"','"& Request.ServerVariables("HTTP_REFERRER") _
&"','"& Session("SessionID") &"')"
cn.Execute sql
end if
end function
set rs=nothing
set cn=nothing
%>