Dim MyCheck 'As Boolean
Dim intDay,intMonth,intYear 'As Integer
Dim dtmDate, dtmTempDate 'As datetime
dtmDate = now()
If strTimeOffSet = "+" Then
dtmTempDate = DateAdd('h', + intTimeOffSet, dtmDate) '<-- om jag ändrar här får jag fel mess
Kompileringsfel i Microsoft VBScript fel '800a03ea'
Syntaxfel
/idp/forum/default.asp, rad 792
dtmTempDate = DateAdd('h', + intTimeOffSet, dtmDate)
------------------------^
likadant på andra stället sedan så finns det bara fyra ställen med h i scriptet
ElseIf strTimeOffSet = "-" Then
dtmTempDate = DateAdd('h', - intTimeOffSet, dtmDate)
End If
'Seprate the date into differnet strings
intDay = CInt(Day(dtmTempDate))
intMonth = CInt(Month(dtmTempDate))
intYear = CInt(Year(dtmTempDate))
MyCheck = False
rsCommon.Open strSQL, adoCon
strSQL = "SELECT tblAuthor.Username, tblAuthor.Author_ID, tblAuthor.Group_ID, tblAuthor.Last_visit "
strSQL = strSQL & ",DateAdd('h', " & strTimeOffSet & intTimeOffSet & ", tblAuthor.Last_visit) AS 5 "
strSQL = strSQL & "FROM tblAuthor "
strSQL = strSQL & "where day(DateAdd('h', " & strTimeOffSet & intTimeOffSet & ", tblAuthor.Last_visit)) = " & intDay & " and month(DateAdd(hh, " & strTimeOffSet & intTimeOffSet & ", tblAuthor.Last_visit)) = " & intMonth & " and year(DateAdd(h, " & strTimeOffSet & intTimeOffSet & ", tblAuthor.Last_visit)) = " & intYear & " "
strSQL = strSQL & "ORDER BY 5 DESC;"
Response.Write "<b>There have been " & rsCommon.RecordCount & " members that have logged in today.</b><br><br>"
Response.Write "Members that have logged in: "
Do Until rsCommon.eof
If MyCheck = True then
Response.Write ", "
Else
MyCheck = True
End If
Response.Write "<a class=""smlink"" href=""JavaScript:openWin('pop_up_profile.asp?PF=" & rsCommon("Author_ID") & "','profile','toolbar=0,location=0,status=0,menubar=0,scroll bars=1,resizable=1,width=590,height=425')"">"
Response.Write rsCommon("Username")
Response.Write "</a>"
rsCommon.MoveNext
Loop