<% '*********************************************************************** '** Copyright (C) 2001 - 2004 Max Yuan All Rights Reserved '** '** By using this program, you are agreeing to the terms of the '** GNU General Public License. '** '** This program is free software; you can redistribute it and/or '** modify it under the terms of the GNU General Public License '** as published by the Free Software Foundation; either version 2 '** of the License, or any later version. '** '** All copyright notices regarding MaxWebPortal must remain intact '** in the scripts and in the outputted HTML. '** The "powered by" text/logo with a link back to '** http://www.maxwebportal.com in the footer of the pages MUST '** remain visible when the pages are viewed on the internet or intranet. '** '** Support can be obtained from support forums at: '** http://www.maxwebportal.com '** '** Email: maxwebportal@hotmail.com '** ICQ: 148111300 '*********************************************************************** %> <% If Session(strCookieURL & "Approval") = "256697926329" Then %>
 Home
 Admin Section
 Article Admin

Admin Interface

<% strSQL = "SELECT count(ARTICLE_ID) FROM ARTICLE WHERE SHOW=0" Set RScount = my_Conn.Execute(strSQL) rcount = RScount(0) RScount.close set RScount = nothing ' added strSQL = "SELECT ARTICLE_ID, TITLE, SUMMARY, CONTENT, POSTER, POSTER_EMAIL, AUTHOR, AUTHOR_EMAIL, POST_DATE FROM ARTICLE WHERE SHOW=0 ORDER BY ARTICLE_ID" set rs = my_Conn.Execute (strSQL) if rs.eof then %>
No new Article to approve.
<% else %>

size="<%= strDefaultFontSize %>" color="#FF0000"><%= rcount%> New Articles to Approve :

<% do while not rs.eof articleid = rs("ARTICLE_ID") %>
size="<%= strDefaultFontSize %>" color="<%= strHeadFontColor %>"> <%= getCatSubCatNames(articleid)%>
size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Article name: <%=rs("TITLE")%>
size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Summary:
<%=HTMLencode(rs("SUMMARY"))%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Content:
<%=FormatStr(rs("CONTENT"))%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Poster: <%=rs("POSTER")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Poster's email: <%=rs("POSTER_EMAIL")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Author: <%=rs("AUTHOR")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Author's email/website: <%=rs("AUTHOR_EMAIL")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Date Submitted: <%=ChkDate(rs("POST_DATE")) & ChkTime(rs("POST_DATE"))%>

" color="<%= strDefaultFontColor %>"> ApproveDelete this article   size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>">">Edit ">
<% rs.movenext loop end if %>
<% rs.close set rs = nothing %> <% Else %> <% Response.Redirect "admin_login.asp" %> <% End If %> <% function getCatSubCatNames(articleid) strSQL = "SELECT PARENT_ID, CATEGORY FROM ARTICLE WHERE ARTICLE_ID = " & articleid set rsG = my_Conn.Execute (strSQL) CatID = rsG("PARENT_ID") SubCatID = rsG("CATEGORY") rsG.Close set rsG = nothing strSQL = "SELECT CAT_NAME FROM ARTICLE_CATEGORIES WHERE CAT_ID = " & CatID set rsCat = my_Conn.Execute (strSQL) CatName = rsCat("CAT_NAME") rsCat.Close set rsCat = nothing strSQL = "SELECT SUBCAT_NAME FROM ARTICLE_SUBCATEGORIES WHERE SUBCAT_ID = " & SubCatID set rsSubCat = my_Conn.Execute (strSQL) SubCatName = rsSubCat("SUBCAT_NAME") rsSubCat.Close set rsSubCat = nothing response.write CatName & " / " & SubCatName end function %>