makelist.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 134 行

ASP
134
字号
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charSet=gb2312">
	<title>生成帮助信息分类</title>
	<style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		background-color: #E4EDF9;
	}
	body,td,th {
		font-size: 12px;
	}
	-->
	</style>
	</head>
<body>




	<% data_path="../../../" 'ACC连接数据库路径,对SQL无效 %>
	<!--#include file="../../../conn/conn.asp"-->
	<!--#include file="../../../inc/safe.asp"-->
	<!--#include file="../../../inc/filesystem.asp"-->
	<!--#include file="../../../inc/classcount.asp"-->
	<!--#include file="../index/temp_inc.asp"-->

<%
	If Session("globalecmaster")="" or  Session("adminid")="" Then
              Response.write "<script language='javascript'>"
              Response.write"alert('对不起!请重新登陆!');parent.location.href='"&HOPE_InstallDir&"';</SCRIPT>" 
              Response.End
  	 End If
%>	<%
 	Set rs=Server.CreateObject("adodb.recordSet")
	rs.Open ("select help_list from [Yixiang_worldec_Temp] where yx_selected=1"),conn,1,1
 	If rs.Eof Then 
	 Response.Write("<br><br>     <font color=red>对不起!该模版不存在!</font><a href='#' onclick='javascript:window.close();'>关闭</a>")
	 Response.End()
	 End If
	If Not rs.Eof Then
	pencat=rs("help_list")
	rs.Close
	End If
    If Request("page")<>"" Then
      If Cint(Request("page"))<1 Then
         currentPage=1
      Else
         currentPage=Cint(Request("page"))
      End If
   Else        
      currentPage=1        
   End If
   
      If Request("page2")<>"" Then
      If Cint(Request("page2"))<1 Then
         currentPage2=1
      Else
         currentPage2=Cint(Request("page2"))
      End If
   Else        
      currentPage2=1        
   End If
      MaxPerPage=1
     If Request("all")="all" Then
	 Set rs=Server.CreateObject("adodb.recordSet")
        rs.Open ("select * from Yixiang_help_type order by typeID desc"),conn,1,1
     End If
     If not rs.Eof Then
     rs.Pagesize=MaxPerPage
     mpage=rs.Pagecount     
      rs.move  (currentPage-1)*MaxPerPage
       If mpage>=currentPage Then
         ttid=rs("typeID")
		 ttname=rs("typename")
         sttid=rs("sortID")
       End If
     End If
      
	 If ttid="" Then
	  ttid=0
	 End If
	 If sttid="" Then 
	 sttid=0
	 End If 
	sortsql="select * from Yixiang_help_sort where sortid="&sttid&""   
	Set rssort=Server.CreateObject("ADODB.Recordset")
	rssort.Open sortsql,conn,1,1
	If Not rssort.Eof Then
	sortname=rssort("sort")
	rssort.Close
	 End If
	 Response.Write "<b>已生成/要生成的分类:<font color=#FF0000>"&currentPage-1&"</font>/<font color=#FF0000><b>"&mpage&"</b></font>个"
	If mpage<currentPage Then
	Response.Write ",完成时间"&Now()&"</b> "
	Else
	'************** 生成HTML页 开始 ***************
	If Request("all")="all" Then
	Set rs=Server.CreateObject("adodb.recordSet") 
	sql="select * from Yixiang_help where typeid="&ttid&""
	sql=sql&" order by -ID desc"
	Set rs= Server.CreateObject("ADODB.RecordSet") 
	rs.Open sql,conn,1,1
	If rs.Eof Then
	HOPE_body=HOPE_body&"<br><br><font color=#cccccc>暂无数据信息</font>   <br><br>"
	Else
	Do While Not rs.Eof
	HOPE_body=HOPE_body&"<div class=""smalltoppad""></div>"
	HOPE_body=HOPE_body&"·<a href="&HOPE_InstallDir&"help/bin/detail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("id")&".html target=_blank>"&rs("showname")&"</a><br>"&vbCrlf
	rs.MoveNext
	Loop
	End If
	End If
	HOPE_Tiname=sortname
	HOPE_Title=ttname
 
	pencat=Hope_HtmlResult(pencat)
	
 	
	Set fso = YXFSO
	Set sort_save = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"help/bin/info/"&sttid&"-"&ttid&".html"))
	sort_save.Write pencat
	sort_save.Close
 	  Response.Write "<meta http-equiv=Refresh content='0; URL=makelist.asp?all="&Request("all")&"&page="&currentPage+1&"'>"
	End If
 	rs.Close
	Set rs=Nothing
	conn.Close
	Set conn=Nothing
	%>

⌨️ 快捷键说明

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