www.gusucode.com > 共享世纪内容管理系统 2.1 build 080704 全站开源版 > admin/replylistjs.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%>