📄 makesoftjs.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 topmargin="0" leftmargin="0" style="text-align: center">
<!--#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_down.asp"-->
<%
tid=request("tid")
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from downtype where id="&tid,conn,1,1
if not rs.eof then
jschalen=20
jssort=1' 1显示分类 2不显示分类
jsshu=10 '每个分类显示最新文章数
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=""../SoftWare/List"&TI(i)&"_1.html"">"&TN(i)&"</a>"
thistitle=thistitle & " - "&TN(i)&""
next
end if
rs.close
sql="select * from downtype 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/DownList"&tid&".js")
set JSFile=fs.CreateTextFile(FilePath)
sql="select * from down where tid 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
cxn=rs("cxn")
cxv=rs("cxv")
titlex=cxn&cxv
h=h+1
if jssort="1" then
set rs_type=server.CreateObject("ADODB.RecordSet")
rs_type.open "select * from downtype where id="&rs("tid"),conn,1,1
if not rs_type.EOF then
TN=split(rs_type("tname"),"|")
Txtop="[<a href=SoftWare/List"&rs("tid")&"_1.html>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"SoftWare/"&rs("id")&".html>"&titlex&"</a><br>"
end if
rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"SoftWare/"&rs("id")&"-1.html>"&titlex&"</a><br>"
else
set rs_type=server.CreateObject("ADODB.RecordSet")
rs_type.open "select * from downtype where id="&rs("tid"),conn,1,1
if not rs_type.EOF then
TN=split(rs_type("tname"),"|")
Txtop="[<a href=SoftWare/List"&rs("tid")&"_1.html>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"SoftWare/xoYuSoft_"&rs("id")&".html>"&titlex&"</a><br>"
end if
rs_type.close
end if
JSFile.writeline("document.write(" & chr(34) & ""&Txtop&"" & chr(34) & ")")
if h>=jsshu then exit do
rs.movenext
loop
h=0
end if
'-------------------生成最新新闻开始
set rsl=Server.CreateObject("adodb.recordset")
sql="Select cxn,cxv,id from down order by Date Desc"
rsl.open sql,conn,1,1
Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
set CrLNJS=MyFile.CreateTextFile(Server.Mappath("..")&"\JS\"&"\Lastsoft.js")
for i=1 to 10
if rsl.eof then exit for
softname=rsl("cxn")&rsl("cxv")
Content="<a href="&AllPath&"SoftWare/"&rsl("id")&".html>"&softname&"</a><br>"
CrLNJS.WriteLine("document.write("""&Content&""")")
rsl.movenext
next
rsl.close
set rsl=nothing
CrLNJS.close
set MyFile=nothing
'-------------------生成最热新闻开始
set rsh=Server.CreateObject("adodb.recordset")
sql="Select cxn,cxv,id from down order by hits Desc"
rsh.open sql,conn,1,1
Set hotFile=Server.CreateObject("Scripting.FileSystemObject")
set CrLNJS=hotFile.CreateTextFile(Server.Mappath("..")&"\JS\"&"\Hotsoft.js")
for i=1 to 10
if rsh.eof then exit for
softname=rsh("cxn")&rsh("cxv")
Content="<a href="&AllPath&"SoftWare/"&rsh("id")&"-1.html>"&softname&"</a><br>"
CrLNJS.WriteLine("document.write("""&Content&""")")
rsh.movenext
next
rsh.close
set rsh=nothing
CrLNJS.close
set hotFile=nothing
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<body>
<br><br><br>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="93">
<tr>
<td width="100%" valign="middle" align="center" height="15"><b>
<font color="#000080">
栏目Js页面生成完毕!</font></b></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="63">
<p><font size="2"> </font> 在Html中调用的代码是:<br>
<textarea rows="6" cols="87"><script language=JavaScript src="<%=AllPath%>js/DownList<%=tid%>.js"></script> </textarea>
</p>
</td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="15"><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 + -