您现在的位置: 动易技术中心 >> 模板设计教程 >> 动易模板 >> 正文
[组图]关于对后台[待审文章][待审评论][待审会员]的一点重要改进

该改进适合每天疲于奔命在各频道间查看是否有待审文章和待审评论的用户。如果只有几个或10来个频道还问题不大,几十上百个频道的网站估计在频道间走一遍就得烦死!

此主题相关图片如下:


现提供解决办法:
<%
dim MDB_Article_ADO,MDB_Article_LinkStr,MDB_Channel_ADO,MDB_Channel_LinkStr,MDB_Comment_ADO,MDB_Comment_LinkStr,MDB_User_ADO,MDB_User_LinkStr
dim vChannelID_1,vChannelID_2,a1,a2,vNoApproveUser,vTestUser
dim vArticleID,vChannelID,vChannelIDAry(50),vChannelName(50),vCommentCount(50),x,y
set MDB_Article_ADO = Server.CreateObject("ADODB.Recordset")
MDB_Article_LinkStr = "select * from PE_Article where status=0 order by ChannelID"
MDB_Article_ADO.open MDB_Article_LinkStr,Conn,1,1
a1 = 0
a2 = 0
vChannelID_1 = 0
vChannelID_2 = 0
if MDB_Article_ADO.recordcount > 0 then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"> </td>
<td class="topbg" align="center"><span class="Glow">各 频 道 未 审 文 章 篇 数</span></td>
<td width="21"> </td>
</tr>
<tr>
<td width="20"> </td>
<td>
<%
do while not MDB_Article_ADO.eof
vChannelID_1 = MDB_Article_ADO("ChannelID")
if vChannelID_1 <> vChannelID_2 then
if vChannelID_2 <> 0 then
response.write "<span style='color:#ff0000'>" & a1 & "</span>] "
end if
set MDB_Channel_ADO = Server.CreateObject( "ADODB.Recordset")
MDB_Channel_LinkStr = "select * from PE_Channel where ChannelID=" & vChannelID_1
MDB_Channel_ADO.open MDB_Channel_LinkStr,Conn,1,1
response.write "<a href='Admin_Article.asp?ChannelID=" & vChannelID_1 & "&Action=Manage&ManageType=&ClassID=0&SpecialID=0&Field=&keyword='>" & MDB_Channel_ADO("ChannelName") & "</a>["
MDB_Channel_ADO.close
set MDB_Channel_ADO=nothing
a1 = 1
vChannelID_2 = vChannelID_1
else
a1 = a1 + 1
end if
MDB_Article_ADO.movenext
loop
if vChannelID_2 <> 0 then
response.write "<span style='color:#ff0000'>" & a1 & "</span>] "
end if
%>
</td>
<td width="21"> </td>
</tr>
</table>
<%
end if
MDB_Article_ADO.close
set MDB_Article_ADO=nothing
%>
<%
Set MDB_Comment_ADO = Server.CreateObject("ADODB.Recordset")
MDB_Comment_LinkStr = "select * from PE_Comment where passed=False order by InfoID"
MDB_Comment_ADO.open MDB_Comment_LinkStr,Conn,1,1
vCommentCount(0) = 0
vChannelIDAry(0) = 0
vChannelName(0) = ""
x = 0
y = 0
do while not MDB_Comment_ADO.eof
vArticleID = MDB_Comment_ADO( "InfoID")
Set MDB_Article_ADO=Server.CreateObject( "ADODB.Recordset")
MDB_Article_LinkStr= "select * from PE_Article where ArticleID="& vArticleID &""
MDB_Article_ADO.open MDB_Article_LinkStr,Conn,1,1
vChannelID=MDB_Article_ADO( "ChannelID")
MDB_Article_ADO.close
set MDB_Article_ADO=nothing
if vChannelID = vChannelIDAry(x) then
vCommentCount(x) = vCommentCount(x) + 1
else
for y = 0 to x
if vChannelID = vChannelIDAry(y) then
exit for
end if
next
x = y
Set MDB_Channel_ADO=Server.CreateObject( "ADODB.Recordset")
MDB_Channel_LinkStr= "select * from PE_Channel where ChannelID=" &vChannelID &""
MDB_Channel_ADO.open MDB_Channel_LinkStr,Conn,1,1
vChannelIDAry(x) = MDB_Channel_ADO( "ChannelID")
vChannelName(x) = MDB_Channel_ADO( "ChannelName")
vCommentCount(x) = vCommentCount(x) + 1
MDB_Channel_ADO.close
set MDB_Channel_ADO=nothing
end if
MDB_Comment_ADO.movenext
loop
MDB_Comment_ADO.close
set MDB_Comment_ADO=nothing
%>
<%
dim vCommentCount1
vCommentCount1 = 0
for y=1 to x
vCommentCount1 = vCommentCount1 + vCommentCount(y)
next
if vCommentCount1 > 0 then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"> </td>
<td class="topbg" align="center"><span class="Glow">各 频 道 未 审 评 论 篇 数</span></td>
<td width="21"> </td>
</tr>
<tr>
<td width="20"> </td>
<td>
<%
for y=1 to x
response.write "<a href='Admin_Comment.asp?ChannelID=" & vChannelIDAry(y) & "'>" & vChannelName(y) & "</a>" & "[<span style='color:#ff0000'>" & vCommentCount(y) & "</span>] "
next
%>
</td>
<td width="21"> </td>
</tr>
</table>
<%
end if
%>
<%
Set MDB_User_ADO = Server.CreateObject("ADODB.Recordset")
MDB_User_LinkStr = "select * from PE_User where GroupID >=7 and GroupID <=8 order by GroupID"
MDB_User_ADO.open MDB_User_LinkStr,Conn,1,1
vNoApproveUser = 0
vTestUser = 0
do while not MDB_User_ADO.eof
if MDB_User_ADO("GroupID") = 7 then
vNoApproveUser = vNoApproveUser + 1
end if
if MDB_User_ADO("GroupID") = 8 then
vTestUser = vTestUser + 1
end if
MDB_User_ADO.movenext
loop
MDB_User_ADO.close
set MDB_User_ADO=nothing
%>
<%
if vNoApproveUser + vTestUser > 0 then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"> </td>
<td class="topbg" align="center"><span class="Glow">待 审 批 及 未 验 证 会 员 情 况</span></td>
<td width="21"> </td>
</tr>
<tr>
<td width="20"> </td>
<td>
<%
if vNoApproveUser > 0 then
response.write "<a href='Admin_User.asp?SearchType=11&GroupID=7'>" & "待审批会员" & "</a>" & "[<span style='color:#ff0000'>" & vNoApproveUser & "</span>] "
end if
if vTestUser > 0 then
response.write "<a href='Admin_User.asp?SearchType=11&GroupID=8'>" & "未验证会员" & "</a>" & "[<span style='color:#ff0000'>" & vTestUser & "</span>] "
end if
%>

</td>
<td width="21"> </td>
</tr>
</table>
<%
end if
%>

复制到/admin/admin_index_main.asp里面的下列代码之前:
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20" rowspan="2"> </td>
    <td width="400" align="center" class="topbg"><span class="Glow">建 站 管 理 快 捷 入 口</span></td>
    <td width="40" rowspan="2"> </td>
    <td width="400" align="center" class="topbg"><span class="Glow">日 常 管 理 快 捷 入 口</span></td>
    <td width="21" rowspan="2"> </td>

文章录入:雅虎    责任编辑:雅虎 
  • 上一个文章:

  • 下一个文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    软件产品
    SiteFactory™ 内容管理系统
    SiteFactory™ 网上商店系统
    SiteWeaver™ 内容管理系统
    SiteWeaver™ 网上商店系统
    SiteWeaver™ 企业门户网站系统
    SiteWeaver™ 教育门户网站系统
    SiteWeaver™ 政府门户网站系统
    SiteWeaver™ 行业门户网站系统
    平台产品
    企业服务
    行业解决方案
    联系我们 | 关于动易 | 网站地图 | 相关证书 | 合作伙伴 | 招贤纳士 | 法律条款 | 隐私权声明
    安全上网网上报警
    动易网络科技有限公司版权所有 © 2003-  粤ICP备05004015号
    公安备案编号:200603D0322 本站基于 PowerEasy® SiteWeaver™ 制作