%@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. '=============================================== %> <% dim xxxxm, rsheadUpdatee, rsheadUpdatee_numRows Dim rsdate, rsdate_numRows, sexb, city, agestart, agelast, relationship, heighta, heightb, weighta, weightb, body, hair, ethnicity, religion, employ, education, marital, child, wantchild, smoke, drink, AndsexaString, AndagestartString, AndagelastString Dim AndheightaString, AndheightbString, AndweightaString, AndweightbString, AndcityString, AndphotoString, AndhairString, AndethnicityString, AndreligionString, AndemployString, AndeducationString, AndmaritalString, AndchildString, AndwantchildString, AndsmokeString Dim AnddrinkString, AndbodyString, AndsexbString, AndrelationshipString, SortString, sqlString, rsSearch, rsSearch_numRows, rsSearch_total, rsSearch_first, rsSearch_last, MM_rs, MM_rsCount, MM_size, MM_uniqueCol, MM_paramName, MM_offset, MM_atTotal Dim MM_paramIsDefined, r, i, MM_removeList, MM_keepURL, MM_keepForm, MM_keepBoth, MM_keepNone, Item, NextItem, MM_keepMove, MM_moveParam, params, urlStr, MM_moveFirst, MM_moveLast, MM_moveNext, prev, MM_movePrev, p_sex, p_relationship, aryFileType, numFileLoopCounter Dim strFileStatus, callmode, thepath, fs, numFilePresentCheck '------------------------- 'Expired Ad(s) Auto Inactive '------------------------- set rsdate = Server.CreateObject("ADODB.Recordset") rsdate.ActiveConnection = MM_conn_STRING rsdate.Source = "SELECT p_id FROM p_ads WHERE p_user < Date ()" rsdate.CursorType = 0 rsdate.CursorLocation = 2 rsdate.LockType = 3 rsdate.Open() rsdate_numRows = 0 Dim repeat2__numRows repeat2__numRows = -1 Dim repeat2__index repeat2__index = 0 rsdate_numRows = rsdate_numRows + repeat2__numRows If Not rsdate.EOF Or Not rsdate.BOF Then While ((repeat2__numRows <> 0) AND (NOT rsdate.EOF)) p_idd = rsdate("p_id") Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open MM_conn_STRING sql1 = "UPDATE p_ads SET p_active=1" & p_active & " WHERE p_id=" & p_idd conn.execute(sql1) repeat2__index=repeat2__index+1 repeat2__numRows=repeat2__numRows-1 rsdate.MoveNext() Wend rsdate.close set rsdate= nothing conn.close set conn = nothing end if '--------------------------- 'End Expired Ads Inactive '--------------------------- %> <% Function SafeHTMLEncode(inputstring) If inputstring<>"" then inputstring = server.HTMLEncode(inputstring) End if SafeHTMLEncode=inputstring End Function %> <% sexb = Request("field2") city = Request("field3") agestart = Request("field4") agelast = Request("field5") relationship = Request("field6") heighta = Request("field7") heightb = Request("field8") weighta = Request("field9") weightb = Request("field10") body = Request("field11") hair = Request("field12") ethnicity = Request("field13") religion = Request("field14") employ = Request("field15") education = Request("field16") marital = Request("field17") child = Request("field18") wantchild = Request("field19") smoke = Request("field20") drink = Request("field21") If Request("field1")="1" then AndsexaString = " AND p_seek BETWEEN 1 AND 2" ElseIf Request("field1") ="3" then AndsexaString = " AND p_seek BETWEEN 2 AND 3" Else AndsexaString = "" End If If agestart ="" then AndagestartString = " AND p_age BETWEEN 18" Else AndagestartString = " AND p_age BETWEEN " & agestart End If If agelast ="" then AndagelastString = " AND 100" Else AndagelastString = " AND " & agelast End If If heighta ="" then AndheightaString = " AND p_height BETWEEN 0" Else AndheightaString = " AND p_height BETWEEN " & heighta End If If heightb ="" then AndheightbString = " AND 27" Else AndheightbString = " AND " & heightb End If If weighta ="" then AndweightaString = " AND p_weight BETWEEN 0" Else AndweightaString = " AND p_weight BETWEEN " & weighta End If If weightb ="" then AndweightbString = " AND 1000" Else AndweightbString = " AND " & weightb End If If city ="" then AndcityString = "" Else AndcityString = " AND p_city = " & city End If If Request("field22") ="ON" then AndphotoString = " AND p_photoapprove = '2'" Else AndphotoString = "" End If If hair ="" then AndhairString = "" Else AndhairString = " AND p_hair = " & hair End If If ethnicity ="" then AndethnicityString = "" Else AndethnicityString = " AND p_ethnicity = " & ethnicity End If If religion ="" then AndreligionString = "" Else AndreligionString = " AND p_religion = " & religion End If If employ ="" then AndemployString = "" Else AndemployString = " AND p_employ = " & employ End If If education ="" then AndeducationString = "" Else AndeducationString = " AND p_education = " & education End If If marital ="" then AndmaritalString = "" Else AndmaritalString = " AND p_marital = " & marital End If If child ="" then AndchildString = "" Else AndchildString = " AND p_child = " & child End If If wantchild ="" then AndwantchildString = "" Else AndwantchildString = " AND p_wantchild = " & wantchild End If If smoke ="" then AndsmokeString = "" Else AndsmokeString = " AND p_smoke = " & smoke End If If drink ="" then AnddrinkString = "" Else AnddrinkString = " AND p_drink = " & drink End If If body ="" then AndbodyString = "" Else AndbodyString = " AND p_body = " & body End If If sexb ="" then AndsexbString = "" Else AndsexbString = " AND p_sex = " & sexb End If If relationship ="" then AndrelationshipString = "" Else AndrelationshipString = " AND p_relationship = " & relationship End If SortString = " ORDER BY p_id DESC" sqlString = "select p_ads.p_sex, p_ads.p_relationship, p_ads.p_photoapprove, p_ads.p_id, p_ads.p_headline, p_ads.p_age, p_ads.p_city, p_ads.p_views, p_ads.p_user,p_locations.* from (p_ads INNER JOIN p_locations on p_ads.p_city = p_locations.p_idl) WHERE p_active=0" sqlString = sqlString&AndrelationshipString&AndcityString&AndphotoString&AndhairString&AndethnicityString&AndreligionString&AndemployString&AndeducationString&AndmaritalString&AndchildString&AndwantchildString&AndsmokeString&AnddrinkString&AndsexbString&AndbodyString&AndagestartString&AndagelastString&AndheightaString&AndheightbString&AndweightaString&AndweightbString&AndsexaString&SortString %> <% set rsSearch = Server.CreateObject("ADODB.Recordset") rsSearch.ActiveConnection = MM_conn_STRING rsSearch.Source = ""& sqlString rsSearch.CursorType = 0 rsSearch.CursorLocation = 2 rsSearch.LockType = 3 rsSearch.Open() rsSearch_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = 20 Dim Repeat1__index Repeat1__index = 0 rsSearch_numRows = rsSearch_numRows + Repeat1__numRows %> <% If rsSearch.EOF Or rsSearch.BOF Then %>
|
Search Results |
|
|
| Sorry, no ads found. |
|
<%=(rsSearch_total)%> Matches Found! |
|
|
|
|
Showing Records <%=(rsSearch_first)%> to <%=(rsSearch_last)%> of <%=(rsSearch_total)%> |
<% If MM_offset <> 0 Then %>
Previous Results
<% End If ' end MM_offset <> 0 %><% If Not MM_atTotal Then %>
Next Results
<% End If ' end Not MM_atTotal %>
|
|
|
||||||||||||||
|
Photo |
|
Headline (click to view) |
|
Sex |
|
Relationship |
|
Age |
|
Location |
|
Views |
|
User Name |
|
|
||||||||||||||
<%
If rsSearch.Fields.Item("p_photoapprove") = "2" then
'-----------------------------------------
'FIND AND SHOW EXISTING IMAGE (IF ANY)
'-----------------------------------------
aryFileType = split("jpg,jpeg,gif,png",",",-1) 'SPLITS LIST OF ACCEPTABLE FILE TYPES IN CONFIG.ASP INTO ARRAY
numFileLoopCounter = Ubound(aryFileType)
strFileStatus = ""
If callmode<>"new" then
Do while numFileLoopCounter>-1
thepath = Server.MapPath("ad_photos/" & rsSearch.Fields.Item("p_id").Value & "." & aryFileType(numFileLoopCounter))
set fs=CreateObject("Scripting.FileSystemObject")
If fs.FileExists(thepath) then
strFileStatus = " "
numFilePresentCheck = 1
End if
numFileLoopCounter = numFileLoopCounter-1
Loop
end if
response.write(strFileStatus)
End if
%> |
|
|
<% = p_sex %> |
|
<% = p_relationship %> |
|
<%=(rsSearch.Fields.Item("p_age").Value)%> |
|
<% = rsSearch("p_location") %> |
|
<%=(rsSearch.Fields.Item("p_views").Value)%> |
|
<%=(rsSearch.Fields.Item("p_user").Value)%> |
|
|
<% If MM_offset <> 0 Then %>
Previous Results
<% End If ' end MM_offset <> 0 %><% If Not MM_atTotal Then %>
Next Results
<% End If ' end Not MM_atTotal %>
|