<%@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, rsViewss, rsViewss_numRows, rsNew, rsNew_numRows, rslocav, rslocav_numRows, p_sex, p_relationship, aryFileType, numFileLoopCounter, 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_expdate < 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 conn.close set conn = nothing rsdate.close set rsdate = nothing end if '--------------------------- 'End Expired Ads Inactive '-------------------------- set rsViewss = Server.CreateObject("ADODB.Recordset") rsViewss.ActiveConnection = MM_conn_STRING rsViewss.Source = "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_expdate,p_locations.* from (p_ads INNER JOIN p_locations on p_ads.p_city = p_locations.p_idl) where p_active=0 ORDER BY p_views DESC" rsViewss.CursorType = 0 rsViewss.CursorLocation = 2 rsViewss.LockType = 3 rsViewss.Open() rsViewss_numRows = 0 set rsNew = Server.CreateObject("ADODB.Recordset") rsNew.ActiveConnection = MM_conn_STRING rsNew.Source = "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_expdate,p_locations.* from (p_ads INNER JOIN p_locations on p_ads.p_city = p_locations.p_idl) where p_active=0 ORDER BY p_id DESC" rsNew.CursorType = 0 rsNew.CursorLocation = 2 rsNew.LockType = 3 rsNew.Open() rsNew_numRows = 0 Dim Repeat1__numRows Repeat1__numRows = 10 Dim Repeat1__index Repeat1__index = 0 rsViewss_numRows = rsViewss_numRows + Repeat1__numRows Dim Repeat11__numRows Repeat11__numRows = 10 Dim Repeat11__index Repeat11__index = 0 rsNew_numRows = rsNew_numRows + Repeat11__numRows count_sqry1 = "Select count(*) as 1_count From p_ads where p_sex = 1 AND p_seek BETWEEN 1 AND 2 AND p_active = 0" count_sqry2 = "Select count(*) as 2_count From p_ads where p_sex = 1 AND p_seek BETWEEN 2 AND 3 AND p_active = 0" count_sqry3 = "Select count(*) as 3_count From p_ads where p_sex = 2 AND p_seek BETWEEN 1 AND 2 AND p_active = 0" count_sqry4 = "Select count(*) as 4_count From p_ads where p_sex = 2 AND p_seek BETWEEN 2 AND 3 AND p_active = 0" set counter1=MM_conn_STRING.Execute (count_Sqry1) set counter2=MM_conn_STRING.Execute (count_Sqry2) set counter3=MM_conn_STRING.Execute (count_Sqry3) set counter4=MM_conn_STRING.Execute (count_Sqry4) count_1 = counter1("1_count") count_2 = counter2("2_count") count_3 = counter3("3_count") count_4 = counter4("4_count") %>

<% If Not rsSession.EOF Or Not rsSession.BOF Then %><% else %><% end if %>

       I am seeking a:    Location:
       <% set rslocav = Server.CreateObject("ADODB.Recordset") rslocav.ActiveConnection = MM_conn_STRING rslocav.Source = "SELECT * FROM p_locations Order by p_location ASC" rslocav.CursorType = 0 rslocav.CursorLocation = 2 rslocav.LockType = 3 rslocav.Open() rslocav_numRows = 0 Dim repeat21__numRows repeat21__numRows = -1 Dim repeat21__index repeat21__index = 0 rslocav_numRows = rslocav_numRows + repeat21__numRows %>

      Relationship:

  Age Range:

  

 (min)(max)

Photo ads only 

  

Top 10 Most Viewed Ads

Photo

Headline (click to view)

Sex

Relationship

Age

Location

Views

Expires

<% While ((Repeat1__numRows <> 0) AND (NOT rsViewss.EOF)) %> <% If rsViewss.Fields.Item("p_sex") = "1" then p_sex = "Bottom" ElseIf rsViewss.Fields.Item("p_sex") = "4" then p_sex = "Versatile" else p_sex = "Top" end if If rsViewss.Fields.Item("p_relationship") = "1" then p_relationship = "Friends" ElseIf rsViewss.Fields.Item("p_relationship") = "2" then p_relationship = "Hang Out" ElseIf rsViewss.Fields.Item("p_relationship") = "3" then p_relationship = "Short-term" ElseIf rsViewss.Fields.Item("p_relationship") = "4" then p_relationship = "Long-term" ElseIf rsViewss.Fields.Item("p_relationship") = "5" then p_relationship = "Sexual" ElseIf rsViewss.Fields.Item("p_relationship") = "6" then p_relationship = "Talk/E-mail" ElseIf rsViewss.Fields.Item("p_relationship") = "7" then p_relationship = "Photo Exchange" else p_relationship = "Other" end if %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsViewss.MoveNext() Wend %>
<% If rsViewss.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/" & rsViewss.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 %>

<%=(rsViewss.Fields.Item("p_age").Value)%>

<% = rsViewss("p_location") %>

<%=(rsViewss.Fields.Item("p_views").Value)%>

<%=(rsViewss.Fields.Item("p_expdate").Value)%>

Top 10 Newest Ads

Photo

Headline (click to view)

Sex

Relationship

Age

Location

Views

Expires

<% While ((Repeat11__numRows <> 0) AND (NOT rsNew.EOF)) %> <% If rsNew.Fields.Item("p_sex") = "1" then p_sex = "Bottom" ElseIf rsNew.Fields.Item("p_sex") = "2" then p_sex = "Top" else p_sex = "Versatile" end if If rsNew.Fields.Item("p_relationship") = "1" then p_relationship = "Friends" ElseIf rsNew.Fields.Item("p_relationship") = "2" then p_relationship = "Hang Out" ElseIf rsNew.Fields.Item("p_relationship") = "3" then p_relationship = "Short-term" ElseIf rsNew.Fields.Item("p_relationship") = "4" then p_relationship = "Long-term" ElseIf rsNew.Fields.Item("p_relationship") = "5" then p_relationship = "Sexual" ElseIf rsNew.Fields.Item("p_relationship") = "6" then p_relationship = "Talk/E-mail" ElseIf rsNew.Fields.Item("p_relationship") = "7" then p_relationship = "Photo Exchange" else p_relationship = "Other" end if %> <% Repeat11__index=Repeat11__index+1 Repeat11__numRows=Repeat11__numRows-1 rsNew.MoveNext() Wend %>
<% If rsNew.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/" & rsNew.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 %>

<%=(rsNew.Fields.Item("p_age").Value)%>

<% = rsNew("p_location") %>

<%=(rsNew.Fields.Item("p_views").Value)%>

<% = p_relationship %>

<%=(rsNew.Fields.Item("p_age").Value)%>

<% = rsNew("p_location") %>

<%=(rsNew.Fields.Item("p_views").Value)%>

<%=(rsNew.Fields.Item("p_user").Value)%>

<% rsViewss.Close rsNew.Close MM_conn_STRING.close set rsViewss = nothing Set rsNew = nothing set MM_conn_STRING = nothing set counter1 = nothing set counter2 = nothing set counter3 = nothing set counter4 = nothing %>