📄 makelist.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/filesystem.asp"-->
<!--#include file="../../../inc/safe.asp"-->
<!--#include file="../index/temp_inc.asp"-->
<!--#include file="../makerole.asp"-->
<%
Set rs=Server.CreateObject("adodb.recordSet")
rs.Open ("select info_list from [Websen_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("info_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 Websen_newstype 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("type")
End If
End If
rs.Close
If ttid="" Then
ttid=0
End If
Response.Write "<b>已生成/要生成的二级分类:<font color=#FF0000>"¤tPage-1&"</font>/<font color=#FF0000><b>"&mpage&"</b></font>个"
If mpage<currentPage Then
Response.Write ",完成时间"&Now()&"</b> "
Else
msg_per_page=20
If Request("all")="all" Then
Set rs=Server.CreateObject("adodb.recordSet")
rs.Open ("select * from Websen_news where typeid="&ttid&" order by newsID desc"),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
HOPE_body=HOPE_body&"<table width='100%' border=0 cellpadding=2 cellspacing=0 bordercolor='#111111' style='border-collapse: collapse'>"&VbCrLf
Do While Not rs.Eof and rowcount > 0
HOPE_body=HOPE_body&"<tr "
If icolor=0 Then
HOPE_body=HOPE_body&"bgColor=#ffffff"
Else
HOPE_body=HOPE_body&"bgColor=#ffffff"
End If
HOPE_body=HOPE_body&">"&VbCrLf
If len(rs("title"))>30 Then
if rs("checkbox")=1 then
HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>· <a href='"&rs("http")&"' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf
else
HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>· <a href='"&HOPE_InstallDir&"info/detail/"&rs("typeid")&"-"&rs("newsid")&".html' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf
rs1("websen_http")=1
rs1.update
end if
Else
if rs("checkbox")=1 then
HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>· <a href='"&rs("http")&"' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf
else
HOPE_body=HOPE_body&"<td width='84%' style='font-size:12px;'>· <a href='"&HOPE_InstallDir&"info/detail/"&rs("typeid")&"-"&rs("newsid")&".html' target=_blank>"&left(rs("title"),20)&"...</a></td>"&VbCrLf
rs1("websen_http")=1
rs1.update
end if
End If
HOPE_body=HOPE_body&"<td width='16%' align=right> <p align='right' style=' color: #999999'>["&FormatDate(rs("dateandtime"),2)&"] </td>"&VbCrLf
HOPE_body=HOPE_body&"</tr>"&VbCrLf
icolor=icolor+1
If icolor>1 Then icolor=0
rowcount=rowcount-1
rs.MoveNext
Loop
End If
HOPE_body=HOPE_body&"</table>"
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>"&vbCrlf
HOPE_body=HOPE_body&"<TABLE cellSpacing=0 cellPadding=4 width=100% border=0>"&vbCrlf
HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
HOPE_body=HOPE_body&"<TR>"&vbCrlf
HOPE_body=HOPE_body&"<TD class=s noWrap align=middle><b>"&vbCrlf
'************** 分页开始 ***************
If not (rs.Eof and rs.Bof) Then
gopage=currentpage2
totalpage=mpage2
blockPage=Int((gopage-1)/5)*5+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>【←前5页</span> "
Else
HOPE_body=HOPE_body&"<span disabled>【</span><a href="&ttid&"-p"&blockPage-5&".html>←前5页</a> "
End If
i=1
Do Until i > 5 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="&ttid&"-p"&blockPage&".html>["&blockPage&"]</a> "
End If
blockPage=blockPage+1
i = i + 1
Loop
If blockPage > totalpage Then
HOPE_body=HOPE_body&" <span disabled>后5页→】"
Else
HOPE_body=HOPE_body&" <a href="&ttid&"-p"&blockPage&".html>后5页→</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="&ttid&"-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>【←前5页</span> "
Else
HOPE_body=HOPE_body&"<span disabled>【</span><a href="&ttid&"-p"&blockPage-5&".html>←前5页</a> "
End If
i=1
Do Until i > 5 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="&ttid&"-p"&blockPage&".html>["&blockPage&"]</a> "
End If
blockPage=blockPage+1
i = i + 1
Loop
If blockPage > totalpage Then
HOPE_body=HOPE_body&" <span disabled>后5页→】"
Else
HOPE_body=HOPE_body&" <a href="&ttid&"-p"&blockPage&".html>后5页→</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="&ttid&"-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>"
End If
Startinfo=((gopage-1)*msg_per_page)+1
Endinfo=gopage*msg_per_page
If Endinfo>totalrec Then Endinfo=totalrec
HOPE_body=HOPE_body&" 共 "&totalrec&" 条信息 当前显示第 "&Startinfo&" - "&Endinfo&" 条 每页 "&msg_per_page&" 条信息 共 "&mpage2&" 页"
End If
HOPE_body=HOPE_body&"</b></TD>"&vbCrlf
HOPE_body=HOPE_body&"</TR>"&vbCrlf
HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
HOPE_body=HOPE_body&"</TABLE></TD>"&vbCrlf
HOPE_body=HOPE_body&"</TR>"&vbCrlf
HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
HOPE_body=HOPE_body&"</TABLE>"&vbCrlf
sql1="select top 25 * from Websen_news where typeid="&ttid&" order by NewsID Desc"
Set rs1= Server.CreateObject("ADODB.RecordSet")
rs1.Open sql1,conn,1,1
If rs1.Eof Then
HOPE_New=HOPE_New&"<font color='#FFFFFF' class=white>此类暂无新增资讯</font>"
Else
Do While Not rs1.Eof
HOPE_New=HOPE_New&"<a href='"&HOPE_InstallDir&"info/detail/"&rs1("typeid")&"-"&rs1("newsid")&".html' target='_blank' class=white><font color='#FFFFFF'>"&rs1("title")&"</font></a> "
rs1.MoveNext
Loop
rs1.Close
End If
HOPE_Title=ttname&"资讯" '网页标题头
HOPE_TypeID=ttid
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&"info/community/"&ttid&".html"))
fout.Write pencat
fout.Close
End If
Set fout = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"info/community/"&ttid&"-p"&tttid&".html"))
fout.Write pencat
fout.Close
Else
Set sort_save = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"info/community/"&ttid&".html"))
sort_save.Write pencat
sort_save.Close
End If
Set fso = Nothing
If currentPage2<mpage2 Then
Response.Write "<br>已生成*页/此类共*页:<font color=#FF0000>"¤tPage2&"</font>/共<font color=#FF0000><b>"&mpage2&"</b></font>页,"
Response.Write "<meta http-equiv=Refresh content='0; URL=makelist.asp?all="&Request("all")&"&page="¤tPage&"&page2="&Cint(currentPage2+1)&"'>"
Else
Response.Write "<meta http-equiv=Refresh content='0; URL=makelist.asp?all="&Request("all")&"&page="¤tPage+1&"'>"
End If
End If
conn.Close
Set conn=Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -