'================================================
' Function: Check if the component is installed
' parameter: strclassstring----Component Name
' Return value: True----already installed
' False----not installed
'================================================
Function isobjinstalled (ByVal strclassstring)
Dim xtestobj,clsstring
On Error Resume Next
isobjinstalled = False
clsstring = strclassstring
ERR = 0
Set xtestobj = Server.CreateObject (clsstring)
If Err = 0 Then isobjinstalled = True
If ERR = -2147352567 Then isobjinstalled = True
Set xtestobj = Nothing
ERR = 0
Exit Function
End Function
Public Sub Getusertodayinfo ()
Dim Lastlogin,userdayinfo
Lastlogin = Request.Cookies ("newasp_net") ("Lasttime")
Userdayinfo = Request.Cookies ("newasp_net") ("Usertoday")
If not IsDate (lastlogin) Then lastlogin = Now ()
On Error Resume Next
If DateDiff ("D", Lastlogin,now ()) <>0 Then
Newasp.execute ("UPDATE [Nc_user] SET usertoday= ' 0,0,0,0,0,0 ', lasttime=" & nowstring & "WHERE username= '" & Newasp.membername & "' and Userid=" & Newasp.memberid)
Userdayinfo = "0,0,0,0,0,0"
Response.Cookies ("Newasp_net") ("usertoday") = Userdayinfo
Response.Cookies ("Newasp_net") ("lasttime") = Now ()
End If
Usertoday = Split (Userdayinfo, ",")
If Ubound (usertoday) <> 5 Then
Newasp.execute ("UPDATE [Nc_user] SET usertoday= ' 0,0,0,0,0,0 ', lasttime=" & nowstring & "WHERE username= '" & Newasp.membername & "' and Userid=" & Newasp.memberid)
Userdayinfo = "0,0,0,0,0,0"
Response.Cookies ("Newasp_net") ("usertoday") = Userdayinfo
Response.Cookies ("Newasp_net") ("lasttime") = Now ()
Usertoday = Split (Userdayinfo, ",")
End If
End Sub