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

📄 makelistjs.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 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_info.asp"-->
<%
tid=request("tid")
set rs=server.CreateObject("ADODB.RecordSet")
  rs.open "select * from infotype where id="&tid,conn,1,1
  if not rs.eof then
    jschalen=rs("jschalen")
    jssort=rs("jssort")
        jsshu=rs("jsshu") '每个分类显示最新文章数
    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"" target=_blank>"&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

set fs=server.CreateObject("Scripting.FileSystemObject")

FilePath=server.MapPath("../js/Listjs"&tid&".js")
set JSFile=fs.CreateTextFile(FilePath)
sql="select * from info 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
fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
daytime="["&year(rs("date"))&"年"&month(rs("date"))&"月"&day(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
if jssort="1" then
set rs_type=server.CreateObject("ADODB.RecordSet")
    rs_type.open "select * from infotype where id="&rs("tid"),conn,1,1
    if not rs_type.EOF then
    TN=split(rs_type("tname"),"|")
Txtop="[<a href="&AllPath&"List/List_"&rs("tid")&"_1.html target=_blank>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"Html/"&fileming&"-1.html target=_blank>"&xoYuTitle(titlex)&"</a>"&daytime&"<br>"
    end if
    rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"Html/"&fileming&"-1.html target=_blank>"&xoYuTitle(titlex)&"</a>"&daytime&"<br>"
end if
else
if jssort="1" then
set rs_type=server.CreateObject("ADODB.RecordSet")
    rs_type.open "select * from infotype where id="&rs("tid"),conn,1,1
    if not rs_type.EOF then
    TN=split(rs_type("tname"),"|")
Txtop="[<a href="&AllPath&"List/List_"&rs("tid")&"_1.html target=_blank>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"Html/shownews.asp?id="&rs("id")&" target=_blank>"&xoYuTitle(titlex)&"</a><br>"
    end if
    rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"Html/shownews.asp?id="&rs("id")&" target=_blank>"&xoYuTitle(titlex)&"</a><br>"
end if
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

 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

'-------------------生成滚动新闻开始
  marqueespeed=4
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from info where marquee=true order by Date desc"
    rs.open sql,conn,3,3
    if not rs.eof then
    fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
	Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrMar=MyFile.CreateTextFile(Server.Mappath("..")&"\JS\"&"\MarqueeNews.js")
	content="<marquee   onmouseout=start() onmouseover=stop()  scrolldelay=80 width=360 scrollamount="&marqueespeed&">"
	CrMar.WriteLine("document.write("""&Content&""")")
	for i=1 to 10
	if rs.eof then exit for
	Content="<font color=red>"&month(rs("date"))&"月"&day(rs("date"))&"日</font><a href="&AllPath&"Html/"&fileming&"-1.Html target=_blank>"&xoyuTitle(rs("Title"))&"</a>&nbsp;&nbsp;&nbsp;"
	CrMar.WriteLine("document.write("""&Content&""")")
	  rs.movenext
    next
	content="</marquee>"
	CrMar.WriteLine("document.write("""&Content&""")")
	else
	end if
	rs.close
	set rs=nothing
'-------------------生成最新新闻开始
    set rsl=Server.CreateObject("adodb.recordset")
    sql="Select * from info order by Date Desc"
    rsl.open sql,conn,1,1
    Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrLNJS=MyFile.CreateTextFile(Server.Mappath("..")&"\JS\"&"\LastNews.js")
    set rs_type=server.CreateObject("ADODB.RecordSet")

	for i=1 to 10
      if rsl.eof then exit for
      
  rs_type.open "select * from infotype where id="&rsl("tid"),conn,1,1
  if not rs_type.EOF then
  TN=split(rs_type("tname"),"|")
  end if
  rs_type.close
     
      fileming=year(rsl("date"))&month(rsl("date"))&day(rsl("date"))&hour(rsl("date"))&minute(rsl("date"))&second(rsl("date"))
      Content="[<a href="&AllPath&"List/List_"&rsl("tid")&"_1.html target=_blank>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"Html/"&fileming&"-1.html target=_blank>"&xoYuTitle(rsl("Title"))&"</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 title,date from info order by hits Desc"
    rsh.open sql,conn,1,1
    Set hotFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrLNJS=hotFile.CreateTextFile(Server.Mappath("..")&"\JS\"&"\HotNews.js")
    fileming=year(rsh("date"))&month(rsh("date"))&day(rsh("date"))&hour(rsh("date"))&minute(rsh("date"))&second(rsh("date"))
	for i=1 to 10
      if rsh.eof then exit for
      Content="<a href="&AllPath&"Html/"&fileming&"-1.html target="'_blank"">"&xoYuTitle(rsh("Title"))&"</a><br>"
      CrLNJS.WriteLine("document.write("""&Content&""")")
      rsh.movenext
    next
    rsh.close
    set rsh=nothing
    CrLNJS.close
	set hotFile=nothing
	
'-------------------生成并排新闻开始
tiaoshu=20 '         生成条数
biaoti=14 '          标题字数
hangtiaoshu=3 '      每行条数
   set MyFile=Server.CreateObject("Scripting.FileSystemObject")
   Set Crbpjs=MyFile.CreateTextFile(Server.Mappath("..")&"\JS\"&"\BPNews.js")
   set rs= server.createobject("adodb.recordset")
   sql="select top "&CInt(tiaoshu)&" * from info where bingpai=true order by id desc"
   rs.open sql,conn,1,1
   fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
   i_temp=0
   for i=1 to CInt(tiaoshu)
      if rs.eof then exit for
	  	 if len(rs("title"))>CInt(biaoti) then
	      title=left(rs("title"),CInt(biaoti))
	     else
	      title=rs("title")
	     end if
            content="<a href="&AllPath&"Html/"&fileming&"-1.html target=_blank>"&xoYuTitle(title)&"</a>&nbsp;&nbsp;"
            Crbpjs.WriteLine("document.write("""&Content&""")")
   rs.movenext
		   i_temp=i_temp+1
		   if i_temp mod CInt(hangtiaoshu) = 0  then
	content="<br>"
	Crbpjs.WriteLine("document.write("""&Content&""")")
	  	   end if
   next
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="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 + -