% @ LANGUAGE=VBScript %>
<%
If session("admin_loggedin" & strSUnique) = True then admin = True
If listalpha then sortorder = "catName": else sortorder = "sortID"
If not Request.Form("B1") = Empty then
ID = Clng(Request.Form("ID"))
If not ID = Empty then
strCat = "SELECT " & tablPfx & "Cat.sortID, " & tablPfx & "Cat.catID FROM " & tablPfx & "Cat ORDER BY sortID;"
rs.CursorLocation = 3
rs.CursorType = 3
rs.Open strCat, 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("catID"))
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("catID"))
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 & "Cat SET sortID = " & swapID & " WHERE catID = " & nextcatID & ";")
objConn.Execute("UPDATE " & tablPfx & "Cat SET sortID = " & nextID & " WHERE catID = " & swapcatID & ";")
Response.Redirect "browse.asp"
End If
End If
End If
sdd = dd(objConn)
strCat = "SELECT " & tablPfx & "Cat.* from " & tablPfx & "Cat ORDER BY " & sortorder & ";"
rs.CursorLocation = 3
rs.CursorType = 3
rs.Open strCat, strConn
If rs.EOF then
Response.Write "
The Category List is Empty
"
Else
%>
| Home::Categories List |
|
|
<%
Response.Write vbcrlf & "
" & vbcrlf
rc = rs.RecordCount
For c = 1 to rc
catID = CLng(rs("catID"))
catName = rs("catName")
catDescr = rs("catDescr")
icon = rs("icon")
ads = CLng(rs("ads"))
sortID = CLng(rs("sortID"))
If c mod catpos = 1 then Response.Write "" & vbcrlf
Response.Write "" & vbcrlf
Response.Write " | " & vbcrlf
If admin and Not listalpha then
Response.Write "" & vbcrlf
If c = 1 then fd = "disabled": Else: fd = Empty: End If
If c = rc then ld = "disabled"
Response.Write " | "
End If
Response.Write "" & vbcrlf
Response.Write "" & catName & " (" & ads & ")
" & catDescr & " | " & vbcrlf
tPosted = tPosted + CLng(ads)
If c mod catpos = 0 then Response.Write " " & vbcrlf
rs.MoveNext
Next
Response.Write " " & vbcrlf
%>
Totally Posted and Active [<%= tPosted %>] Ads in [<%= rc %>] Categories
|
<%
End If
rs.close
setLocale server_locale
If Not CStr(Request.Cookies("clboard_hitcount" & strUnique)("nocount")) = "True" then
Response.Cookies("clboard_hitcount" & strUnique)("nocount") = True
objConn.Execute("INSERT INTO " & tablPfx & "HitLog(hitDate, IP, referer) VALUES (" & sdd & ConvDate(Now) & sdd & ", '" & Request.ServerVariables("REMOTE_ADDR") & "', '" & Request.ServerVariables("HTTP_REFERER") & "');")
set rs = objConn.Execute("SELECT " & tablPfx & "Counter.hitcounter FROM " & tablPfx & "Counter;")
If rs.EOF then
objConn.Execute("INSERT INTO " & tablPfx & "Counter (hitcounter) VALUES (1);")
Response.Cookies("clboard_hitcount" & strUnique)("visitor") = 1
Else:
newvalue = CLng(rs("hitcounter")) + 1
Response.Cookies("clboard_hitcount" & strUnique)("visitor") = newvalue
objConn.Execute("UPDATE " & tablPfx & "Counter SET hitcounter = '" & newvalue & "';")
End If
rs.close
ExpireAds
End If
%>