%@LANGUAGE="VBSCRIPT"%>
<%euro=application("euro")
useremail=trim(request.form("username"))
password=trim(request.form("password"))
if not useremail="" then
set conn=server.createobject("adodb.connection")
conn.open Application("SQLCONN")
cSQL="select * from manianet.Accounts where emailaddress='"&useremail&"' and password='"&password&"'"
set rsPW=conn.execute(cSQL)
lValid=not rsPW.eof
if lValid then
FirstName=rsPW("FirstName")
AccountID=rsPW("AccountID")
session("AccountID")=AccountID
session("email")=useremail
session("password")=password
if isnull(rsPW("AccountCreated")) then
cSQL="update manianet.Accounts set AccountCreated='"&now&"',TimesAccess=0,LastAccess='"&now&"' where AccountID="&AccountID
conn.Execute (cSQL)
end if
conn.Execute ("update manianet.Accounts set TimesAccess=TimesAccess+1,LastAccess='"&now&"' where AccountID="&AccountID)
rspw.movefirst()
muser=rspw.Fields.Item("firstname").Value
end if
set rsPW=nothing
conn.Close
set conn=nothing
session("username")=useremail
session("password")=password
if not lValid then
response.redirect "wrong.htm"
end if
end if
set specoffers = Server.CreateObject("ADODB.Recordset")
specoffers.ActiveConnection = MM_mania_STRING
specoffers.Source = "SELECT distinct (id*(1+datepart(s,getdate()))*(1+datepart(ms,getdate())))%1000 sortid,* FROM manianet.offers WHERE offerlevel=3 and feature=1"
specoffers.CursorType = 2
specoffers.CursorLocation = 2
specoffers.LockType = 3
specoffers.Open()
specoffers_numRows = 0
%>
<%
set preoffers = Server.CreateObject("ADODB.Recordset")
preoffers.ActiveConnection = MM_mania_STRING
preoffers.Source = "SELECT distinct (id*(1+datepart(s,getdate()))*(1+datepart(ms,getdate())))%1000 sortid,* FROM manianet.offers WHERE offerlevel=1 and feature=1 and releasedate >'"&now()&"'"
preoffers.CursorType = 2
preoffers.CursorLocation = 2
preoffers.LockType = 3
preoffers.Open()
preoffers_numRows = 0
%>
<%
set memoffers = Server.CreateObject("ADODB.Recordset")
memoffers.ActiveConnection = MM_mania_STRING
memoffers.Source = "SELECT distinct (id*(1+datepart(s,getdate()))*(1+datepart(ms,getdate())))%1000 sortid,* FROM manianet.offers where offerlevel=2 and feature=1"
memoffers.CursorType = 2
memoffers.CursorLocation = 2
memoffers.LockType = 3
memoffers.Open()
memoffers_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 3
Dim Repeat1__index
Repeat1__index = 0
specoffers_numRows = specoffers_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
' set the number of rows displayed on this page
If (specoffers_numRows < 0) Then
specoffers_numRows = specoffers_total
Elseif (specoffers_numRows = 0) Then
specoffers_numRows = 1
End If
' set the first and last displayed record
specoffers_first = 1
specoffers_last = specoffers_first + specoffers_numRows - 1
' if we have the correct record count, check the other stats
If (specoffers_total <> -1) Then
If (specoffers_first > specoffers_total) Then specoffers_first = specoffers_total
If (specoffers_last > specoffers_total) Then specoffers_last = specoffers_total
If (specoffers_numRows > specoffers_total) Then specoffers_numRows = specoffers_total
End If
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
preoffers_total = preoffers.RecordCount
' set the number of rows displayed on this page
If (preoffers_numRows < 0) Then
preoffers_numRows = preoffers_total
Elseif (preoffers_numRows = 0) Then
preoffers_numRows = 1
End If
' set the first and last displayed record
preoffers_first = 1
preoffers_last = preoffers_first + preoffers_numRows - 1
' if we have the correct record count, check the other stats
If (preoffers_total <> -1) Then
If (preoffers_first > preoffers_total) Then preoffers_first = preoffers_total
If (preoffers_last > preoffers_total) Then preoffers_last = preoffers_total
If (preoffers_numRows > preoffers_total) Then preoffers_numRows = preoffers_total
End If
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
memoffers_total = memoffers.RecordCount
' set the number of rows displayed on this page
If (memoffers_numRows < 0) Then
memoffers_numRows = memoffers_total
Elseif (memoffers_numRows = 0) Then
memoffers_numRows = 1
End If
' set the first and last displayed record
memoffers_first = 1
memoffers_last = memoffers_first + memoffers_numRows - 1
' if we have the correct record count, check the other stats
If (memoffers_total <> -1) Then
If (memoffers_first > memoffers_total) Then memoffers_first = memoffers_total
If (memoffers_last > memoffers_total) Then memoffers_last = memoffers_total
If (memoffers_numRows > memoffers_total) Then memoffers_numRows = memoffers_total
End If
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
specoffers_total = specoffers.RecordCount
' set the number of rows displayed on this page
If (specoffers_numRows < 0) Then
specoffers_numRows = specoffers_total
Elseif (specoffers_numRows = 0) Then
specoffers_numRows = 1
End If
' set the first and last displayed record
specoffers_first = 1
specoffers_last = specoffers_first + specoffers_numRows - 1
' if we have the correct record count, check the other stats
If (specoffers_total <> -1) Then
If (specoffers_first > specoffers_total) Then specoffers_first = specoffers_total
If (specoffers_last > specoffers_total) Then specoffers_last = specoffers_total
If (specoffers_numRows > specoffers_total) Then specoffers_numRows = specoffers_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (specoffers_total = -1) Then
' count the total records by iterating through the recordset
specoffers_total=0
While (Not specoffers.EOF)
specoffers_total = specoffers_total + 1
specoffers.MoveNext
Wend
' reset the cursor to the beginning
If (specoffers.CursorType > 0) Then
specoffers.MoveFirst
Else
specoffers.Requery
End If
' set the number of rows displayed on this page
If (specoffers_numRows < 0 Or specoffers_numRows > specoffers_total) Then
specoffers_numRows = specoffers_total
End If
' set the first and last displayed record
specoffers_first = 1
specoffers_last = specoffers_first + specoffers_numRows - 1
If (specoffers_first > specoffers_total) Then specoffers_first = specoffers_total
If (specoffers_last > specoffers_total) Then specoffers_last = specoffers_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (preoffers_total = -1) Then
' count the total records by iterating through the recordset
preoffers_total=0
While (Not preoffers.EOF)
preoffers_total = preoffers_total + 1
preoffers.MoveNext
Wend
' reset the cursor to the beginning
If (preoffers.CursorType > 0) Then
preoffers.MoveFirst
Else
preoffers.Requery
End If
' set the number of rows displayed on this page
If (preoffers_numRows < 0 Or preoffers_numRows > preoffers_total) Then
preoffers_numRows = preoffers_total
End If
' set the first and last displayed record
preoffers_first = 1
preoffers_last = preoffers_first + preoffers_numRows - 1
If (preoffers_first > preoffers_total) Then preoffers_first = preoffers_total
If (preoffers_last > preoffers_total) Then preoffers_last = preoffers_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (memoffers_total = -1) Then
' count the total records by iterating through the recordset
memoffers_total=0
While (Not memoffers.EOF)
memoffers_total = memoffers_total + 1
memoffers.MoveNext
Wend
' reset the cursor to the beginning
If (memoffers.CursorType > 0) Then
memoffers.MoveFirst
Else
memoffers.Requery
End If
' set the number of rows displayed on this page
If (memoffers_numRows < 0 Or memoffers_numRows > memoffers_total) Then
memoffers_numRows = memoffers_total
End If
' set the first and last displayed record
memoffers_first = 1
memoffers_last = memoffers_first + memoffers_numRows - 1
If (memoffers_first > memoffers_total) Then memoffers_first = memoffers_total
If (memoffers_last > memoffers_total) Then memoffers_last = memoffers_total
End If
%>