📄 create_soft_list.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">
<% sub main() %>
<SCRIPT LANGUAGE=javascript>
function SelectAll() {
for (var i=0;i<document.selform.selType.length;i++) {
var e=document.selform.selType[i];
e.checked=!e.checked;
}
}
</script>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" >
<tr>
<th colspan="2" class="tdbg1">批量生成分软件列表静态网页</th>
</tr>
<tr class="tdbg2">
<td colspan="2" style="line-height: 150%"><font color="#FF0000">说明:</font>本系统提供十种软件列表排序方式,根据软件数量及服务器性能不同,生成的时间也不同,一般2000个软件12个分类,每页15个软件每种排序列表文件生成时间需要1分钟左右,建议每天批量更新软件两次,每次按时间降序排列生成一次,其他排序方式可以每两天批量生成一次。</td>
</tr>
<form action="" method="post" name="selform">
<tr class="tdbg2">
<td width="25" nowrap>选择</td>
<td width="94%">排序方式 (说明:降序是从大到小,升序是从小到大)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="1" checked></td>
<td>第一种:按 整理时间 降序 排列(order by SoftTime desc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="2"></td>
<td>第二种:按 整理时间 升序 排列(order by SoftTime asc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="3"></td>
<td>第三种:按 软件名称 降序 排列(order by SoftName desc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="4"></td>
<td>第四种:按 软件名称 升序 排列(order by SoftName asc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="5"></td>
<td>第五种:按 软件大小 降序 排列(order by SoftSize desc)</td>
</tr>
<tr class="tdbg2">
<td width="25" height="21"> <input name="selType" type="checkbox" id="selType" value="6"></td>
<td>第六种:按 软件大小 升序 排列(order by SoftSize asc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="7"></td>
<td>第七种:按 下载次数 降序 排列(order by AllHits desc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="8"></td>
<td>第八种:按 下载次数 升序 排列(order by AllHits asc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="9"></td>
<td>第九种:按 软件等级 降序 排列(order by Rank desc)</td>
</tr>
<tr class="tdbg2">
<td width="25"> <input name="selType" type="checkbox" id="selType" value="10"></td>
<td>第十种:按 软件等级 升序 排列(order by Rank asc) </td>
</tr>
<tr class="tdbg2">
<td colspan="2">(<input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()">
选择/反选) (每页显示软件个数:<input name="MaxPerPage" type="text" id="MaxPerPage" value="18" size="3" maxlength="2">) (<input type="checkbox" name="force" value="yes">设置生成全部,否则只生成更新过的分类) </td>
</tr>
<tr class="tdbg2">
<td colspan="2" align="center">
<input type="submit" name="Submit" value="执行操作"></td>
</tr>
<tr class="tdbg2">
<td width="25">提示</td>
<td>每页显示的数量越多,服务器执行速度越快;系统第一次使用必须全部生成一次。</td>
</tr>
</form>
</table>
<%
end sub
if not isnull(cUserName) or cUserName<>"" then
if chkMaster(cUserName) then
if Trim(Request.Form("MaxPerPage"))<>"" then
if isInteger(Trim(Request.Form("MaxPerPage"))) then
Server.ScriptTimeOut=9999999
dim fso,CateRs,HtmlFileName,HtmlTemplate,HtmlContent,listContent,i,n,ii,selType,MaxPerPage,totalPut,CurrentPage,TotalPages,strOrderName,strBy1,strBy2
dim strTitle,strNavigate,strCateNav,strCateTop,strSoftList
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set Rs=server.createobject("adodb.recordset")
Set CateRs=server.createobject("adodb.recordset")
'读取默认模板
sql="select ID,Header,Footer,SoftList_htm from "&CategoryName&"_Template where isActive=true"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "您没有添加模板,或者没有设置默认模板。"
response.end
else
HtmlTemplate=rs("Header")&rs("SoftList_htm")&rs("Footer")
end if
rs.close
if Trim(Request.Form("force"))="yes" then
sql="select * from "&CategoryName&"_Catalog"
else
sql="select * from "&CategoryName&"_Catalog where isUpdate=1"
end if
CateRs.open sql,conn,1,1
if not(CateRs.eof and CateRs.bof) then
do while not CateRs.eof
selType=split(Trim(Request.Form("selType")),",")
for ii = 0 to ubound(selType)
select case trim(selType(ii))
case "1"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"SoftTime","Desc","Asc",CateRs("Depth"),CateRs("RootID"))
case "2"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"SoftTime","Asc","Desc",CateRs("Depth"),CateRs("RootID"))
case "3"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"SoftName","Desc","Asc",CateRs("Depth"),CateRs("RootID"))
case "4"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"SoftName","Asc","Desc",CateRs("Depth"),CateRs("RootID"))
case "5"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"SoftSize","Desc","Asc",CateRs("Depth"),CateRs("RootID"))
case "6"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"SoftSize","Asc","Desc",CateRs("Depth"),CateRs("RootID"))
case "7"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"AllHits","Desc","Asc",CateRs("Depth"),CateRs("RootID"))
case "8"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"AllHits","Asc","Desc",CateRs("Depth"),CateRs("RootID"))
case "9"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"Rank","Desc","Asc",CateRs("Depth"),CateRs("RootID"))
case "10"
msginfo = msginfo & Create_SoftList_Cate(CateRs("CatalogID"),""&CateRs("CatalogName")&"",Trim(Request.Form("MaxPerPage")),"Rank","Asc","Desc",CateRs("Depth"),CateRs("RootID"))
case else
msginfo="你没有选择排序方式,系统没有执行任何操作!"
end select
next
CateRs.movenext
loop
end if
CateRs.close
set CateRs=Nothing
if Trim(Request.Form("selType"))="" then
msginfo="你没有选择排序方式,系统没有执行任何操作!"
else
sql="update SoftDown_Catalog set isUpdate=0"
conn.execute sql
end if
msgtitle="批量生成分类软件列表静态网页"
call Sysmsg(msgtitle,msginfo)
Set Rs=nothing
Set fso=nothing
else
msgtitle="批量生成大类软件列表静态网页"
msginfo="输入的软件个数不是整数。"
call Sysmsg(msgtitle,msginfo)
end if
else
call main()
end if
else
msgtitle="批量生成大类软件列表静态网页"
msginfo="<li>操作错误,你不是系统管理员,没有权限进行此项操作!</li>"
call Sysmsg(msgtitle,msginfo)
end if
else
msgtitle="批量生成大类软件列表静态网页"
msginfo="<li>操作错误,你没有登录系统!<li><a href=""User.Asp"">点此登录系统</a></li>"
call Sysmsg(msgtitle,msginfo)
end if
function Create_SoftList_Cate(CatalogID,CatalogName,MaxPerPage,strOrderName,strBy1,strBy2,isDepth,RootID)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -