Hi All,
Im starting to learn ASP as I had some ASP scripts coded for me and after some use they need updated and modified slightly and the original coder can no longer help with them so i decided to learn myself.
The issue im running into at the moment has to do with user activations. When a user signs up on the site they get sent an activation code via email which they will then have to enter on the site to activate their account.
Within the Admin panel there is a option to activate the account for the user. When i try to activate any accounts i get the following error
Quote:
Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/aa3/administration/Activate_Accounts.asp, line 47
|
I have checked my IF / End IF statements and they look correct to me, Ive looked around the INet but am still unable to work out whats wrong.
The portion of code in question is below; any help would be greatly appreciated.
Code:
<!-- #Include File='../includes/inc_includes.asp' -->
<!-- #Include File='includes/level3.asp'-->
<%
Set dbcon=DBConnect(DB_MAIN)
rSQL = "SELECT AccountID, Username, Email FROM Members WHERE Activated = FALSE ORDER BY AccountID ASC"
Set oRs=DBRecordSet(dbcon, rSQL)
If NOT oRs.EOF Then
Do Until oRs.EOF
If Request.Form(oRs("AccountID") & "_Activate") = "Yes" Then
dbcon.execute("UPDATE members SET Activated = 1 WHERE AccountID = " & oRs("AccountID") & "")
Call AdminLog("Activate Accounts", "Activated Account " & oRs("AccountID"))
Else If Request.Form(oRs("AccountID") & "_Deny") = "Yes" Then
Set Mailer = Server.CreateObject("CDO.Message")
Set MailerCon = Server.CreateObject ("CDO.Configuration")
MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net"
MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
'MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
'MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") ="[email protected]"
'MailerCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="[PasswordDeleted"
MailerCon.Fields.Update
Set Mailer.Configuration = MailerCon
Mailer.From = "[email protected]"
Mailer.To = sEmail
Mailer.Subject = "MPlayer " & GLOBAL_GAME_NAME & " League - Account Deleted"
Mailer.TextBody = Mailer.TextBody & "----------------------------------------------------" & vbNewLine
Mailer.TextBody = Mailer.TextBody & "* Automated @ The MPlayer League Network *" & vbNewLine
Mailer.TextBody = Mailer.TextBody & "----------------------------------------------------" & vbNewLine & vbNewLine
Mailer.TextBody = Mailer.TextBody & sUsername & "," & vbNewLine & vbNewLine
Mailer.TextBody = Mailer.TextBody & "Your account on the MPlayer" & GLOBAL_GAME_NAME & " League has been deleted by " & Session(CURRENT_ABBR & "_Username") & "." & vbNewLine & vbNewLine
Mailer.TextBody = Mailer.TextBody & "As a result of the denial, the account has been deleted from our databases, feel free to signup again but this time activate your account." & vbNewLine & vbNewLine
Mailer.TextBody = Mailer.TextBody & "Regards," & vbNewLine
Mailer.TextBody = Mailer.TextBody & "MPlayer League."
Mailer.Send
Set Mailer = Nothing
Set MailerCon = Nothing
End If
%>
Thank You in advance.