<% Dim totalPage, totalRecords, displayRecords, Opt(20), OptV(20), option_(20), uoption_(7), uOpt_(7) For I = 1 To 7 If CInt(uOptSearch(I - 1)) > 1 AND Len(uOpt(I-1)) > 0 Then uoption_(I) = True Next msgnoAds = "
" & strText_NoAdsSubmitted & msgBack & "
" msgInvalid = strText_InvalidRequestList If CBool(Sess_Array(35)) Or Sess_Array(48) = Session.SessionID then moderator = True If Sess_Array(48) = Session.SessionID and Not listalpha then admin = True: cs = 6: End If catID = Request("cid") subcatID = Request("sid") If isNumeric(catID) AND isNumeric(subcatID) then If catID > 0 AND subcatID > 0 then If Request("sa") = "1" then showAllAds = True subCatName = strText_ShowAll Else: isAll = " AND " & tablPfx & "Ads.scatID = " & subcatID End If On Error Goto 0 If not Request.Form("B1") = Empty then Set rs = Server.CreateObject("ADODB.Recordset") ID = CLng(Request.Form("ID")) If not ID = Empty then strsCat = "SELECT sortID,sCatID,CatID FROM " & tablPfx & "Scat WHERE catID = " & subcatID & " ORDER BY sortID;" rs.CursorLocation = 3 rs.CursorType = 3 rs.Open strsCat, strConn rc = rs.RecordCount On Error Resume Next For c = 1 to rc If Not rs.EOF then nextID = CLng(rs("sortID")) nextcatID = CLng(rs("sCatID")) If CStr(ID) = CStr(nextID) then Select Case Request.Form("B1") Case "▲": rs.MovePrevious Case "▼": rs.MoveNext End Select swapID = CLng(rs("sortID")) swapcatID = CLng(rs("sCatID")) Exit For End If rs.MoveNext End If Next On Error GoTo 0 rs.close If not swapID = Empty And Err.Number = 0 then objConn.Execute("UPDATE " & tablPfx & "Scat SET sortID = " & swapID & " WHERE sCatID = " & nextcatID & ";") objConn.Execute("UPDATE " & tablPfx & "Scat SET sortID = " & nextID & " WHERE sCatID = " & swapcatID & ";") UpdateSessions False Response.Redirect "viewlist.asp?" & Request.Querystring End If End If End If If Not showAllAds Then strsCat = "SELECT * FROM " & tablPfx & "Scat WHERE (catID = " & CLng(subcatID) & strSelectCat & ") ORDER BY " & scat_sortorder & ";" set rs = objConn.Execute(strsCat) If not rs.EOF then str3rdCatList = vbcrlf & "
" & vbcrlf rc = rs.RecordCount For f = 1 to rc cat3rdID = rs("sCatID") cat3rdName = rs("scatName") cat3rdAds = rs("ads") sortID = rs("sortID") sicon = parseScategoryIcon(rs("scatMetaKey"), False) If f mod catpos = 1 then str3rdCatList = str3rdCatList & "" & vbcrlf str3rdCatList = str3rdCatList & "" & vbcrlf If admin then str3rdCatList = str3rdCatList & "" End If str3rdCatList = str3rdCatList & "" & vbcrlf If f mod catpos = 0 then str3rdCatList = str3rdCatList & "" & vbcrlf rs.MoveNext Next str3rdCatList = str3rdCatList & "
" & vbcrlf str3rdCatList = str3rdCatList & "" & Replace(scatName, "" & vbcrlf If f = 1 then fd = "disabled": Else: fd = Empty: End If If f = rc then ld = "disabled" str3rdCatList = str3rdCatList & "
" str3rdCatList = str3rdCatList & "" str3rdCatList = str3rdCatList & "" str3rdCatList = str3rdCatList & "

" str3rdCatList = str3rdCatList & "
" & vbcrlf str3rdCatList = str3rdCatList & "" & cat3rdName & " " str3rdCatList = str3rdCatList & "[" & cat3rdAds & "]


" & vbcrlf End If rs.close End If %> <% If Not IsNull(full_description) AND Not Len(full_description) = 0 then %>
<%= full_description %>
<% End If Response.Write str3rdCatList If Not moderator then showAll = " AND " & tablPfx & "Ads.status = 1 " If isNumeric(catID) And isNumeric(subcatID) then Set rsso = objConn.Execute("SELECT * FROM " & tablPfx & "Cat WHERE catID = " & catID & ";") If not rsso.EOF Then For I = 1 To 20 If CLng(rsso("catOptSearch" & I)) > 1 Then option_(I) = True Next End If rsso.close strAd = "SELECT " & tablPfx & "Ads.adID, " & tablPfx & "Ads.pdate, " & tablPfx & "Ads.nick, " & tablPfx & "Ads.city, " & tablPfx & "Ads.subject, " & tablPfx & "Ads.images, " strAd = strAd & tablPfx & "Ads.status, " & tablPfx & "Ads.adcounter, " & tablPfx & "Ads.hotlist, " & tablPfx & "Ads.userID, " & tablPfx & "Ads.webimage, " & tablPfx & "Cat.catOpt1, " & tablPfx & "Ads.opt1, " strAd = strAd & tablPfx & "Cat.catOpt2, " & tablPfx & "Ads.opt2, " & tablPfx & "Cat.catOpt3, " & tablPfx & "Ads.opt3, " & tablPfx & "Cat.catOpt4, " & tablPfx & "Ads.opt4, " & tablPfx & "Cat.catOpt5, " & tablPfx & "Ads.opt5, " strAd = strAd & tablPfx & "Cat.catOpt6, " & tablPfx & "Ads.opt6, " & tablPfx & "Cat.catOpt7, " & tablPfx & "Ads.opt7, " & tablPfx & "Cat.catOpt8, " & tablPfx & "Ads.opt8, " & tablPfx & "Cat.catOpt9, " & tablPfx & "Ads.opt9, " strAd = strAd & tablPfx & "Cat.catOpt10, " & tablPfx & "Ads.opt10, " & tablPfx & "Cat.catOpt11, " & tablPfx & "Ads.opt11, " & tablPfx & "Cat.catOpt12, " & tablPfx & "Ads.opt12, " & tablPfx & "Cat.catOpt13, " & tablPfx & "Ads.opt13, " strAd = strAd & tablPfx & "Cat.catOpt14, " & tablPfx & "Ads.opt14, " & tablPfx & "Cat.catOpt15, " & tablPfx & "Ads.opt15, " & tablPfx & "Cat.catOpt16, " & tablPfx & "Ads.opt16, " & tablPfx & "Cat.catOpt17, " & tablPfx & "Ads.opt17, " strAd = strAd & tablPfx & "Cat.catOpt18, " & tablPfx & "Ads.opt18, " & tablPfx & "Cat.catOpt19, " & tablPfx & "Ads.opt19, " & tablPfx & "Cat.catOpt20, " & tablPfx & "Ads.opt20, " strAd = strAd & tablPfx & "Ads.uopt1, " & tablPfx & "Ads.uopt2, " & tablPfx & "Ads.uopt3, " strAd = strAd & tablPfx & "Ads.uopt4, " & tablPfx & "Ads.uopt5, " & tablPfx & "Ads.uopt6, " & tablPfx & "Ads.uopt7" strAd = strAd & " FROM " & tablPfx & "Ads," & tablPfx & "Cat WHERE " & tablPfx & "Ads.catID = " & catID & isAll & showAll & " AND " & tablPfx & "Cat.catID = " & catID & " ORDER BY hotlist DESC, pdate DESC;" set rs = objConn.Execute(strAd) If rs.EOF then Response.Write msgnoAds rs.close Else If isNumeric(Request("page")) and Len(Request("page")) > 0 then nPage = Request("page") Else: nPage = 1 End If URLlink = "viewlist.asp?" & Server.URLEncode(Request.Querystring) pageType = 11 strPaging = buildPages(nPage, URLlink, pageType) '## paging built in libraries.asp Response.Write "
" & strPaging Response.Write "
" & strText_TotalPages & ": " & totalPage & "
" Response.Write strText_TotalPosted & ": " & totalRecords & "
" Call Build_List_Top("center", "99%", "xl_list") ghdata = rs.getrows(displayRecords) rs.close %> <% For I = 1 To 7 If uoption_(I) Then Response.Write "" Next For I = 1 To 20 If option_(I) Then ind = ((I * 2) - 1) + 10 Opt(I) = ghdata(ind, 0) If IsNull(Opt(I)) Then Opt(I) = Empty If len(Opt(I)) > 0 then Response.Write "" End If Next %> <% If Sess_Array(29) > 0 or moderator then %> <% End If %> <% For J = 0 to Ubound(ghdata, 2) adID = ghdata(0, J) active = CLng(ghdata(6, J)) iDate = FormatDateTime(ghdata(1, J), 2) subject = ghdata(4, J) subject = "" & subject & "" If ghdata(8, J) then subject = "   " & subject userID = ghdata(9, J) If CStr(Sess_Array(29)) = CStr(userID) then adOwner = True: Else: adOwner = False nick = ghdata(2, J) city = ghdata(3, J) views = ghdata(7, J) imgStr = displayImage(ghdata(5, J), adID, 0) If J mod 2 = 0 then cellColor = "class='evencell'": Else: cellColor = "class='oddcell'" %> > <% For I = 1 To 7 If uoption_(I) Then uOpt_(I) = ghdata(I + 50, J) If IsNull(uOpt_(I)) Then uOpt_(I) = Empty If Len(uOpt_(I)) = 0 Then uOpt_(I) = NA Response.Write "" End If Next For I = 1 To 20 If option_(I) And Len(Opt(I)) > 0 Then ind = (I * 2) + 10 OptV(I) = ghdata(ind, J) If IsNull(OptV(I)) Then OptV(I) = Empty If Len(OptV(I)) = 0 Then OptV(I) = NA Response.Write "" End If Next %> <% If Sess_Array(29) > 0 or moderator then %> <% End If %> <% Next Erase ghdata %>
<%= strText_PostedOn %>: <%= strText_Subject %>: <%= strText_Picture %>:" & uOpt(I-1) & ":" & Opt(I) & ":<%= strText_Views %>:<%= strText_Action %>:
<%= iDate %>  <%= subject %> <%= imgStr %>" & uOpt_(I) & "" & OptV(I) & "<%= views %> <% If adOwner or moderator then If active = 2 then Response.Write "" & strText_Repost & "" ElseIf active = 1 then Response.Write "" & strText_Edit & "" End If If moderator then Response.Write " Delete" If active = 0 then Response.Write " Activate" End If End If Else: Response.Write "=" End If %>
<% Call Build_List_Bottom() %>
<% End If If not showAllAds AND Sess_Array(63) = "1" AND Sess_Array(48) = Session.SessionID then If Len(Sess_Array(64)) = 0 then strMover = "Move Ads From This Category" Else ccid = Split(Sess_Array(64), "|")(0) csid = Split(Sess_Array(64), "|")(1) cat3id = Sess_Array(65) If Sess_Array(65) = "0" then view_src = "viewlist.asp?cid=" & ccid & "&sid=" & csid Else view_src = "viewsublist.asp?cid=" & ccid & "&sid=" & csid & "&3id=" & Sess_Array(65) End If strMover = "View Current Source Category

Make This Category the Source | " strMover = strMover & "" & subCatName & "] !!')) {return false}"">Move Ads to this Category" End If Response.Write "

" & strMover & "


" End If If not showAllAds AND Sess_Array(66) = "1" AND Sess_Array(48) = Session.SessionID then strMover = "Remove ALL Ads from this Category" Response.Write "

" & strMover & "


" End If Else: Response.Write "
" & msgInvalid & "
" End If set rscat = objConn.Execute("SELECT " & tablPfx & "Cat.catName, " & tablPfx & "Cat.catID FROM " & tablPfx & "Cat ORDER BY catName;") Do while not rscat.EOF nextCatName = rscat("catName") nextcatID = rscat("catID") If nextCatName = catName then optCat = optCat & "" Else: optCat = optCat & "" End If rscat.MoveNext Loop rscat.close set rscat = Nothing %>
<%= strText_JumptoCategory %>: 
<% Else: Response.Write "
" & msgInvalid & "
" End If Else: Response.Write "
" & msgInvalid & "
" End If %>