<%@LANGUAGE="VBSCRIPT"%> <% '=============================================== ' Personals System 2002 ' ©2002 vSpin.net. www.vspin.net '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. vSpin.net copyright notices must ' remain in the ASP sections of the code. '=============================================== %> <% If request("method") = "close" AND NOT request("verify") = "true" then ' *** Restrict Access To Page: Grant or deny access to this page Dim MM_authorizedUsers, MM_authFailedURL, MM_grantAccess MM_authorizedUsers="" MM_authFailedURL="login.asp" MM_grantAccess=false If Session("MM_Username") <> "" Then If (true Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %>

  Are positive you wish to completely close your account?

 
 
<% elseif request("method") = "close" AND request("verify") = "true" then Response.Buffer = True Response.Cookies("id") = "$" Response.Cookies("id").Expires = Date() - 1000 Response.Cookies("access") = "$" Response.Cookies("access").Expires = Date() - 1000 Dim Session__MMColParam Session__MMColParam= session("MM_Username") set rsclose = Server.CreateObject("ADODB.Recordset") rsclose.ActiveConnection = MM_conn_STRING rsclose.Source = "SELECT p_id FROM p_ads WHERE p_user = '" + Replace(Session__MMColParam, "'", "''") + "'" rsclose.CursorType = 0 rsclose.CursorLocation = 2 rsclose.LockType = 3 rsclose.Open() rsclose_numRows = 0 Dim p_idd If Not rsclose.EOF Or Not rsclose.BOF Then p_idd = rsclose("p_id") elseIf rsclose.EOF Or rsclose.BOF Then p_idd = 0 end if set rsAutoDelete = Server.CreateObject("ADODB.Command") rsAutoDelete.ActiveConnection = MM_conn_STRING rsAutoDelete.CommandText = "delete from p_ads WHERE p_user= '" + Replace(Session__MMColParam, "'", "''") + "'" rsAutoDelete.CommandType = 1 rsAutoDelete.CommandTimeout = 0 rsAutoDelete.Prepared = true rsAutoDelete.Execute() set rsAutoDel = Server.CreateObject("ADODB.Command") rsAutoDel.ActiveConnection = MM_conn_STRING rsAutoDel.CommandText = "delete from p_messages WHERE field2= '" + Replace(Session__MMColParam, "'", "''") + "'" rsAutoDel.CommandType = 1 rsAutoDel.CommandTimeout = 0 rsAutoDel.Prepared = true rsAutoDel.Execute() set rsAutoDele = Server.CreateObject("ADODB.Command") rsAutoDele.ActiveConnection = MM_conn_STRING rsAutoDele.CommandText = "delete from p_favorites WHERE fav_user= '" + Replace(Session__MMColParam, "'", "''") + "' OR p_user= '" + Replace(Session__MMColParam, "'", "''") + "'" rsAutoDele.CommandType = 1 rsAutoDele.CommandTimeout = 0 rsAutoDele.Prepared = true rsAutoDele.Execute() set rsAutoDelet = Server.CreateObject("ADODB.Command") rsAutoDelet.ActiveConnection = MM_conn_STRING rsAutoDelet.CommandText = "delete from p_users WHERE p_user='" + Replace(Session__MMColParam, "'", "''") + "'" rsAutoDelet.CommandType = 1 rsAutoDelet.CommandTimeout = 0 rsAutoDelet.Prepared = true rsAutoDelet.Execute() set rsAutoDelet = Server.CreateObject("ADODB.Command") rsAutoDelet.ActiveConnection = MM_conn_STRING rsAutoDelet.CommandText = "delete from p_questions WHERE p_user='" + Replace(Session__MMColParam, "'", "''") + "'" rsAutoDelet.CommandType = 1 rsAutoDelet.CommandTimeout = 0 rsAutoDelet.Prepared = true rsAutoDelet.Execute() thepath=Server.MapPath("ad_photos/") set fs=CreateObject("Scripting.FileSystemObject") aryFileType = split("jpg,jpeg,gif,png",",",-1) 'SPLITS LIST OF ACCEPTABLE FILE TYPES IN CONFIG.ASP INTO ARRAY numFileLoopCounter = Ubound(aryFileType) Do while numFileLoopCounter>-1 ImageName = p_idd & "." & aryFileType(numFileLoopCounter) set fs=CreateObject("Scripting.FileSystemObject") If fs.FileExists(thepath & "\" & ImageName) then fs.DeleteFile(thepath & "\" & ImageName) End if numFileLoopCounter = numFileLoopCounter-1 Loop set fs=nothing Session.Abandon rsclose.Close MM_conn_STRING.Close set rsAutoDelete = nothing set rsAutoDel = nothing set rsAutoDele = nothing set rsAutoDelet = nothing set MM_conn_STRING = nothing set rsclose = nothing response.redirect("default.asp?message=47") End if %>