📄 makelist.asp
字号:
<%Admin="InfoMake"%>
<!--#include file="check.asp"-->
<!--#include file="mdb_path_info.asp"-->
<%
'#################################################################
'# 晓宇听幽网站内容管理系统(xoYu CMS)
'#
'# 版权所有: 晓宇听幽工作室
'#
'# 制作人 : xoyu(晓宇)
'#
'# 主页地址: http://www.xoYu.com 晓宇听幽工作室
'# 论坛地址: http://www.xoYu.com/bbs/ 晓宇听幽讨论区
'#
'#【版权声明】
'#################################################################
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓!
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'#################################################################
'# 程序名称:晓宇听幽网站内容管理系统·新闻文章管理系统
'# 英文名称:xoYu News 2004 Professional For xoYu CMS
'# 程序创建时间:2003-7-10
'# 程序完成时间:2003-9-11
'# 最后修改时间:2003-11-15
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作
'# 如有任何问题请到我们的论坛(http://www.xoyu.com/bbs/)告诉我们。
'#################################################################
set rs=server.createobject("adodb.recordset")
set rs_info=server.CreateObject("ADODB.RecordSet")
set rs_yl=server.CreateObject("ADODB.RecordSet")
set rsm=server.createobject("adodb.recordset")
tid=request("tid")
currentPage=cint(request("page"))
MaxPerPage=cint(request("MaxPerPage"))
rs.open "select * from infotype where id="&tid,conn,1,1
MbName=rs("MbName")
imageshu=rs("imageshu")
imagelen=rs("imagelen")
imagewid=rs("imagewid")
Imagevshu=rs("Imagevshu")
imagevlen=rs("imagevlen")
imagevwid=rs("imagevwid")
newshuset=rs("newshuset")
topshu=rs("topshu")
toplen=rs("toplen")
chalen=rs("chalen")
TypePic="<img border=""0"" src="""&rs("TypePic")&""">"
TypePicmore="<img border=""0"" src="""&rs("TypePicmore")&""">"
rs.close
rsm.open "select * from mb where id="&mbname,conn,1,1
pencat=rsm("MbContent")
rsm.close
newshu=newshuset '每个分类显示最新文章数
search=search&"<form method=""post"" action=""../search.asp"">"
search=search&"<input name=""k"" size=""15"" style=""border: 1px dotted #42A5F7; "">"
search=search&"<br>"
search=search&"<select name=""kt"">"
search=search&"<option value=""../search.asp?type=title&k="""">按照标题搜索</option>"
search=search&"<option value=""../search.asp?type=info&k="""">按照内容搜索</option>"
search=search&"</select><br>"
search=search&"<input name=""Submit"" src=""../images/d_search.gif"" type=""image"" value=""Submit"" align=""absmiddle"" border=""0"">"
function xoYuTitle(content)
if content<>"" then
xoYuTitle=content
xoYuTitle=replace(xoYuTitle,"[加粗]","<b>")
xoYuTitle=replace(xoYuTitle,"[倾斜]","<i>")
xoYuTitle=replace(xoYuTitle,"[下划线]","<u>")
xoYuTitle=replace(xoYuTitle,"[删除线]","<s>")
if instr(1,xoYuTitle,"<b>",1)<>0 then xoYuTitle=xoYuTitle+"</b>"
if instr(1,xoYuTitle,"<i>",1)<>0 then xoYuTitle=xoYuTitle+"</i>"
if instr(1,xoYuTitle,"<u>",1)<>0 then xoYuTitle=xoYuTitle+"</u>"
if instr(1,xoYuTitle,"<s>",1)<>0 then xoYuTitle=xoYuTitle+"</s>"
xoYuTitle=replace(xoYuTitle,"[红色]","<font color=ff0000>")
xoYuTitle=replace(xoYuTitle,"[蓝色]","<font color=blue>")
xoYuTitle=replace(xoYuTitle,"[绿色]","<font color=green>")
xoYuTitle=replace(xoYuTitle,"[紫色]","<font color=990099>")
xoYuTitle=replace(xoYuTitle,"[酱色]","<font color=790000>")
xoYuTitle=replace(xoYuTitle,"[橙色]","<font color=FF6600>")
if instr(1,xoYuTitle,"<font",1)<>0 then xoYuTitle=xoYuTitle+"</font>"
xoYuTitle=replace(xoYuTitle,"[建议]","<font color=red>[建议]</font>")
xoYuTitle=replace(xoYuTitle,"[注意]","<font color=red>[注意]</font>")
xoYuTitle=replace(xoYuTitle,"[下载]","<font color=red>[下载]</font>")
xoYuTitle=replace(xoYuTitle,"[公告]","<font color=red>[公告]</font>")
xoYuTitle=replace(xoYuTitle,"[转载]","<font color=red>[转载]</font>")
xoYuTitle=replace(xoYuTitle,"[焦点]","<font color=red>[焦点]</font>")
xoYuTitle=replace(xoYuTitle,"[社会]","<font color=red>[社会]</font>")
xoYuTitle=replace(xoYuTitle,"[推荐]","<font color=red>[推荐]</font>")
xoYuTitle=replace(xoYuTitle,"[原创]","<font color=red>[原创]</font>")
end if
End function
'################ 读取标题 等.. 开始 ################
rs.open "select * from infotype where id="&tid,conn,1,1
if not rs.eof then
ts=rs("ts")
TN=split(rs("tname"),"|")
TI=split(rs("ts"), ",")
for i = 0 to ubound(TN)-1
if i=ubound(TN)-2 and ubound(TN)>1 then
TTY_id=TI(i)
TTY_name=TN(i)
end if
all_type_top_id=TI(i)
all_type_name=TN(i)
thistype=thistype & " > <a href=""../list/list_"&TI(i)&"_1.html"">"&TN(i)&"</a>"
thistitle=thistitle & " - "&TN(i)&""
next
end if
rs.close
sql="select * from infotype where ts like '"&ts&"%'"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
sqqq=sqqq& ""&rs("id")&", "
rs.MoveNext
loop
end if
rs.close
''########读取下级分类
rs.open "select * from infotype where tn="&tid&" order by id",conn,1,1
if NOT rs.EOF then
TTY="NO"
Tname=all_type_name
i=0
do while NOT rs.EOF
TTNN=split(rs("tname"),"|")(rs("tj")-1)
TXlist=TXlist&"<a href=""../list/list_"&rs("id")&"_1.html""><font color=""#000000"">"&TTNN&"</font></a> | "
i = i + 1
if i mod 6 =0 then
TXlist=TXlist&"<br>"
end if
rs.MoveNext
loop
end if
rs.close
if TTY_id<>"" and TTY<>"NO" then
rs.open "select * from infotype where tn="&TTY_id&" order by id",conn,1,1
if NOT rs.EOF then
Tname=TTY_name
i=0
do while NOT rs.EOF
TTNN=split(rs("tname"),"|")(rs("tj")-1)
TXlist=TXlist&"<a href=""../list/list_"&rs("id")&"_1.html""><font color=""#000000"">"&TTNN&"</font></a> | "
i = i + 1
if i mod 6 =0 then
TXlist=TXlist&"<br>"
end if
rs.MoveNext
loop
end if
rs.close
end if
'读取文章分类列表
sql="select * from infotype where tn="&tid&" order by id"
rs.open sql,conn,1,1
if NOT rs.EOF then
allshu=rs.recordcount
Dim list_1(20)
Dim list_2(20)
Dim list_3(20)
do while NOT rs.EOF
ii=ii+1
list_1(ii)="<b><a href=""List_"&rs("id")&"_1.html""><font color=""#000000"">"&split(rs("tname"),"|")(rs("tj")-1)&"</font></a></b>"
list_2(ii)="<a href=""List_"&rs("id")&"_1.html"">"&TypePicmore&"</a>"
i=0
sqqq_yl=""
sql_yl="select * from infotype where ts like '"&rs("ts")&"%'"
rs_yl.open sql_yl,conn,1,1
if not rs_yl.eof then
do while not rs_yl.eof
sqqq_yl=sqqq_yl& " or tid="&rs_yl("id")&""
rs_yl.MoveNext
loop
end if
rs_yl.close
rs_info.open "select id,title,hits,date,dj from info where tid="&rs("id")&""&sqqq_yl&" order by id desc",conn,1,1
if NOT rs_info.EOF then
do while not rs_info.eof
datetime1=month(rs_info("date"))&"/"&day(rs_info("date"))
fileming=year(rs_info("date"))&month(rs_info("date"))&day(rs_info("date"))&hour(rs_info("date"))&minute(rs_info("date"))&second(rs_info("date"))
if len(rs_info("Title"))>chalen then
titlex=left(rs_info("Title"),chalen)&"..."
else
titlex=rs_info("Title")
end if
if rs_info("dj")=6 then
list_3(ii)=list_3(ii)&"["&datetime1&"]<a class=newsblue4 target=_blank son=hint style=""behavior:url(../0007.htc)"" alt="&rs_info("Title")&" href=""../Html/"&fileming&"-1.html"">"&xoyuTitle(titlex)&"</a><font color=""#C0C0C0"">"&rs_info("hits")&"</font><br>"
else
list_3(ii)=list_3(ii)&"["&datetime1&"]<a class=newsblue4 target=_blank son=hint style=""behavior:url(../0007.htc)"" alt="&rs_info("Title")&" href=""../Html/shownews.asp?id="&rs_info("id")&""">"&xoyuTitle(titlex)&"</a><font color=""#C0C0C0"">"&rs_info("hits")&"</font><br>"
end if
i=i+1
if i>=newshu then exit do
rs_info.movenext
loop
end if
rs_info.close
rs.MoveNext
loop
end if
if allshu="" then
lxty="暂无内容!"
else
lxty=lxty&"<table border=""0"">"
if allshu<=2 then
shu=1
else
if allshu>2 then
if allshu/2-int(allshu/2)>0 then
shu=allshu/2+1
else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -