<OBJECT ID="mycontent" RUNAT="Server" SCOPE="APPLICATION" PROGID="MSWC.ContentRotator"> 
</OBJECT>
<OBJECT ID="ASPContentLink" RUNAT="Server" SCOPE="Session" PROGID="MSWC.NextLink"> 
</OBJECT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_onStart()
'创建一个Application作用域的对象实例
Set Application("ADOConnection") = Server.CreateObject("ADODB.Connection")
Dim apparr(3) '声明一个数组名apparr
apparr(0) = "春"
apparr(1) = "夏"
apparr(2) = "秋"
apparr(3) = "冬"
Application("myappArr") = apparr  '将数组存储到Application数据集合中
Application("appStart_Time") = CStr(Now) '存储时间到Application数据集合appStart_Time中
Application("Visit_Count") = 0           '将0存储到到Application数据集合Visit_Count中
Application("OnLine") = 0               '将0存储到到Application数据集合OnLine中
End Sub

Sub Session_onStart() 
   Set Session("MyBrowsertype") = Server.CreateObject("MSWC.BrowserType")
    
Dim sessarr(2) '声明一个数组名sessarr 
sessarr(0) = "昨天" 
sessarr(1) = "今天" 
sessarr(2) = "明天"

Session("mysessArr") = sessarr '将数组存储到Session数据集合中
Session("sessStart_Time") = CStr(Now)  '存储时间到Session数据集合sessStart_Time中
Session("Your_IP_Address")=Request.ServerVariables("REMOTE_ADDR") 
Application.Lock 
intVisits = Application("Visit_Count") +1 
Application("Visit_Count") = intVisits 
Application("OnLine") = Application("OnLine") + 1 
Application.Unlock 

<!--MyHomepage="7-18.asp"
   RequestPage=Request.ServerVariables("SCRIPT_NAME")
     session("RequestPage")=RequestPage
     IF STRCOMP(MyHomePage,RequestPage)<>0 THEN
   Response.Redirect MyHomePage
   END IF
-->

End Sub 

Sub Session_onEnd() 
Set Session("ASPAdRotator") = Nothing
Application.Lock 
Application("OnLine") = Application("OnLine") - 1 
Set Session("MyBrowsertype") =nothing
Application.Unlock 
End Sub 



Sub Application_onEnd() 
Set Application("ADOConnection")=Nothing 
End Sub 
</SCRIPT>
