<% Dim objCom, confirm, email, mem, regText, tempPass, admin, objRS, password, Login, stype, confirmDo Dim isConfirmDoable email = trim(""&request.queryString("email")) tempPass = trim(""&request.queryString("sid")) stype = ""&request.queryString("stype") confirmDo = ""&request.querystring("do") isConfirmDoable = true if stype = "" and confirmDo="" then response.redirect(forumdir&"default.asp") response.end elseif confirmDo = "reset" then stype = "1" isConfirmDoable = false elseif (email="" or temppass="") then isConfirmDoable = false end if if isConfirmDoable then if stype <> "4" then set objCom = server.createobject("adodb.command") with objCom .activeconnection = datastore .commandText = dbOwnerPrefix&"spRegConfirm" .commandType = adCmdStoredProc .Parameters.Append .Createparameter("@RETURN_VALUE", adInteger, adParamReturnValue, 0) .Parameters.Append .Createparameter("@type", adInteger, adParamInput, 0, stype) .Parameters.Append .Createparameter("@email", adVarChar, adParamInput, 50, email) .Parameters.Append .Createparameter("@tempPass", adVarChar, adParamInput, 50, tempPass) .Parameters.Append .Createparameter("@password", adVarChar, adParamOutput, 50) .Parameters.Append .Createparameter("@login", adVarChar, adParamOutput, 50) .execute , , adExecuteNoRecords confirm = .parameters("@RETURN_VALUE") password = .parameters("@password") login = .parameters("@login") end with set objCom = nothing else Set objCom = server.createobject("adodb.command") with objCom .activeconnection = datastore .commandText = dbOwnerPrefix&"spLostPass" .commandType = adCmdStoredProc .parameters.append .Createparameter ("@out_login", adVarChar, adParamOutput, 50) .parameters.append .Createparameter ("@out_pass", adVarChar, adParamOutput, 50) .parameters.append .Createparameter ("@in_email", adVarChar, adParamInput, 50, email) .parameters.append .Createparameter ("@in_pass", adVarChar, adParamInput, 50, rndPasswd(11)) .parameters.append .Createparameter ("@temppass", adVarChar, adParamInput, 50, temppass) .execute , , adExecuteNoRecords login = .Parameters("@out_login") password = .Parameters("@out_pass") end with Set objcom = nothing if isnull(login) then confirm = 0 else confirm = 1 end if if confirm <> 1 then regText = regConfirmError else SELECT CASE stype CASE "1" Application.lock application(dbName&"totalMem") = application(dbName&"totalMem")+1 Application.unlock regText = regConfirmSuccess CASE "2" Dim senderE,senderN,mailTo,mailCC,mailBCC,subject,Body,arrBody, lastlogin Application.lock application(dbName&"totalMem") = application(dbName&"totalMem")+1 Application.unlock regText = regConfirmAdmin set objRS = server.createobject("adodb.recordset") With objRS .open dbOwnerPrefix&"spGetRegMsg (2)", datastore, , , adCmdStoredProc if not (.eof and .bof) then arrBody = .getrows .close .open "SELECT lastlogin FROM pgd_members WHERE login = '"&login&"'", datastore, , , adCmdText lastlogin = objRS(0) .close End With set objRS = nothing if isarray(arrBody) then Body = arrBody(0,0) else Body = "" senderE = Application(dbName&"adminEmail") senderN = Application(dbName&"ForumTitle") mailTo = email mailCC = "" mailBCC = "" 'subject = Application(dbName&"ForumTitle") Body = replace(Body,"#password#", password) Body = replace(Body,"#login#", Login) Body = replace(Body,"#forumtitle#" , Application(dbName&"ForumTitle")) Body = replace(Body,"#forumdir#" , forumdir) subject = split(body,vbcrlf)(0) body = replace(body,subject&vbcrlf,"",1,1,vbBinaryCompare) call mailRoutine(senderE,senderN,mailTo,mailCC,mailBCC,subject,Body) if isNull(lastLogin) then call SendLoginPassword(login, Email, password) end if CASE "4" regText = lostpassConfirmed call SendLoginPassword(login, Email, password) END SELECT end if end if %> <%= Application(dbName&"forumtitle") %> <%= OutputCSS() %> > <% call headerHTML() %>
<% if isConfirmDoable then %> <% else %> <% end if %>
<%= regResultDesc %>
class="subhead" align="center"><%= regText %>

<%= regConfirmResp %>

class="subhead" align="center">
<% If confirmDo = "reset" then %> <%= regConfirmDoResetDesc %> <% Else %> <% if stype="4" then %> <%= regConfirmPassDesc %> <% Else %> <%= regConfirmAgainDesc %> <% End If %> <% End If %>
<%= tmEmail %>
<%= regConfirmTempPassDesc %>


<% call footerHTML() %>