<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Forums(TM) '** http://www.webwizforums.com '** '** Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved. '** '** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'. '** '** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE '** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE '** AND DERIVATIVE WORKS IMMEDIATELY. '** '** If you have not received a copy of the license with this work then a copy of the latest '** license contract can be found at:- '** '** http://www.webwizguide.com/license '** '** For more information about this software and for licensing information please contact '** 'Web Wiz' at the address and website below:- '** '** Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England '** http://www.webwizguide.com '** '** Removal or modification of this copyright notice will violate the license contract. '** '**************************************************************************************** '*************************** SOFTWARE AND CODE MODIFICATIONS **************************** '** '** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE '** AGREEMENT AND IS STRICTLY PROHIBITED '** '** If you wish to modify any part of this software a license must be purchased '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting and setting a cookie Response.Buffer = True 'Dimension variables Dim strUserCode 'Holds a code for the user Dim lngUserID 'Holds the new users ID number Dim blnActivated 'Set to true if the account is activated Dim lngNewUserID 'Holds the ID of the user Dim blnDbActive 'Holds if the user is active in db Dim strDbUsercode 'Holds if the users db user code Dim blnDbBanned 'Holds if the user is suspended blnActivated = False blnDbActive = False 'Read in the users ID from the query string strUserCode = Trim(Mid(Request.QueryString("ID"), 1, 44)) If Request.QueryString("USD") <> "" AND isNumeric(Request.QueryString("USD")) Then lngNewUserID = CLng(Trim(Mid(Request.QueryString("USD"), 1, 6))) Else lngNewUserID = 0 'Make the usercode SQL safe strUserCode = formatSQLInput(strUserCode) 'If there is a usercode activate it If strUserCode <> "" AND blnMemberApprove = False Then 'Intialise the strSQL variable with an SQL string to open a record set for the Author table strSQL = "SELECT " & strDbTable & "Author.* " & _ "From " & strDbTable & "Author" & strRowLock & " " & _ "WHERE " & strDbTable & "Author.Author_ID = " & lngNewUserID & ";" 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set rsCommon.CursorType = 2 'Set the Lock Type for the records so that the record set is only locked when it is updated rsCommon.LockType = 3 'Open the author table rsCommon.Open strSQL, adoCon 'If these a record returned then check that the user code matches up before activation If NOT rsCommon.EOF Then 'Read in details for this user from the database blnDbActive = CBool(rsCommon("Active")) strDbUsercode = rsCommon("User_code") blnDbBanned = CBool(rsCommon("Banned")) 'See if the user is already active If blnDbActive Then 'Set the activate boolean to true blnActivated = True 'Else activate the user account ElseIf strUserCode = strDbUsercode AND blnDbBanned = False Then 'Calculate a new code for the user strUserCode = userCode(rsCommon("Username")) 'Update the database by activating the users account rsCommon.Fields("User_code") = strUserCode rsCommon.Fields("Active") = True 'Update the database with the new user's details rsCommon.Update 'Write a cookie with the User ID number so the user logged in throughout the forum Call setCookie("sLID", "UID", strUserCode, True) Call saveSessionItem("UID", strUserCode) 'Set the activate boolean to true blnActivated = True End If End If 'Release objects rsCommon.Close End If 'Reset Server Objects Call closeDatabase() 'If active users is enabled update the active users application array If blnActiveUsers Then 'Call active users function saryActiveUsers = activeUsers(strTxtActivateAccount, "", "", 0) End If 'Set bread crumb trail strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtActivateAccount %> <% = strTxtActivateAccount %> <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("") '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>

<% = strTxtActivateAccount %>


<% 'If the account is now active display a message If blnActivated = True Then %>
<% = strTxtActivateAccount %>
<% = strTxtYourForumMemIsNowActive %>

<% = strTxtYouCanAccessCP %>
<% = strTxtMemberCPMenu %>

<% = strTxtReturnToDiscussionForum %>
<% 'Else there is an error so show error table Else %>
<% = strTxtError %> <% = strTxtError %>
<% 'If their account has been suspended and they are trying to reactivate it then tell them they can't If blnDbBanned Then Response.Write(strTxtForumMemberSuspended) 'Theres been a problem so display an error message Else Response.Write(strTxtErrorWithActvation & " " & strMainForumName & " " & " " & strTxtForumAdministrator & ".") End If %>
<% End If %>

<% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then If blnTextLinks = True Then Response.Write("Bulletin Board Software by Web Wiz Forums® version " & strVersion & "") If blnACode Then Response.Write(" [Free Express Edition]") Else Response.Write("") If blnACode Then Response.Write("
Powered by Web Wiz Forums Free Express Edition") End If Response.Write("
Copyright ©2001-2008 Web Wiz") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Display the process time If blnShowProcessTime Then Response.Write "

" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "
" %>