www.gusucode.com > 共享世纪内容管理系统 2.1 build 080704 全站开源版 > admin/makelistjs.asp

    <html>

<head>
<title>管理中心 -共享世纪新闻文章管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta copy="WWW.2KY.CN 共享世纪">
<link rel="stylesheet" href="admin.css" type="text/css">
</head>
<!--#include file="top.asp"-->
<body topmargin="0" leftmargin="0" style="text-align: center">

<!--#include file="check.asp"-->
<%
'==========================================
'
'  晓宇听幽新闻文章管理系统 2004
'
'  主页地址:http://www.xoYu.com
'
'==========================================
'程序名称:晓宇听幽新闻文章管理系统
'英文名称:xoYu News 2004 Professional
'程序创建时间:2003-7-10
'程序完成时间:2003-9-11
'最后修改时间:2003-10-10
'==========================================
  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"">"&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("../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"))
if instr(rs("Title"),"<font")>0 then
jschalen1=jschalen+20
if len(rs("Title"))>jschalen1 then
titlex=left(rs("Title"),jschalen1)&"</font>"&"..."
else
titlex=rs("Title")&"</font>"
end if
else
if len(rs("Title"))>jschalen then
titlex=left(rs("Title"),jschalen)&"..."
else
titlex=rs("Title")
end if
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=../List/List_"&rs("tid")&"_1.html>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"Html/"&fileming&"-1.html>"&titlex&"</a><br>"
    end if
    rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"Html/"&fileming&"-1.html>"&titlex&"</a><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=../List/List_"&rs("tid")&"_1.html>"&TN(ubound(TN)-1)&"</a>]<a href="&AllPath&"Html/shownews.asp?id="&rs("id")&">"&titlex&"</a><br>"
    end if
    rs_type.close
end if
if jssort="2" then
Txtop="·<a href="&AllPath&"Html/shownews.asp?id="&rs("id")&">"&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
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">&nbsp;&nbsp;</font>&nbsp;&nbsp;&nbsp;  在Html中调用的代码是:<br>
&nbsp;<textarea rows="6" cols="87">&lt;script language=JavaScript src=&quot;<%=AllPath%>Listjs/<%=tid%>.js&quot;&gt;&lt;/script&gt; </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>