admin_htmldownsort.asp

来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 96 行

ASP
96
字号
<%@ LANGUAGE = VBScript %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>生成下载分类页面</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="Admin_htmlconfig.asp"-->
<BODY>
<%
Dim quanxian
quanxian=trim(Request.ServerVariables(name))

if Instr(session("AdminPurview"),"|34,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
  response.end
end if
if ISHTML = 0 then
  response.Write "<script language='javascript'>alert('请先在【系统参数配置】中将静态HTML设置为开启!');history.go(-1);</script>"
  response.End
end If
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <th>下载检索及分类查看:添加,修改,删除,生成下载信息</th>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  class="forumrow"><a href="DownEdit.asp?Result=Add" onClick='changeAdminFlag("添加下载信息")'>添加下载信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="DownList.asp" onclick='changeAdminFlag(&quot;产品列表&quot;)'>查看所有下载信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="DownSort.asp?Action=Add&amp;ParentID=0" onclick='changeAdminFlag(&quot;添加下载类别&quot;)'>添加下载类别</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmldownsort.asp" onClick='changeAdminFlag("生成下载分类页面")'>生成下载分类页面</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_htmldown.asp" onclick='changeAdminFlag(&quot;生成下载详细页面&quot;)'>生成下载详细页面</a></td>
  </tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>    <td width="300" class="forumrow"><table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr>
          <td style="border-bottom: #ccc 1px solid; border-top: #ccc 1px solid; border-left: #ccc 1px solid; border-right: #ccc 1px solid"><img src="Images/Survey.gif" width="0" height="16" id="bar_img" name="bar_img" align="absmiddle"></td>
        </tr>
      </table></td>
    <td class="forumrowhighlight"><span id="bar_txt2" name="bar_txt2" style="font-size:12px; color:red;"></span><span id="bar_txt1" name="bar_txt1" style="font-size:12px">0</span><span style="font-size:12px">%</span></td>
  </tr>
</table>
</BODY>
</HTML>
<%
totalrec=Conn.Execute("Select count(*) from LiangJingCMS_Download Where ViewFlagCH")(0)
totalpage=int(totalrec/DownInfo)
If (totalpage * DownInfo)<totalrec Then
totalpage=totalpage+1
End If
if totalpage<=1 then
call htmll("/CH/","/CH/",""&DownSortName&""&Separated&"1."&HTMLName&"","DownList.asp","Page=",1,"","")
call htmll("/EN/","/EN/",""&DownSortName&""&Separated&"1."&HTMLName&"","DownList.asp","Page=",1,"","")
else
for i=1 to totalpage
call htmll("/CH/","/CH/",""&DownSortName&""&Separated&""&i&"."&HTMLName&"","DownList.asp","Page=",i,"","")
call htmll("/EM/","",""&DownSortName&""&Separated&""&i&"."&HTMLName&"","DownList.asp","Page=",i,"","")
next
end If
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from LiangJingCMS_DownSort order by ID desc"
rs.open sql,conn,1,1
If rs.eof Then 
	Class_Num=0
Else 
	Class_Num=1
do while not rs.eof
ID=rs("ID")
totalrec=Conn.Execute("Select count(*) from LiangJingCMS_Download where ViewFlagCH and SortID="&ID&"")(0)
totalpage=int(totalrec/DownInfo)
If (totalpage * DownInfo)<totalrec Then
totalpage=totalpage+1
End If
if totalpage<=1 then
call htmll("/CH/","/CH/",""&DownSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&"","DownList.asp","SortID=",ID,"Page=",1)
call htmll("/EN/","/EN/",""&DownSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&"","DownList.asp","SortID=",ID,"Page=",1)
else
for i=1 to totalpage
call htmll("","CH",""&DownSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&"","DownList.asp","SortID=",ID,"Page=",i)
call htmll("","EN",""&DownSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&"","DownList.asp","SortID=",ID,"Page=",i)
next
end If
Response.Write "<script>bar_img.width="&Fix((Class_Num/rs.recordcount)*300)&";"
Response.Write "bar_txt1.innerHTML=""成功生成"&Class_Num*2&"个分类的HTML静态页面。完成比例:" & formatnumber(Class_Num/rs.recordcount*100) & """;</script>"
Response.Flush
rs.movenext
Class_Num=Class_Num+1
Loop
End If
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?