⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makejs.asp

📁 网页酷吧全站系统在此之前提供了一个新闻系统V1.0,反应十分热烈,并有不少网友提供了不少意见例如在线编辑器等问题,并强烈要求本部提供全部程序,顺应广大网友的强烈要求,并希望本人的QQ能够闲下来(因为实
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%if session("username")="" or session("userkey")="" then
response.redirect "../../"
end if%>
<!--#include file="conn.asp"-->
<link href=../css/main.css rel=stylesheet>
<!--#include file="../config.asp"-->
<%sub titlen(i)
tlen=rs_1("title")
if len(tlen)>i then
 tlen=left(tlen,i)&"..."
else
 tlen=tlen
end if
end sub%>

<% dim tlen
   tlen=""
   set rs=server.createobject("adodb.recordset")
   sql="select top 1  * from [jsconst] order by jsid desc"
   rs.open sql,conn,1,1
%>
<table width="100%" border="0" cellspacing="3" cellpadding="3"><tr><td width="57%" height="20">当前位置:<a href=main.asp>管理首页</a> >> <a href=makejs.asp>生成代码</a></td>
    <td width="43%">&nbsp;</td>
</tr></table>
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#eeeeee><td colspan=2 align=right><%if session("userkey")=3 then%><a href=admin_jsconst.asp?action=jslist>查看JS代码信息</a> <%elseif session("userkey")>=4 then%><a href=admin_pic.asp>首页图片新闻</a> | <a href=admin_jsconst.asp?action=jslist>查看JS代码信息</a> | <a href=admin_jsconst.asp>配置JS代码参数</a><%end if%></td></tr></table>
<br><br>
<!-- 生成头条新闻代码-->
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#cccccc><td colspan=2><center><b>首页头条新闻代码</td></tr>
<%
n=1
set rs_1 = server.CreateObject ("adodb.recordset")
Set fso= Server.CreateObject("Scripting.FileSystemObject")
set fd=fso.createtextfile(server.MapPath("..\js\head.js"),true)
str="document.write('<table>" 
sql_1 = "select top "&rs("headnum")&"  id,boardid,title,fpath,fname,ifshow,addtime from article where ifhead=1 and ifshow=1 order by id desc"
rs_1.Open sql_1,conn,1,1
if rs_1.eof then
response.write "<tr bgcolor=#eeeeee><td align=right width='30%' >首页头条新闻</td><td><font color=red>暂时还没有文章!</font></td></tr>"
str=str & "</table>')"
else
do while not rs_1.EOF 
temptime =month(rs_1("addtime")) & "月" & day(rs_1("addtime")) & "日"
call titlen(topiclen)
if rs("headtime")=1 then
str = str & "<tr><td valign=top>"&rs("headsign")&"</td><td><a  href="& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank title="&rs_1("title")&">"& tlen& "</a><font color=666666>("& temptime & ")</font><br></td></tr>"
else
str = str & "<tr><td valign=top>"&rs("headsign")&"</td><td><a  href="& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank title="&rs_1("title")&">"& tlen& "</a><br></td></tr>"
end if
rs_1.movenext
n=n+1
loop 
str=str & "</table>')"
response.write "<tr bgcolor=#eeeeee><td align=right width='30%'>首页头条新闻</td><td><font color=blue>完成更新</font></td></tr>"
end if
rs_1.close
set rs_1=nothing
fd.write str
fd.close
%>
</table>
<br><br>


<!-- 生成首页图片新闻-->
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#cccccc><td colspan=2><center><b>首页图片新闻代码</td></tr>
<%
n=1
set rs_1 = server.CreateObject ("adodb.recordset")
Set fso= Server.CreateObject("Scripting.FileSystemObject")
set fd=fso.createtextfile(server.MapPath("..\js\pic.js"),true)
str="document.write('<table width=\'100%\'><tr align=center valign=top>" 
sql_1 = "select top "&rs("picnum")&"  picid,pictitle,picurl,imgurl,ifshow,addtime from picnews where ifshow=1 order by picid desc"
rs_1.Open sql_1,conn,1,1
if rs_1.eof then
response.write "<tr bgcolor=#eeeeee><td align=right width='30%' >首页图片新闻</td><td><font color=red>暂时还没有图片新闻!</font></td></tr>"
str=str & "<td><font color=red>暂时没有图片新闻</font></td></tr></table>')"
else
do while not rs_1.EOF 
str = str & "<td><a href="& rs_1("picurl")& " target=_blank><img src="&rs_1("imgurl")&" border=0 width="&rs("picwidth")&" height="&rs("picheight")&"><br><br>"&rs_1("pictitle")&"</a></td>"
rs_1.movenext
n=n+1
loop 
str=str & "</tr></table>')"
response.write "<tr bgcolor=#eeeeee><td align=right width='30%'>首页图片新闻</td><td><font color=blue>完成更新</font></td></tr>"
end if
rs_1.close
set rs_1=nothing
fd.write str
fd.close
%>
</table>
<br><br>


<!--生成栏目精选代码(焦点新闻)-->
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#cccccc><td colspan=2><center><b> 大类栏目精选代码</td></tr>
<%
'set rs_1 = server.CreateObject ("adodb.recordset")
set rs_2 = server.CreateObject ("adodb.recordset")
sql_2 = "select * from  class   order by classid desc"
rs_2.Open sql_2,conn,1,1
do while not rs_2.Eof
n=1
set rs_1 = server.CreateObject ("adodb.recordset")
Set fso= Server.CreateObject("Scripting.FileSystemObject")
set fd=fso.createtextfile(server.MapPath("..\js\focus"&rs_2("classid")&".js"),true)
str="document.write('<table>" 
sql_1 = "select top "&rs("focusnum")&" id,classid,title,fpath,fname,ifshow,addtime from article where classid="&rs_2("classid")&" and ifgood=1 and ifshow=1 order by id desc"
rs_1.Open sql_1,conn,1,1
if rs_1.eof then
str=str & "</table>')"
response.write "<tr bgcolor=#eeeeee><td align=right width='30%' >"&rs_2("classname")&"</td><td><font color=red>暂时还没有文章!</font></td></tr>"
else
do while not rs_1.EOF 
temptime =month(rs_1("addtime")) & "月" & day(rs_1("addtime")) & "日&nbsp;"
call titlen(focuslen)
if rs("focustime")=1 then
str = str & "<tr><td valign=top>"&rs("focussign")&"</td><td><a  href=./"& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank title="&rs_1("title")&">"& tlen& "</a><font color=666666>("& temptime & ")</font><br></td></tr>"
else
str = str & "<tr><td valign=top>"&rs("focussign")&"</td><td><a  href=./"& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank title="&rs_1("title")&">"& tlen& "</a><br></td></tr>"
end if
rs_1.movenext
n=n+1
loop 
str=str & "</table>')"
response.write "<tr bgcolor=#eeeeee><td align=right width='30%'>"&rs_2("classname")&"</td><td><font color=blue>完成更新</font></td></tr>"
end if
rs_1.close
set rs_1=nothing
fd.write str
fd.close
rs_2.MoveNext 
Loop
rs_2.Close
set rs1=nothing
set rs2=nothing
%>
</table>
<br><br>

<!-- 生成首页栏目精选代码-->
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#cccccc><td colspan=2><center><b>首页栏目精选代码</td></tr>
<%
n=1
set rs_1 = server.CreateObject ("adodb.recordset")
Set fso= Server.CreateObject("Scripting.FileSystemObject")
set fd=fso.createtextfile(server.MapPath("..\js\focus.js"),true)
str="document.write('<table>" 
sql_1 = "select top "&rs("focusnum")&"  id,boardid,title,fpath,fname,ifshow,addtime from article where ifgood=1 and ifshow=1 order by id desc"
rs_1.Open sql_1,conn,1,1
if rs_1.eof then
response.write "<tr bgcolor=#eeeeee><td align=right width='30%' >首页栏目精选</td><td><font color=red>暂时还没有文章!</font></td></tr>"
str=str & "</table>')"
else
do while not rs_1.EOF 
temptime =month(rs_1("addtime")) & "月" & day(rs_1("addtime")) & "日"
call titlen(toppage)
if rs("focustime")=1 then
str = str & "<tr><td valign=top>"&rs("focussign")&"</td><td><a  href=./"& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank>"& tlen& "</a><font color=666666>("& temptime & ")</font><br></td></tr>"
else
str = str & "<tr><td valign=top>"&rs("focussign")&"</td><td><a  href=./"& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank>"& tlen& "</a><br></td></tr>"
end if
rs_1.movenext
n=n+1
loop 
str=str & "</table>')"
response.write "<tr bgcolor=#eeeeee><td align=right width='30%'>首页栏目精选</td><td><font color=blue>完成更新</font></td></tr>"
end if
rs_1.close
set rs_1=nothing
fd.write str
fd.close
%>
</table>
<br><br>

<!-- 生成新闻页栏目精选代码-->
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#cccccc><td colspan=2><center><b>新闻页栏目精选代码</td></tr>
<%
n=1
set rs_1 = server.CreateObject ("adodb.recordset")
Set fso= Server.CreateObject("Scripting.FileSystemObject")
set fd=fso.createtextfile(server.MapPath("..\js\newsfocus.js"),true)
str="document.write('<table>" 
sql_1 = "select top "&rs("focusnum")&"  id,boardid,title,fpath,fname,ifshow,addtime from article where ifgood=1 and ifshow=1 order by id desc"
rs_1.Open sql_1,conn,1,1
if rs_1.eof then
response.write "<tr bgcolor=#eeeeee><td align=right width='30%' >首页栏目精选</td><td><font color=red>暂时还没有文章!</font></td></tr>"
str=str & "</table>')"
else
do while not rs_1.EOF 
temptime =month(rs_1("addtime")) & "月" & day(rs_1("addtime")) & "日"
call titlen(toppage)
if rs("focustime")=1 then
str = str & "<tr><td valign=top>"&rs("focussign")&"</td><td><a  href=../"& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank>"& tlen& "</a><font color=666666>("& temptime & ")</font><br></td></tr>"
else
str = str & "<tr><td valign=top>"&rs("focussign")&"</td><td><a  href=../"& rs_1("fpath")& "/"& rs_1("fname")& " target=_blank>"& tlen& "</a><br></td></tr>"
end if
rs_1.movenext
n=n+1
loop 
str=str & "</table>')"
response.write "<tr bgcolor=#eeeeee><td align=right width='30%'>首页栏目精选</td><td><font color=blue>完成更新</font></td></tr>"
end if
rs_1.close
set rs_1=nothing
fd.write str
fd.close
%>
</table>
<br><br>


<!-- 生成图片新闻代码-->
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
<tr bgcolor=#cccccc><td colspan=2><center><b>图片新闻列表代码</td></tr>
<%
n=1
set rs_1 = server.CreateObject ("adodb.recordset")
Set fso= Server.CreateObject("Scripting.FileSystemObject")
set fd=fso.createtextfile(server.MapPath("..\js\img.js"),true)
str="document.write('" 
sql_1 = "select top "&rs("imgnum")&"  id,boardid,title,fpath,fname,ifshow,addtime from article where ifimg=1 and ifshow=1 order by id desc"
rs_1.Open sql_1,conn,1,1
if rs_1.eof then
response.write "<tr bgcolor=#eeeeee><td align=right width='30%' >图片新闻列表</td><td><font color=red>暂时还没有文章!</font></td></tr>"
str=str & "')"
else
do while not rs_1.EOF 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -