%@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. '=============================================== %> <% ' *** 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 %> <% dim xxxxm, rsheadUpdatee, rsheadUpdatee_numRows Dim MM_editAction, MM_abortEdit, MM_editQuery, rsFavorite, rsFavorite_numRows, user2, rsad, rsad_numRows, MM_editConnection, MM_editTable, MM_editColumn, MM_recordId, MM_editRedirectUrl, MM_editCmd ' *** Edit Operations: declare variables MM_editAction = CStr(Request("URL")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Delete Record: declare variables if (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then MM_editConnection = MM_conn_STRING MM_editTable = "p_favorites" MM_editColumn = "id" MM_recordId = "" + Request.Form("MM_recordId") + "" MM_editRedirectUrl = "favorites.asp" ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Delete Record: construct a sql delete statement and execute it If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then ' create the sql delete statement MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId If (Not MM_abortEdit) Then ' execute the delete Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim rsFavorite__MMColParam rsFavorite__MMColParam = "1" if (Session("MM_Username") <> "") then rsFavorite__MMColParam = Session("MM_Username") %> <% set rsFavorite = Server.CreateObject("ADODB.Recordset") rsFavorite.ActiveConnection = MM_conn_STRING rsFavorite.Source = "SELECT * FROM p_favorites WHERE p_user = '" + Replace(rsFavorite__MMColParam, "'", "''") + "'" rsFavorite.CursorType = 0 rsFavorite.CursorLocation = 2 rsFavorite.LockType = 3 rsFavorite.Open() rsFavorite_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsFavorite_numRows = rsFavorite_numRows + Repeat1__numRows %>
|
My Favorite Users |
|
|
|
|
note: Users that have closed their account will be auto removed from favorites. |
|
User ID (click user id to send message) |
|
Personals Ad |
|
Remove |
|
|
<% user2 = rsFavorite("fav_user") set rsad = Server.CreateObject("ADODB.Recordset") rsad.ActiveConnection = MM_conn_STRING rsad.Source = "SELECT p_id FROM p_ads WHERE p_user = '" + Replace(user2, "'", "''") + "' AND p_active=0" rsad.CursorType = 0 rsad.CursorLocation = 2 rsad.LockType = 3 rsad.Open() rsad_numRows = 0 %> <% If NOT rsad.EOF And NOT rsad.BOF Then %> |
|
||
| No Favorites | ||||