📄 admin_updaters.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/function.asp" -->
<HTML><HEAD><TITLE>后台管理 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="admin.css" type=text/css rel=stylesheet>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<!-- #include file="admin_header.asp" -->
<table width="100%" border="0" cellspacing="2">
<tr>
<td width="20%" align="center" valign="top" class="tdbgleft"><!-- #include file="Admin_Left.asp" --></td>
<td class="b1" valign="top">
<%
if not isnull(cUserName) and cUserName<>"" then
if chkMaster(cUserName) then
set Rs=server.createobject("adodb.recordset")
select case request("action")
case "update_softNum"
call update_softNum()
case "update_articleNum"
call update_articleNum()
case "update_softRootID"
call update_softRootID()
case "update_ArticleRootID"
call update_ArticleRootID()
case else
call main()
end select
set rs=nothing
else
msgtitle="用户管理"
msginfo="<li>操作错误,你不是系统管理员,没有权限进行此项操作!</li>"
call Sysmsg(msgtitle,msginfo)
end if
else
msgtitle="用户管理"
msginfo="<li>操作错误,你没有登录系统!<li><a href=""User.Asp"">点此登录系统</a><li><a href=""./"">返回频道首页</a></li>"
call Sysmsg(msgtitle,msginfo)
end if
sub update_softNum()
dim sql1
sql="select * from SoftDown_Catalog"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
'Response.Write rs("CatalogID")&"."&rs("CatalogName")&"<br>"
if rs("Depth")=0 then
sql1=conn.execute("select count(softid) from SoftDown_SoftInfo Where RootID="&rs("RootID")&"")
else
sql1=conn.execute("select count(softid) from SoftDown_SoftInfo Where CatalogID="&rs("CatalogID")&" ")
end if
sql="update SoftDown_Catalog set SoftNum="&sql1(0)&" where CatalogID="&rs("CatalogID")&""
conn.execute(sql)
rs.movenext
loop
end if
rs.close
Response.Write "更新操作完成,请返回执行其他操作。"
end sub
sub update_articleNum()
dim sql2
sql="select * from info_Catalog"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
'Response.Write rs("CatalogID")&"."&rs("CatalogName")&"<br>"
if rs("Depth")=0 then
sql2=conn.execute("select count(articleid) from info_article Where RootID="&rs("RootID")&"")
else
sql2=conn.execute("select count(articleid) from info_article Where CatalogID="&rs("CatalogID")&"")
end if
sql2="update info_Catalog set SoftNum="&sql2(0)&" where CatalogID="&rs("CatalogID")&""
conn.execute sql
rs.movenext
loop
end if
rs.close
Response.Write "更新操作完成,请返回执行其他操作。"
end sub
sub update_softRootID()
sql="select * from SoftDown_Catalog where depth>0"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
sql="update SoftDown_SoftInfo set RootID="&rs("RootID")&" where CatalogID="&rs("CatalogID")
conn.execute sql
rs.movenext
loop
end if
rs.close
Response.Write "更新操作完成,请返回执行其他操作。"
end sub
sub update_ArticleRootID()
sql="select * from Info_Catalog where depth>0"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
sql="update info_Article set RootID="&rs("RootID")&" where CatalogID="&rs("CatalogID")
conn.execute sql
rs.movenext
loop
end if
rs.close
Response.Write "更新操作完成,请返回执行其他操作。"
end sub
sub main()
%>
<form name="form1" method="post" action="?action=update_softNum">
<strong>一、更新软件下载系统各分类的软件数统计 </strong>
<input type="submit" name="Submit" value="执行更新操作">
</form>
<form name="form1" method="post" action="?action=update_softRootID">
<strong>二、更新软件的所属大类。(一般在分类排序调整后进行) </strong>
<input type="submit" name="Submit" value="执行更新操作">
</form>
<form name="form1" method="post" action="?action=update_articleNum">
<strong>三、更新网络学院系统各分类的文章数统计 </strong>
<input type="submit" name="Submit" value="执行更新操作">
</form>
<form name="form1" method="post" action="?action=update_ArticleRootID">
<strong>四、更新文章的所属大类。(一般在分类排序调整后进行)</strong>
<input type="submit" name="Submit" value="执行更新操作">
</form>
<% end sub%>
</td>
</tr>
</table>
<!-- #include file="admin_footer.asp" -->
</BODY></HTML>
<% CloseDatabase %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -