<% if ( Request.QueryString("LOGOUT") = "1" ) then sqlstr = "UPDATE tblUser SET Online = '0' where UserId = " & session("USERID") db.execute sqlstr session("USERNAME") = "" end if if (request.QueryString("SORT") = "SORT") then queryaction = request.QueryString("SORT") end if set rs = server.CreateObject("ADODB.Recordset") if queryaction = "SORT" then selsql = "select * from tblCategory where Status=1 order by Name" else selsql = "select * from tblCategory where Status=1" end if rs.Open selsql,db,3 %>
<% if (session("USERNAME") <> "") then %> <% end if %>
<% if rs.eof then %> <% end if %> <% if not rs.EOF then rs.move(strec) For i = strec to (edrec - 1) STEP 1 %> <% dim rstopics set rstopics = server.CreateObject("ADODB.Recordset") sqlstr ="SELECT count(CategoryId) FROM tblTopic where CategoryId =" & rs.fields("CategoryId") rstopics.Open sqlstr,db,3 numtopics = rstopics.fields(0) set rstopics = nothing %> <% rs.MoveNext next end if %>
<% if request.QueryString("msg") = "Add" then response.Write("Your topic has been posted successfully") elseif request.QueryString("msg") = "Edit" then response.Write("Your topic has been updated successfully") elseif request.QueryString("LOGOUT") = 1 then response.Write("You have been successfully logged out") elseif request.QueryString("msg") = "AddReply" then response.Write("Your reply has been posted successfully") end if %>
Category
Total Topic
Records not Found
"> <%=rs.fields("Name")%>
<%=numtopics %>
 
<% if (prevflag) then %> Previous  <% else response.Write(" ") end if %> <% pg= start + 1 For i = start to ( end1 - 1 ) STEP 1 if (Cint(activelnk) = i ) then response.Write( ""& pg & "" ) else %> <%=pg %> <% end if pg = pg + 1 next %> <% if (nextflag) then %>  Next <% else response.Write(" ") end if %>