⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makelist.asp

📁 网胜B2B电子商务蓝色风格2008SP6.0.1普及版
💻 ASP
字号:
	<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无效
 dir="no"
 numid="no"
   %>
   	<!--#include file="../../../conn/conn.asp"-->
	<!--#include file="../../../inc/safe.asp"-->
	<!--#include file="../../../inc/classcount.asp"-->
	<!--#include file="../../../inc/filesystem.asp"-->
	<!--#include file="../index/temp_inc.asp"-->
   <!--#include file="../makerole.asp"-->
<%
 	

 	
  	Set rs=Server.CreateObject("adodb.recordSet")
	rs.Open ("select expo_type from [Websen_worldec_Temp] where yx_selected=1"),conn,1,1
	If rs.Eof Then 
	 Response.Write("<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>对不起!该模版不存在!</font><a href='#' onclick='javascript:window.close();'>关闭</a>")
	 Response.End()
	 End If
	If Not rs.Eof Then
 	pencat=rs("expo_type")
	

	
	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 Websen_expotype order by ID 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("ID")
			 ttname=rs("type")
		   End If
		 End If
		 rs.Close
		 
		 If ttid="" Then
		  ttid=0
		 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
 		 msg_per_page=10
		 If Request("all")="all" Then
		 sql="select * from Websen_expo where sh=1"
		 If ttname="CN" Then sql=sql&" and holdCountry='CN'"
		 If ttname="EN" Then sql=sql&" and holdCountry<>'CN'"
		 sql=sql&" order by id desc"
		 Set rs=Server.CreateObject("adodb.recordSet")
		 rs.Open sql,conn,1,1
		 End If
		 If not rs.Eof Then
		 totalrec=RS.RecordCount 
		 rs.pagesize=msg_per_page  
		 mpage2=rs.pagecount     
		 rowcount=msg_per_page
		 rs.move  (currentPage2-1)*MaxPerPage
		   If mpage2>=currentPage2 Then
			 tttid=currentPage2
		   End If
		 End If
	%>
	<!--#include file="../../../inc/headpage_html.asp"-->
	<%
	If rs.Eof Then
	HOPE_body=HOPE_body&"<br><br><div align='center' class='s'>此类暂无展会信息</div><br>"&vbCrlf
	Else
	do while not rs.Eof and rowcount > 0
	gj=trim(rs("holdcountry"))
	if gj="" or  gj="CN" then 
		holdcountry="中国大陆"
	elseif gj="HK" then
		holdcountry="中国香港"
	elseif gj="AO" then
		holdcountry="中国澳门"
	elseif gj="TW" then
		holdcountry="中国台湾"
	elseif gj="QT" then
		holdcountry="其他国家"
	else
		holdcountry="中国大陆"
	end if  
	
	
	
	HOPE_body=HOPE_body&"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"" bgcolor=""#e1e1e1"" align=""center"">"&VbCrLf
	HOPE_body=HOPE_body&"        <tr>"&VbCrLf
	HOPE_body=HOPE_body&"          <td> <table width=""100%"" border=""0"" cellpadding=""5"" cellspacing=""1"">"&VbCrLf
	HOPE_body=HOPE_body&"              <tr> "&VbCrLf
	HOPE_body=HOPE_body&"                <td height=""31"" bgcolor=""#F6F6F6""> <a href="&HOPE_InstallDir&"service/expo/detail/"&rs("id")&".html target=""_blank"" title="""&rs("title")&"""><font color=red>["&holdcountry&"]</font>&nbsp;"&VbCrLf
	
	If rs("tj")<>"0" Then
	HOPE_body=HOPE_body&rs("title")&"</a> <img src="&HOPE_InstallDir&"images/thanx.gif width=""19"" height=""19"" align=""absmiddle"" alt=""推荐展会"">"&VbCrLf
	Else
	HOPE_body=HOPE_body&""&rs("title")&"</a>"&VbCrLf
	End If
	HOPE_body=HOPE_body&"</td>"&VbCrLf
	HOPE_body=HOPE_body&"              </tr>"&VbCrLf
	HOPE_body=HOPE_body&"              <tr> "&VbCrLf
	HOPE_body=HOPE_body&"                <td bgcolor=""#F6F6F6"" class=""f2"">展会日期:"&FormatDate(rs("beginDate"),1)&"-"&FormatDate(rs("endDate"),1)&" <br /><DIV style=""PADDING-TOP: 2px""></DIV>"&VbCrLf
	HOPE_body=HOPE_body&"                  展会地点:"&rs("place")&"</td>"&VbCrLf
	HOPE_body=HOPE_body&"              </tr>"&VbCrLf
	HOPE_body=HOPE_body&"            </table></td>"&VbCrLf
	HOPE_body=HOPE_body&"        </tr>"&VbCrLf
	HOPE_body=HOPE_body&"</table><br>"&VbCrLf
	icolor=icolor+1
	If icolor>1 Then icolor=0
	rowcount=rowcount-1
	rs.movenext
	loop
	End If
	
 
		
	 HOPE_body=HOPE_body&"<br>"&vbCrlf
	HOPE_body=HOPE_body&"<TABLE width='100%' border=0 align=center cellPadding=1 cellSpacing=0 style='BORDER-TOP: #9C9A9C 1px solid;BORDER-Bottom: #9C9A9C 1px solid'>"&vbCrlf
	HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
	HOPE_body=HOPE_body&"<TR>"&vbCrlf
	HOPE_body=HOPE_body&"<TD><DIV style=""PADDING-TOP: 5px""></DIV>"&vbCrlf
	HOPE_body=HOPE_body&"<TABLE cellSpacing=0 cellPadding=4 width=100% border=0 bgcolor=""#F7F7F7"" cellpadding=""4"">"&vbCrlf
	HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
	HOPE_body=HOPE_body&"<TR>"&vbCrlf
	HOPE_body=HOPE_body&"<TD class=M noWrap align=middle>"&vbCrlf
	''************** 分页开始 ***************
	   if not (rs.eof and rs.bof) then
	 gopage=currentpage2
		totalpage=mpage2
		blockPage=Int((gopage-1)/10)*10+1
		
		If LCase(Request.ServerVariables("HTTPS")) = "off" Then 
	   strTemp = "http://" 
		 Else 
		strTemp = "https://" 
		 End If 
		 
	   strTemp = strTemp & CheckStr(Request.ServerVariables("SERVER_NAME")) 
		 If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & CheckStr(Request.ServerVariables("SERVER_PORT")) 
		strTemp = strTemp & CheckStr(Request.ServerVariables("URL"))
		lenstrTemp=len(strTemp)+1	
		if instr(left(linkfile,lenstrTemp),"?")>0 then 
 		if blockPage = 1 Then
	 HOPE_body=HOPE_body&"<span disabled>【←前10页</span>&nbsp;"
		Else
	 HOPE_body=HOPE_body&"<span disabled>【</span><a href="&ttname&"-p"&blockPage-10&".html>←前10页</a>&nbsp;"
		End If
 	   i=1
		Do Until i > 10 or blockPage > mpage2
		 If blockPage=int(gopage) Then
	 HOPE_body=HOPE_body&"<font color=#FF0000>[<b>"&blockPage&"</b>]</font>"
		Else
	 HOPE_body=HOPE_body&" <a href="&ttname&"-p"&blockPage&".html>["&blockPage&"]</a> "
		 End If
		 blockPage=blockPage+1
		 i = i + 1
		 Loop
		if blockPage > totalpage Then
	 HOPE_body=HOPE_body&"&nbsp;<span disabled>后10页→】"
		Else
	 HOPE_body=HOPE_body&"&nbsp;<a href="&ttname&"-p"&blockPage&".html>后10页→</a><span disabled>】"
		End If 
	 HOPE_body=HOPE_body&" 直接到第 "
	 HOPE_body=HOPE_body&"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
		 for i=1 to totalpage
	 HOPE_body=HOPE_body&"<option value="&ttname&"-p" & i & ".html"
		 if i=gopage then HOPE_body=HOPE_body&"   selected"
	 HOPE_body=HOPE_body&">"&i&"</option>"
		 next
	 HOPE_body=HOPE_body&"</select>"
	 HOPE_body=HOPE_body&" 页<Br><Br>"
		else
			if blockPage = 1 Then
	 HOPE_body=HOPE_body&"<span disabled>【←前10页</span>&nbsp;"
		Else
	 HOPE_body=HOPE_body&"<span disabled>【</span><a href="&ttname&"-p"&blockPage-10&".html>←前10页</a>&nbsp;"
		End If
	   j=1
	   Do Until j > 10 or blockPage > mpage2
		 If blockPage=int(gopage) Then
	 HOPE_body=HOPE_body&"<font color=#FF0000>[<b>"&blockPage&"</b>]</font>"
		Else
	 HOPE_body=HOPE_body&" <a href="&ttname&"-p"&blockPage&".html>["&blockPage&"]</a> "
		 End If
		blockPage=blockPage+1
		 j =j + 1
		Loop
		if blockPage > totalpage Then
	 HOPE_body=HOPE_body&"&nbsp;<span disabled>后10页→】"
		Else
	 HOPE_body=HOPE_body&"&nbsp;<a href="&ttname&"-p"&blockPage&".html>后10页→</a><span disabled>】"
		End If 
	 HOPE_body=HOPE_body&" 直接到第 "
	 HOPE_body=HOPE_body&"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
		for k=1 to totalpage
	 HOPE_body=HOPE_body&"<option value="&ttname&"-p" & k & ".html"
		 if k=gopage then HOPE_body=HOPE_body&"   selected"
	 HOPE_body=HOPE_body&">"&k&"</option>"
		 next
	 HOPE_body=HOPE_body&"</select>"
	 HOPE_body=HOPE_body&" 页<Br><Br>"
 		End If
 		Startinfo=((gopage-1)*msg_per_page)+1
		Endinfo=gopage*msg_per_page
		if Endinfo>totalrec then Endinfo=totalrec
	 HOPE_body=HOPE_body&"&nbsp;&nbsp;共 "&totalrec&" 条信息 当前显示第 "&Startinfo&" - "&Endinfo&" 条 每页 "&msg_per_page&" 条信息 共 "&mpage2&" 页"
	 end if
	 
	HOPE_body=HOPE_body&"</TD>"&vbCrlf
	HOPE_body=HOPE_body&"</TR>"&vbCrlf
	HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
	HOPE_body=HOPE_body&"</TABLE><DIV style=""PADDING-TOP: 5px""></DIV></TD>"&vbCrlf
	HOPE_body=HOPE_body&"</TR>"&vbCrlf
	HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
	HOPE_body=HOPE_body&"</TABLE>"&vbCrlf
 	  rs.close	
  		If ttname="ALL" Then
		HOPE_Title=HOPE_Title&"所有展会-"&webname&"" '网页标题头
		End If
		If ttname="CN" Then
		HOPE_Title=HOPE_Title&"国内展会-"&webname&"" '网页标题头
		End If
		If ttname="EN" Then
		HOPE_Title=HOPE_Title&"国际展会-"&webname&"" '网页标题头
		End If
 
  	 	 pencat=Hope_HtmlResult(pencat)
  
	Set fso = YXFSO
	If mpage2>1 Then
	If Cint(Request("page2"))<1 Then
	Set fout = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"service/expo/list/"&ttname&".html"))
	fout.Write pencat
	fout.Close
	End If
	Set fout = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"service/expo/list/"&ttname&"-p"&tttid&".html"))
	fout.Write pencat
	fout.Close
	
	Else
	Set sort_save = fso.CreateTextFile(Server.mappath(HOPE_InstallDir&"service/expo/list/"&ttname&".html"))
	sort_save.Write pencat
	sort_save.Close
	End If
	
	Set fso = nothing
	If currentPage2<mpage2 Then
	  Response.Write "<br>已生成*页/此类共*页:<font color=#FF0000>"&currentPage2&"</font>/共<font color=#FF0000><b>"&mpage2&"</b></font>页,"
	  Response.Write "<meta http-equiv=Refresh content='0; URL=makelist.asp?all="&Request("all")&"&page="&currentPage&"&page2="&Cint(currentPage2+1)&"'>"
	Else
	  Response.Write "<meta http-equiv=Refresh content='0; URL=makelist.asp?all="&Request("all")&"&page="&currentPage+1&"'>"
	End If
	End If
  

  conn.Close
  Set conn=nothing
%>

⌨️ 快捷键说明

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