📄 special_makelistjs.asp
字号:
<html>
<head>
<title>晓宇听幽网站内容管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta copy="程序制作:xoyu(QQ:5964887)www.xoyu.com">
<link rel="stylesheet" href="admin.css" type="text/css">
</head>
<body>
<!--#include file="check.asp"-->
<%
Domain=Request.ServerVariables("SERVER_NAME")
gFilePath=Request.ServerVariables("PATH_INFO")
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
CountN=len(gFilePath)
gFilePath=lcase(left(gFilePath,CountN-1))
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
AllPath="http://"+Domain&gfilepath
%>
<!--#include file="mdb_path_info.asp"-->
<%
sid=request("sid")
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from specialx where id="&sid,conn,1,1
if not rs.eof then
jschalen=rs("jschalen")
jsshu=rs("jsshu") '每个分类显示最新文章数
jsshu=jsshu+0
ts=rs("ts")
TN=split(rs("sname"),"|")
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=""../special/List_"&TI(i)&"_1.html"">"&TN(i)&"</a>"
thistitle=thistitle & " - "&TN(i)&""
next
end if
rs.close
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
sql="select * from specialx 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
set fs=server.CreateObject("Scripting.FileSystemObject")
FilePath=server.MapPath("../js/spjs"&sid&".js")
set JSFile=fs.CreateTextFile(FilePath)
sql="select * from info where sid in("&sqqq&") order by date desc"
rs.open sql,conn,1,1
if rs.eof then
Txtop="·还没有文章"
JSFile.writeline("document.write(" & chr(34) & ""&Txtop&"" & chr(34) & ")")
else
do while not rs.eof
fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
if len(rs("Title"))>jschalen then
titlex=left(rs("Title"),jschalen)&"..."
else
titlex=rs("Title")
end if
h=h+1
if rs("dj")=6 then
Txtop="·<a href="&AllPath&"html/"&fileming&"-1.html>"&xoYuTitle(titlex)&"</a><br>"
else
Txtop="·<a href="&AllPath&"html/shownews.asp?id="&rs("id")&">"&xoYuTitle(titlex)&"</a><br>"
end if
JSFile.writeline("document.write(" & chr(34) & ""&Txtop&"" & chr(34) & ")")
if h>=jsshu then exit do
rs.movenext
loop
h=0
end if
rs.close
set rs=nothing
conn.close
set conn=nothing%>
<body>
<br><br><br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="77">
<tr>
<td width="100%" valign="middle" align="center" height="26"><b><font color="#000080">
栏目Js页面生成完毕!</font></b></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="22">
</td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30"><font size="2">[<a href="javascript:history.go(-1)">返回</a>]</font></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -