<% cs = 4 If Sess_Array(48) = Session.SessionID and Not listalpha then admin = True: cs = 6: End If noIDmsg = "
" & strText_CannotLocateCategory & "
" If request.querystring.count = 1 then catID = request.querystring.item(1) If Not isNumeric(catID) Then noID = True Else: noID = True End If If noID Then Response.Write noIDmsg Else 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 " & tablPfx & "Scat.sortID, " & tablPfx & "Scat.sCatID, " & tablPfx & "Scat.CatID FROM " & tablPfx & "Scat WHERE catID = " & catID & " 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 "viewscat.asp?" & Request.Querystring End If End If End If strsCat = "SELECT " & tablPfx & "Scat.* from " & tablPfx & "Scat WHERE catID = " & catID & " ORDER BY " & scat_sortorder & ";" set rs = objConn.Execute(strsCat) If rs.EOF then Response.Write noIDmsg Else set rscat = objConn.Execute("SELECT " & tablPfx & "Cat.catName, " & tablPfx & "Cat.ads FROM " & tablPfx & "Cat WHERE catID = " & catID & ";") If not rscat.EOF then catName = rscat("catName") catItems = rscat("ads") rscat.close set rscat = Nothing End If rc = rs.RecordCount %> <% If Not IsNull(full_description) AND Not Len(full_description) = 0 then %>
<%= full_description %>
<% End If Response.Write vbcrlf & "
" & vbcrlf For f = 1 to rc sCatID = rs("sCatID") scatName = rs("scatName") sCatAds = rs("ads") sortID = rs("sortID") sicon = parseScategoryIcon(rs("scatMetaKey"), False) If f mod catpos = 1 then Response.Write "" & vbcrlf Response.Write "" & vbcrlf If admin then Response.Write "" End If Response.Write "" & vbcrlf If f mod catpos = 0 then Response.Write "" & vbcrlf rs.MoveNext Next Response.Write "" & vbcrlf Response.Write "
" & vbcrlf Response.Write "" & Replace(scatName, "" & vbcrlf If f = 1 then fd = "disabled": Else: fd = Empty: End If If f = rc then ld = "disabled" Response.Write "
" Response.Write "" Response.Write "" Response.Write "

" Response.Write "
" & vbcrlf Response.Write "" & scatName & " [" & sCatAds & "]
  " & strText_ALLinthisCategory & " (" & catItems & ")

" & vbcrlf 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 If mysql then strAd = "SELECT adID,subject FROM " & tablPfx & "Ads WHERE (status = 1 AND hotlist = 1 AND catID = " & catID & ") ORDER BY pdate DESC LIMIT 0,30;" Else: strAd = "SELECT TOP 30 adID,subject FROM " & tablPfx & "Ads WHERE (status = 1 AND hotlist = 1 AND catID = " & catID & ") ORDER BY pdate DESC;" End If set rshot = objConn.Execute(strAd) If not rshot.EOF then Response.Write "

" Response.Write "" Do while not rshot.EOF Response.Write "" rshot.MoveNext Loop Response.Write "
" & strText_FeaturedAds & """" & catName & """
" & rshot(1) & "
" Response.Write "
" & strText_Click & " " & strText_HERE & " " & strText_CreateAndPost & "
" End If rshot.close %>
<%= strText_JumptoCategory %>: 
<% End If rs.close End If %>