📄 indexjs.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="../include/function.asp"-->
<!--#include file="../include/setup.asp"-->
<%
if session("AdminName") = "" then
Session.Abandon
response.Redirect "Admin_Login.asp"
end if
if Session("AdminName")<>"admin" then
response.write"<SCRIPT language=JavaScript>alert('对不起您无权访问本页!');"
response.write"javascript:location.href='Admin_login.asp';</SCRIPT>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<font color="#FF0000"><b>生成推荐图片</b></font><br>
<%
msg=msg&"document.writeln(""<table border='0' width='100%' cellspacing='0' cellpadding='0' height='100'>"
row=0
set rszhai=conn.execute("select top 1 ID,IIf(Len(Title)<16,Title,Left(Title,16)+'..') as Title,UserID,hot,PostTime,FromURL,HtmUrl,img,filepath,a.Sort,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and hot=1 and isPub=true and img<>'' order by ID desc")
do while not rszhai.Eof
msg=msg&"<tr>"
msg=msg&"<td height=195>"
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
msg=msg&"<a title='"&rszhai("Title")&"' target='_blank' href='"&linkadd&"'>"
msg=msg&"<img src='"&rszhai("img")&"' border='0' width='200' height='180' class=picborder></a></td></tr><tr><td height='25'>"
msg=msg&"<a title='"&rszhai("Title")&"' target='_blank' href='"&linkadd&"' class='pic'>"&rszhai("Title")
msg=msg&"</a>"
msg=msg&"</td>"
rszhai.movenext
row=row+1
loop
rszhai.close
msg=msg&"</tr></table>"");"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
path="../include/jingcai_dd.js"
Set fout = fso.CreateTextFile(server.mappath(path))
fout.WriteLine msg
fout.close
set fso=nothing
response.write "首页最新推荐网摘图片js已生成!</br>"
%>
<font color="#FF0000"><b>生成栏目文字js</b></font><br>
<%
set rs=server.createobject("adodb.recordset")
rs.open "sort",conn,1,1
do while not rs.eof
index01="document.writeln(""<table border='0' width='100%' cellspacing='0' cellpadding='0'>"
sql="select top 10 ID,IIf(Len(Title)<22,Title,Left(Title,22)+'..') as Title,UserID,FromURL,HtmUrl,hot,filepath,posttime,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&rs("sortid")&"' and isPub=true order by hot desc"
set rszhai=server.createobject("ADODB.recordset")
rszhai.open sql,conn,1
i=1
do while not rszhai.Eof and i<=10
index01=index01&"<tr>"
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
a=split(rszhai("PostTime"),"-")
index01=index01&"<td class='list' background='image/bgline.gif'>·<a href="&linkadd&" target='_blank' title='"&HTMLEncode(rszhai("Title"))&"'>"&HTMLEncode(rszhai("Title"))&"</a></td>"
rszhai.movenext
row=row+1
i=i+1
index01=index01&"</tr>"
loop
rszhai.close
index01=index01&"</table>"");"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
path="../include/"&rs("sortid")&".js"
Set fout = fso.CreateTextFile(server.mappath(path))
fout.WriteLine index01
fout.close
set fso=nothing
response.write rs("SortName")&"首页js已生成!</br>"
rs.movenext
loop
rs.close
%>
<font color="#FF0000"><b>生成栏目图片js</b></font><br>
<%
set rs=server.createobject("adodb.recordset")
rs.open "sort",conn,1,1
do while not rs.eof
sql="select top 2 ID,IIf(Len(Title)<8,Title,Left(Title,7)+'..') as Title,UserID,htmurl,hot,filepath,FromURL,img,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&rs("sortid")&"' and img<>'' and isPub=true order by ID desc"
set rszhai=server.createobject("ADODB.recordset")
rszhai.open sql,conn,1
msg=""
do while not rszhai.eof
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
msg=msg&"document.writeln(""<div align='center'>"
msg=msg&"<a title='"&HTMLEncode(rszhai("Title"))&"' target='_blank' href='"&linkadd&"'>"
msg=msg&"<img src='"&rszhai("img")&"' border='0' width='100' height='80' class='picborder'></a>"
msg=msg&"<br>"&HTMLEncode(rszhai("Title"))
msg=msg&"</div>"");"
rszhai.movenext
msg=msg
loop
rszhai.close
Set fso = Server.CreateObject("Scripting.FileSystemObject")
path="../include/"&rs("sortid")&"img.js"
Set fout = fso.CreateTextFile(server.mappath(path))
fout.WriteLine msg
fout.close
set fso=nothing
response.write rs("SortName")&"首页栏目图片js已生成!</br>"
rs.movenext
loop
rs.close
%>
<b><font color="#FF0000">生成最新收藏js</font></b><br>
<%
msg="document.writeln(""<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
row=0
set rszhai=conn.execute("select top 8 ID,IIf(Len(Title)<18,Title,Left(Title,18)+'..') as Title,UserID,PostTime,FromURL,HtmUrl,filepath,a.Sort,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and isPub=true order by ID desc")
do while not rszhai.Eof
msg=msg&"<tr>"
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
a=split(rszhai("PostTime"),"-")
msg=msg&"<td class='list' background='image/bgline.gif'>[<a href='list.asp?sort="&rszhai("Sort")&"' target='_blank'>"&rszhai("SortName")&"</a>] <a href="&linkadd&" target='_blank'>"&HTMLEncode(rszhai("Title"))&"</a> <span class='grayscript'><font color=#FF0000>["&a(1)&"."&trim(left(a(2),2))&"]</font></span></td>"
rszhai.movenext
row=row+1
msg=msg&"</tr>"
loop
rszhai.close
msg=msg&"</table>"");"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
path="../include/newwz.js"
Set fout = fso.CreateTextFile(server.mappath(path))
fout.WriteLine msg
fout.close
set fso=nothing
response.write "首页最新网摘js已生成!</br>"
%>
<font color="#FF0000"><b>生成联盟推荐图片</b></font><br>
<%
msg="document.writeln(""<table width='100%' border='0' cellspacing='3' id='table77'><tr>"
row=0
set rszhai=conn.execute("select top 5 ID,IIf(Len(Title)<8,Title,Left(Title,7)+'..') as Title,UserID,PostTime,FromURL,HtmUrl,img,filepath,a.Sort,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and isvip=1 and isPub=true and img<>'' order by ID desc")
do while not rszhai.Eof
msg=msg&"<td>"
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
msg=msg&"<div align='center'>"
msg=msg&"<table border='1' width='130' cellspacing='0' cellpadding='2' height='100' id='table28' bordercolorlight='#C0C0C0' bordercolordark='#FFFFFF'>"
msg=msg&"<tr>"
msg=msg&"<td>"
msg=msg&"<a title='"&rszhai("Title")&"' target='_blank' href='"&linkadd&"'>"
msg=msg&"<img src='"&rszhai("img")&"' border='0' width='130' height='100'></a></td>"
msg=msg&"</tr>"
msg=msg&"</table>"
msg=msg&"<font size='2'>"&rszhai("Title")
msg=msg&"</font>"
msg=msg&"</div></td>"
rszhai.movenext
row=row+1
loop
rszhai.close
msg=msg&"</tr></table>"");"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
path="../include/lianmeng.js"
Set fout = fso.CreateTextFile(server.mappath(path))
fout.WriteLine msg
fout.close
set fso=nothing
response.write "首页最新推荐网摘图片js已生成!</br>"
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -