<% =PageTitle() %>
<%
intStartTimer = Timer()
if blnGenerateRSS = true then
response.write "" & vbNewLine
end if
'// Log out user
If request.querystring("get")="out" then
if session("userID") <> 0 then
strSQL = "UPDATE aspbb_activeusers SET alastrequest= {0} WHERE amid= {1}"
objDAL.Execute strSQL, Array(cTimeStamp(DateAdd("N",-11,Now())), session("userID"))
session.Abandon()
response.cookies("forum")("userID") = ""
response.Cookies("forum").Expires = now()
elseif cint(request.cookies("forum")("userID")) <> 0 then
strSQL = "UPDATE aspbb_activeusers SET alastrequest= {0} WHERE amid= {1}"
objDAL.Execute strSQL, Array(cTimeStamp(DateAdd("N",-11,Now())), request.cookies("forum")("userID"))
response.cookies("forum")("userID") = ""
response.Cookies("forum").Expires = now()
session.Abandon()
end if
'// Turn clock backwards to logout user ;)
response.redirect("default.asp")
End if
'//Set up popup window for new message
strNewMail = "hidden"
intPmCount = 0
if request.querystring("get")="in" then
muser = request.form("muser")
mpass = sha256(Request.Form("mpass"))
objDAL.Open arrTempLoggon, "Select mid, mpass, mautologgon, mlastlogin from aspbb_members where muser = {0} and mpass = {1}", Array(muser, mpass)
if not EOF(arrTempLoggon) then
if Clng(arrTempLoggon(2, 0)) = 1 then
response.cookies("forum")("userID") = arrTempLoggon(0, 0)
response.cookies("forum")("userPass") = arrTempLoggon(1, 0)
Response.Cookies("forum").Expires = Dateadd("yyyy",1,now())
end if
Session.timeout = 90
Session("userId") = arrTempLoggon(0, 0)
Session("userPass") = arrTempLoggon(1, 0)
else
Dim strRedUrl
strRedUrl = Request.QueryString("URL")
If right(strRedUrl,1) = "?" then
Response.Redirect(strRedUrl & "login=fail")
Else
Response.Redirect(strRedUrl & "&login=fail")
End if
End if
'// Delete entry for our guest in activeusers since we have logged in
strSQL = "UPDATE aspbb_activeusers SET alastrequest= {0} WHERE amid= {1}"
objDAL.Execute strSQL, Array(cTimeStamp(DateAdd("N",-11,Now())), Clng(Session.SessionID))
'//For listing new topics
Session("lastvisit") = arrTempLoggon(3, 0)
objDAL.Execute "UPDATE aspbb_members SET mlastlogin={0} WHERE mid={1}", array(cTimeStamp(now()),arrTempLoggon(0, 0))
'Response.Cookies("forum")("lastvisit") = cTimeStamp(now())
objDAL.Disconnect
Response.Redirect(Replace(Request.QueryString("URL"), "%26", "&"))
end if
if session("userID") <> 0 or request.cookies("forum")("userID") <> "" then
if session("userId") <> 0 then
strSQL = "select mid, mstyle, muser, mlanguage, mpass, mimgsigns from aspbb_members where mid = {0} and mpass = {1}"
objDAL.Open arrTempsave, strSQL, Array(Session("userID"), Session("userPass"))
else
strSQL = "select mid, mstyle, muser, mlanguage, mpass, mimgsigns, mlastlogin from aspbb_members where mid = {0} and mpass = {1}"
objDAL.Open arrTempsave, strSQL, Array(request.cookies("forum")("userID"), request.cookies("forum")("userPass"))
'//For listing new topics
Session("lastvisit") = arrTempSave(6, 0)
objDAL.Execute "UPDATE aspbb_members SET mlastlogin={0} WHERE mid={1}", array(cTimeStamp(now()),arrTempSave(0, 0))
end if
if not EOF(arrTempsave) then
inside = 1
userID = arrTempsave(0, 0)
style = arrTempsave(1, 0)
userName = arrTempsave(2, 0)
lang = arrTempsave(3, 0)
mimgsigns = arrTempsave(5, 0)
session("userId") = userID
Session("userPass") = arrTempsave(4, 0)
end if
end if
'// For counting active users and guests
Dim intresult
if userid = 0 then
strSQL = "SELECT COUNT(*) FROM aspbb_activeusers WHERE amid= {0}"
intresult = objDAL.GetValue(strSQL, Array(Clng(Session.SessionID)))
If Len(intresult) > 0 then
if Clng(intresult) = 0 Then
strSQL = "INSERT INTO aspbb_activeusers (amid, atype, alastrequest, areferer, aip) VALUES ({0},0,{1},{2},{3})"
objDAL.Execute strSQL, Array(session.sessionid, cTimeStamp(now()), Request.ServerVariables("HTTP_REFERER"), Request.ServerVariables("REMOTE_ADDR"))
else
strSQL = "UPDATE aspbb_activeusers SET alastrequest={0}, aip={1} WHERE amid={2}"
objDAL.Execute strSQL, Array(cTimeStamp(now()), Request.ServerVariables("REMOTE_ADDR"), Clng(Session.SessionID))
end if
End if
else
strSQL = "SELECT COUNT(*) FROM aspbb_activeusers WHERE amid= {0}"
intresult = objDAL.GetValue(strSQL, Array(userid))
If Len(intresult) > 0 then
if Clng(intresult) = 0 Then
strSQL = "INSERT INTO aspbb_activeusers (amid, atype, alastrequest, areferer, aip) VALUES ({0},1,{1},{2},{3})"
objDAL.Execute strSQL, Array(userid, cTimeStamp(now()), Request.ServerVariables("HTTP_REFERER"), Request.ServerVariables("REMOTE_ADDR"))
else
strSQL = "UPDATE aspbb_activeusers SET alastrequest={0}, aip={1} WHERE amid={2}"
objDAL.Execute strSQL, Array(cTimeStamp(now()), Request.ServerVariables("REMOTE_ADDR"), userid)
end if
End if
end if
'// Delete entrys older than 24 hours
strSQL = "DELETE FROM aspbb_activeusers WHERE alastrequest < {0}"
objDAL.Execute strSQL, Array(cTimeStamp(Cdate(DateAdd("h",-24,Now()))))
Set LanguageParser = new langParser
if inside = 1 then
response.write""
LanguageParser.Language = lang
else
response.write""
LanguageParser.Language = defaultLang
end if
LanguageParser.Start
LanguageParser.IncludeSection "topinclude"
Response.Write ""
Session.LCID = LanguageParser.GetKey("settings", "LCID")
%>
<%if inside = 1 then
If isadmin(userid) or isModerator(userid) <> "0" then
strSQL = "Select Count(*) from aspbb_report where rdone = 0"
If isModerator(userid) <> "" and (isadmin(userid) = False) then
strSQL = strSQL & " and rforumid in ({0})"
End if
intNewReports = objDAL.GetValue(strSQL, Array(isModerator(userid)))
Else
intNewReports = ""
End if
Response.Write("