www.gusucode.com > 共享世纪内容管理系统 2.1 build 080704 全站开源版 > admin/replyhtml.asp
<!--#include file="mdb_path_info.asp"--> <!--#include file="config.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta copy="WWW.2KY.CN 共享世纪"> <title>刷新文章HTML</title> <style> body{font-size:9pt;line-height:140%} </style> </head> <body> <% '========================================== ' ' 晓宇听幽新闻文章管理系统 2004 ' ' 主页地址:http://www.xoYu.com ' '========================================== '程序名称:晓宇听幽新闻文章管理系统 '英文名称:xoYu News 2004 Professional '程序创建时间:2003-7-10 '程序完成时间:2003-9-11 '最后修改时间:2003-10-10 '========================================== set rs=server.createobject("adodb.recordset") id=request("id") rs.open "select * from info where id="&request("id"),conn,1,1 if not rs.eof then ttid=rs("tid") id=rs("id") se=rs("se") if instr(rs("Title"),"<font")>0 then title=rs("Title")&"</font>" else title=rs("Title") end if form_user=rs("form_user") form_url=rs("form_url") info=rs("info") hits=rs("hits") datetime=year(rs("date"))&"-"&month(rs("date"))&"-"&day(rs("date")) fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date")) end if rs.close rs.open "select * from info where id="&request("id"),conn,1,1 MbName=rs("MbName") rs.close set rsm=server.createobject("adodb.recordset") rsm.open "select * from mb where id="&mbname,conn,1,1 pencat=rsm("MbContent") rsm.close if link="1" then f=0 rs.open "select * from specialx where tj=1 order by id desc",conn,1,1 smax=rs.recordcount do while not rs.eof spname=rs("specialGJ") nbid=rs("id") spename="<a target=""_blank"" href=""../special/List_"&nbid&"_1.html""><font color=""#6699FF"">"&spname&"</font></a>" info=replace(info,""&spname&"",""&spename&"") if f>=smax then exit do rs.movenext loop rs.close end if if form_user<>"" then else form_user="未知" end if if form_url<>"" then else form_url="未知" end if '################ 读取标题 等.. 开始 ################ rs.open "select * from infotype where id="&ttid,conn,1,1 ts=rs("ts") topshu=rs("topshu") toplen=rs("toplen") 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)&"" ttype=TN(i) next rs.close ''########读取同级分类 rs.open "select * from infotype where tn="&ttid&" order by id",conn,1,1 if NOT rs.EOF then TTY="NO" Tname=all_type_name do while NOT rs.EOF TTNN=split(rs("tname"),"|")(rs("tj")-1) txlist=txlist&"<a href=""../List/List_"&rs("id")&"_1.html""><font color=""#000000"">"&TTNN&"</font></a><br>" rs.MoveNext loop end if rs.close if TTY_id<>"" and TTY<>"NO" then rs.open "select * from infotype where tn="&TTY_id&" order by id",conn,1,1 if NOT rs.EOF then Tname=TTY_name do while NOT rs.EOF TTNN=split(rs("tname"),"|")(rs("tj")-1) txlist=txlist&"<a href=""../List/List_"&rs("id")&"_1.html""><font color=""#000000"">"&TTNN&"</font></a><br>" rs.MoveNext loop end if rs.close end if ''########读取本类top10 rs.open "select * from info where tid="&ttid&" order by hits desc",conn,1,1 if rs.eof then Txtop="·还没有文章" else do while not rs.eof if instr(rs("Title"),"<font")>0 then toplen1=toplen+20 if len(rs("Title"))>toplen1 then titley=left(rs("Title"),toplen1)&"</font>"&"..." else titley=rs("Title")&"</font>" end if else if len(rs("Title"))>toplen then titley=left(rs("Title"),toplen)&"..." else titley=rs("Title") end if end if h=h+1 filetop=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date")) if rs("dj")=6 then Txtop=Txtop&"·<a title="""&rs("Title")&""" target=""_blank"" href=""../html/"&filetop&"-1.html"">"&titley&"</a><br>" else Txtop=Txtop&"·<a title="""&rs("Title")&""" target=""_blank"" href=""../html/shownews.asp?id="&rs("id")&""">"&titley&"</a><br>" end if if h>=topshu then exit do rs.movenext loop h=0 end if rs.close search=search&"<form method=""post"" action=""../search.asp"">" search=search&"<input name=""k"" size=""15"" style=""border: 1px dotted #42A5F7; "">" search=search&"<br>" search=search&"<select name=""kt"">" search=search&"<option value=""../search.asp?type=title&k="""">按照标题搜索</option>" search=search&"<option value=""../search.asp?type=info&k="""">按照内容搜索</option>" search=search&"</select><br>" search=search&"<input name=""Submit"" src=""../images/d_search.gif"" type=""image"" value=""Submit"" width=""37"" height=""21"" align=""absmiddle"" border=""0"">" reply=reply&"<FORM name=""myform"" action=""../replydo.asp"" method=""post""><INPUT type=""hidden"" value="""&id&""" name=""infoid"" style=""border: 1px dotted #42A5F7; "">" reply=reply&"发表评论:用户名:<INPUT size=""16"" name=""username""> 密 码:<INPUT type=""password"" size=""16"" name=""password""><a target=""_blank"" href=""../reg.asp"">(点击这里注册)</a><BR></TD></TR>" reply=reply&"<TR><TD align=""left""><TEXTAREA name=""content"" onfocus=""this.value=''"" rows=""6"" cols=""70"">请在此填写评论!</TEXTAREA></TD></FORM></TR>" reply=reply&"<TR><TD align=""left"">注意:评论请限制在100字以内!<INPUT onclick=""this.disabled=true; document.myform.submit();"" type=""submit"" value="" 发送 "" name=""submit"">" ''########读取相关评论 rs.open "select * from Reply where InfoId="&id&" and check='1' order by date desc",conn,1,1 rmax=rs.recordcount if rs.eof then rcontent="·还没有相关的评论!" else do while not rs.eof x=x+1 rcontent=rcontent&"<p>"&rs("username")&":<br> "&rs("content")&"</p>" if x>=rmax then exit do rs.movenext loop x=0 end if rs.close if se<>"" then '#######读取相关文章 rs.open "select id,title,date,dj from info where se='"&se&"' and se<>'' and id<>"&id&" order by date desc",conn,1,1 if not rs.eof then do while not rs.eof if instr(rs("Title"),"<font")>0 then titlez=rs("Title")&"</font>" else titlez=rs("Title") end if filexg=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date")) if rs("dj")=6 then xlist=xlist&"<li type=""circle""><a href="""&filexg&"-1.html"">"&titlez&"</a></li>" else xlist=xlist&"<li type=""circle""><a href=""shownews.asp?id="&rs("id")&""">"&titlez&"</a></li>" end if h=h+1 if h>=lelationshu then exit do rs.movenext loop end if end if rs.close set rs=nothing set rsm=nothing conn.close set conn=nothing infos=split(info,"[page]") ip=ubound(infos) for k=0 to ip pl=pl&"<a href=""../html/"&fileming&"-"&k+1&".html"">["&k+1&"]</a> " next infos=split(info,"[page]") ip=ubound(infos) for k=0 to ip infop=infos(k)&"<img border=""0"" src=""../down_info.asp?id="&id&""" width=""1"" height=""1"">" pencat=replace(pencat,"[xoYu_TYPE]",thistype) pencat=replace(pencat,"[xoYu_NAME]",ttype) pencat=replace(pencat,"[xoYu_TITLE]",thistitle) pencat=replace(pencat,"[xoYu_BJlist]",txlist) pencat=replace(pencat,"[xoYu_BJtop]",Txtop) pencat=replace(pencat,"[xoYu_ALIST]",xlist) pencat=replace(pencat,"[xoYu_SEARCH]",search) pencat=replace(pencat,"[xoYu_ID]",id) pencat=replace(pencat,"[TITLE]",title) pencat=replace(pencat,"[xoYu_WRITER]",form_user) pencat=replace(pencat,"[xoYu_FORM]",form_url) pencat=replace(pencat,"[xoYu_HITS]",hits) pencat=replace(pencat,"[xoYu_DATE]",datetime) pencat=replace(pencat,"[xoYu_PAGE]",pl) pencat=replace(pencat,"[xoYu_content]",infop) pencat=replace(pencat,"[xoYu_RCONTENT]",rcontent) pencat=replace(pencat,"[xoYu_REPLY]",reply) Set fso = Server.CreateObject("Scripting.FileSystemObject") Set fout = fso.CreateTextFile(server.mappath("../html/"&fileming&"-"&k+1&".html")) fout.Write pencat fout.close pencat=replace(pencat,""&infop&"","[xoYu_content]") next '************** 生成HTML页 结束 *************** if request("type")="page" then response.write("<script>alert('发表完成!刷新即可看到您发表的评论!');location.href='../html/"&fileming&"-1.html'</script>") end if %> </body></html>