<% '*********************************************************************** '** 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
 Classified Admin

Admin Interface

<% strSQL = "SELECT count(title) FROM CLASSIFIED WHERE SHOW=0" Set RScount = my_Conn.Execute(strSQL) rcount = RScount(0) RScount.close set RScount = nothing ' added strSQL = "SELECT CLASSIFIED_ID, TITLE, POSTER, EMAIL, ADDRESS, CITY, STATE, ZIPCODE, PRICE, KEYWORD, LINK, IMAGELINK, POST_DATE, END_DATE, PARENT_ID, SHOW, CATEGORY, BADLINK, DESCRIPTION FROM CLASSIFIED WHERE SHOW=0 ORDER BY POST_DATE ASC" set rs = my_Conn.Execute (strSQL) if rs.eof then %>
No new Ad to approve.
<% else %>

size="<%= strDefaultFontSize %>" color="#FF0000"><%= rcount%> New Classified(s) to Approve :

<% do while not rs.eof %> <% rs.movenext loop %>
size="<%= strDefaultFontSize %>" color="<%= strHeadFontColor %>"> <%=getCategoryName(rs("PARENT_ID"))%> / <%= getSubCatName(rs("CATEGORY"))%>
size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Title: <%=chkString(rs("TITLE"), "display")%>
size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Description: <%=chkString(rs("DESCRIPTION"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Address: <%=chkString(rs("ADDRESS"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> City/State: <%=chkString(rs("CITY"), "display")%>, <%=chkString(rs("STATE"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Zip Code: <%=chkString(rs("ZIPCODE"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Price: <%=chkString(rs("PRICE"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Keyword: <%=chkString(rs("KEYWORD"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Link: "><%=chkString(rs("LINK"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Image Link: "><%=chkString(rs("IMAGELINK"), "display")%>

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> Uploader's Email: <%=chkString(rs("EMAIL"), "display")%>

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

size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>"> " checked>Approve ">Delete | (Ad will be deleted if both are checked) size="<%= strDefaultFontSize %>" color="<%= strDefaultFontColor %>">">Edit

<%end if%>
<% rs.close set rs = nothing %> <% Else %> <% Response.Redirect "admin_login.asp" End If function getCategoryName(cat_id) strSQL = "SELECT CAT_NAME FROM CLASSIFIED_CATEGORIES WHERE CAT_ID = " & cat_id dim rsTemp set rsTemp = server.CreateObject("adodb.recordset") rsTemp.open strSQL, my_Conn getCategoryName = rsTemp("CAT_NAME") rsTemp.Close set rsTemp = nothing end function function getSubCatName(subcat_id) strSQL = "SELECT SUBCAT_NAME FROM CLASSIFIED_SUBCATEGORIES WHERE SUBCAT_ID = " & subcat_id dim rsTemp set rsTemp = server.CreateObject("adodb.recordset") rsTemp.open strSQL, my_Conn getSubCatName = rsTemp("SUBCAT_NAME") rsTemp.Close set rsTemp = nothing end function %>