gusucode.com > 味多美网址导航源码程序 V20100902 > 味多美网址导航源码程序 V20100902\code\admin\template.asp
<!--#include file="mdb.asp"--> <!--#include file="aq.asp"--> <% if session("adminlogin")<>sessionvar then Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='index.asp';</script>") Response.End End if set rs=server.createobject("adodb.recordset") rs.open "select * from title",conn,1,3 site=rs("site") siteurl=rs("siteurl") email=rs("email") Powered=rs("Powered") Copyright=rs("Copyright") icp=rs("icp") qq=rs("qq") ads01=rs("ads01") ads02=rs("ads02") ads03=rs("ads03") ads04=rs("ads04") ads05=rs("ads05") ads06=rs("ads06") ads07=rs("ads07") ads08=rs("ads08") ads09=rs("ads09") ads10=rs("ads10") so1=rs("so1") so2=rs("so2") rs.close set rs=Nothing %> <html> <head> <title>生成其他页面</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <LINK REL="stylesheet" HREF="css.css" TYPE="text/css"> </head> <body> <p> </p> <table width="55%" border="0" cellspacing="1" cellpadding="8" align="center" bgcolor="#999999"> <tr><td bgcolor="#cccccc" align="center">生成其他页面</td></tr> <tr><td bgcolor="#eeeeee"><br> <% Dim fso,f Dim strTitle,strContent,strOut set f=server.createobject("adodb.recordset") f.open "select * from template where id=2",conn,1,3 name=f("name") html=f("html") strOut=f("template") sysj=month(now())&"月"&day(now())&"日"&Hour(now())&"时"&Minute(now())&"分" baidu=so1 set rsDe=server.createobject("adodb.recordset") sql= "select * from detail Where verity=1 and yl_dayin>0 order by yl_intime desc" 'response.write sql rsDe.open sql,conn,1,1 menunews=menunews&"<table table border=0 cellpadding=0 cellspacing=2 width=100% height=4>" n=1 While Not rsDe.Eof and n<49 menunews = menunews &"<td height=18> <img src=logo/01.gif> <a href='showurl.asp?id="&rsDe("id")&"&2008_01_01.htm' title=近十分钟:"&rsDe("yl_10in")&"次|当天来路:"&rsDe("yl_dayin")&"次
历史来路:"&rsDe("yl_in")&"次|历史去路:"&rsDe("out")&"次
数据重置时间:"&rsDe("yl_ctime")&" target='_blank'>" if rsDe("yl_dayin")>9 then menunews = menunews &"<font color=#0000FF>" end if if rsDe("yl_dayin")>29 then menunews = menunews &"</font><font color=#FF0000><b>" end if menunews = menunews &" "&rsDe("title")&" " if rsDe("yl_dayin")>9 then menunews = menunews &"</b></font>" end if menunews = menunews &"</a></td>" if n mod 8 =0 then menunews = menunews &"</Tr>" end if rsDe.MoveNext n=n+1 Wend rsDe.close set rsDe=nothing menunews=menunews&"</table>" strOut=Replace(strOut,"<{{menunews}}>",menunews) Set top=Server.CreateObject("Adodb.Recordset") SqlT="select top 30 id,title from detail where classid=68 and verity=1 order by topid desc" top.open SQLT,conn,1,1 numrow2=0 menutop=menutop&"<table bgcolor=#ffffff width=100% border=1 align=center cellpadding=0 cellspacing=0 bordercolorlight=#ffffff bordercolordark=#ffffff>" menutop=menutop&"<tr" if (numrow2 mod 2=0) then menutop=menutop&" bgcolor=#f5f4f4" end if menutop=menutop&">" if top.EOF and top.BOF then menutop=menutop&"<tr><td height=50 align=center> 暂时没有内容</td></tr>" else numRows=0 While (Not top.EOF) menutop=menutop&"<td height=23 align=center><a href=showurl.asp?id="&top("id")&"&2008_01_01.htm target=_blank>"&top("Title")&"</a><BR></td>" numRows=numRows+1 top.MoveNext if (numRows mod 3 =0) Then numrow2=numrow2+1 menutop=menutop&"</tr><tr" if (numrow2 mod 2=0) then menutop=menutop&" bgcolor=#f5f4f4" end if menutop=menutop&">" end if Wend end if top.close Set top = Nothing menutop=menutop&"</table>" strOut=Replace(strOut,"<{{menutop}}>",menutop) Set Tool=Server.CreateObject("Adodb.Recordset") SqlT="select top 30 id,title from detail where classid=63 and verity=1 order by topid desc" Tool.open SQLT,conn,1,1 numrow2=0 menutool=menutool&"<table width=100% cellpadding=0 cellspacing=0>" if Tool.EOF and Tool.BOF then menutool=menutool&"<tr><td height=50 align=center> 暂时没有内容</td></tr>" else numRows=0 menutool=menutool&"<tr>" While (Not Tool.EOF) menutool=menutool&"<td height=20> <img src=logo/01.gif> <a href=showurl.asp?id="&Tool("id")&"&2008_01_01.htm target=_blank>"&Tool("Title")&"</a></td>" Tool.MoveNext numRows=numRows+1 if (numRows mod 2 =0) Then menutool=menutool&"</tr><tr>" end if Wend end if Tool.close Set Tool = Nothing menutool=menutool&"</table>" strOut=Replace(strOut,"<{{menutool}}>",menutool) zytj="" Set ClassCount=Server.CreateObject("Adodb.Recordset") Sql= "Select * from feilei order by classid" ClassCount.open Sql,conn,1,1 Set Count=Server.CreateObject("Adodb.Recordset") Sql="Select * from detail" Count.open Sql,conn,1,1 Set WebCount=Server.CreateObject("Adodb.Recordset") Sql="Select * from detail where verity=1" WebCount.open Sql,conn,1,1 Set FCount=Server.CreateObject("Adodb.Recordset") Sql="Select * from detail where verity=0" FCount.open Sql,conn,1,1 zytj=zytj&" <img src=logo/01.gif> 分类总数:<font color=#ff0000>"&ClassCount.RecordCount&"</font>个<BR> <img src=logo/01.gif> 网站总数:<font color=#ff0000>"&Count.RecordCount&"</font>个<BR> <img src=logo/01.gif> 已审网站:<font color=#FF0000>"&WebCount.RecordCount&"</font>个<BR> <img src=logo/01.gif> 未审网站:<font color=#FF0000>"&FCount.RecordCount&"</font>个" ClassCount.close Set ClassCount = Nothing Count.close Set Count = Nothing WebCount.close Set WebCount = Nothing FCount.close Set FCount = Nothing strOut=Replace(strOut,"<{{zytj}}>",zytj) Set feilei=Server.CreateObject("Adodb.Recordset") Sql= "select top 70 classid,classname from feilei where show=1" feilei.open Sql,conn,1,1 menulist=menulist&"<table width=100% bgcolor=#F7F7F7 BORDER=0 CELLPADDING=0 CELLSPACING=0>" menulist=menulist&"<tr" if (numrow2 mod 2=0) then menulist=menulist&" bgcolor=#FFFFEC" end if menulist=menulist&">" if feilei.Eof and feilei.Bof then menulist=menulist&"<tr><td height=25 align=middle>暂时没有栏目</td></tr>" else numRows = 0 While (Not feilei.Eof) menulist=menulist&"<td height=23 align=center>┊<a href=html/10"&feilei("classid")&".htm target=_blank>"&feilei("classname")&"</A>┊</td>" feilei.MoveNext numRows = numRows + 1 if (numRows mod 10 =0) Then numrow2=numrow2+1 menulist=menulist&"</tr><tR" if (numrow2 mod 2=0) then menulist=menulist&" bgcolor=#FFFFEC" end if menulist=menulist&">" end if Wend end if feilei.Close Set feilei=Nothing menulist=menulist&"</table>" strOut=Replace(strOut,"<{{menulist}}>",menulist) Set rsDe=Server.CreateObject("Adodb.Recordset") Sql= "select top 70 classid,classname from feilei where ku=1" rsDe.open Sql,conn,1,1 menuku=menuku&"<table width=100% align=center cellpadding=0 cellspacing=0>" if rsDe.EOF and rsDe.BOF then menuku=menuku&"<tr><td height=25 align=middle>暂时没有栏目</td></tr>" else numrow2=0 While (Not rsDe.EOF) menuku=menuku&"<tr height=25" if (numrow2 mod 2=0) then menuku=menuku&" bgcolor=#eeeeee" else menuku=menuku&" bgcolor=#f2f9fe" end if menuku=menuku&">" menuku=menuku&"<td align=middle width=60 align=middle><a href=html/10"&rsDe("classid")&".htm target=_blank><FONT color=#ff8833>"&rsDe("classname")&"</FONT></A></td>" menuku=menuku&"<td " if (numrow2 mod 2=0) then menuku=menuku&" bgcolor=#f7fbff" else menuku=menuku&" bgcolor=#FFFFFF" end if menuku=menuku&">" Set rsDe1=Server.CreateObject("Adodb.Recordset") SqlC="select * from detail where Classid ="&rsDe("Classid")&" and verity=1 order by topid desc,id" rsDe1.open SQLC,conn,1,1 if rsDe1.Eof and rsDe1.Bof then menuku=menuku&" 暂时没有网址</td>" menuku=menuku&"<td " if (numrow2 mod 2=0) then menuku=menuku&"bgcolor=#f7fbff" else menuku=menuku&"bgcolor=#FFFFFF" end if menuku=menuku&"> </td>" else menuku=menuku&"<table width=100% border=0 align=center>" menuku=menuku&"<tr>" numRows3=0 While (numRows3<>6 and Not rsDe1.Eof) menuku=menuku&"<td width=16.6%/> <a href=showurl.asp?id="&rsDe1("id")&"&2008_01_01.htm title=当天来路:"&rsDe1("yl_dayin")&"次|历史来路:"&rsDe1("yl_in")&"次|历史去路:"&rsDe1("out")&"次 target=_blank>" if rsDe1("yl_dayin")>9 then menuku = menuku &"<font color=#0000FF>" end if if rsDe1("yl_dayin")>29 then menuku = menuku &"</font><font color=#FF0000><b>" end if menuku = menuku &""&left(rsDe1("title"),7)&"" if rsDe1("yl_dayin")>9 then menuku = menuku &"</b></font>" end if menuku = menuku &"</a></td>" numRows3=numRows3+1 rsDe1.MoveNext Wend menuku=menuku&"</table>" menuku=menuku&"</td>" menuku=menuku&"<td width=40 align=middle" if (numrow2 mod 2=0) then menuku=menuku&" bgcolor=#f7fbff" else menuku=menuku&" bgcolor=#FFFFFF" end if menuku=menuku&"><a href=html/10"&rsDe("classid")&".htm target=_blank>更多..</a></td></tr>" end if rsDe1.Close Set rsDe1=Nothing rsDe.MoveNext numrow2=numrow2+1 Wend end if rsDe.close Set rsDe = Nothing menuku=menuku&"</table>" strOut=Replace(strOut,"<{{menuku}}>",menuku) set rsDe=server.createobject("adodb.recordset") sql= "select * from detail Where verity=1 and links>0 order by yl_intime desc" rsDe.open sql,conn,1,1 links=links&"<table border=0 cellpadding=0 cellspacing=0 width=100% height=4 bgcolor=#f5f5f5>" n=1 While Not rsDe.Eof and n<53 links = links &"<td height=18> <a href="&rsDe("url")&" title=来路:"&rsDe("yl_in")&"次|去路:"&rsDe("out")&"次 target='_blank'>"&rsDe("title")&"</a></td>" if n mod 9 =0 then links = links &"</Tr>" end if rsDe.MoveNext n=n+1 Wend rsDe.close set rsDe=nothing links=links&"</table>" strOut=Replace(strOut,"<{{links}}>",links) Copyright=Copyright&Powered strOut=Replace(strOut,"<{{sysj}}>",sysj) strOut=Replace(strOut,"<{{baidu}}>",baidu) strOut=Replace(strOut,"<{{site}}>",site) strOut=Replace(strOut,"<{{siteurl}}>",siteurl) strOut=Replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true) f.WriteLine strOut f.close Response.Write "<li>生成"&name&"成功</A><br>" set f=Nothing set fso=Nothing set f=server.createobject("adodb.recordset") f.open "select * from template where id=3",conn,1,3 name=f("name") html=f("html") strOut=f("template") f.close strOut=Replace(strOut,"<{{site}}>",site) strOut=Replace(strOut,"<{{siteurl}}>",siteurl) strOut=Replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true) f.WriteLine strOut f.close Response.Write "<li>生成"&name&"成功</A><br>" set f=Nothing set fso=Nothing set f=server.createobject("adodb.recordset") f.open "select * from template where id=4",conn,1,3 name=f("name") html=f("html") strOut=f("template") f.close strOut=Replace(strOut,"<{{site}}>",site) strOut=Replace(strOut,"<{{siteurl}}>",siteurl) strOut=Replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true) f.WriteLine strOut f.close Response.Write "<li>生成"&name&"成功</A><br>" set f=Nothing set fso=Nothing set f=server.createobject("adodb.recordset") f.open "select * from template where id=5",conn,1,3 name=f("name") html=f("html") strOut=f("template") f.close strOut=Replace(strOut,"<{{site}}>",site) strOut=Replace(strOut,"<{{siteurl}}>",siteurl) strOut=Replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true) f.WriteLine strOut f.close Response.Write "<li>生成"&name&"成功</A><br>" set f=Nothing set fso=Nothing set f=server.createobject("adodb.recordset") f.open "select * from template where id=6",conn,1,3 name=f("name") html=f("html") strOut=f("template") f.close strOut=Replace(strOut,"<{{site}}>",site) strOut=Replace(strOut,"<{{siteurl}}>",siteurl) strOut=Replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true) f.WriteLine strOut f.close Response.Write "<li>生成"&name&"成功</A><br>" set f=Nothing set fso=Nothing set f=server.createobject("adodb.recordset") f.open "select * from template where id=7",conn,1,3 name=f("name") html=f("html") strOut=f("template") f.close strOut=Replace(strOut,"<{{site}}>",site) strOut=Replace(strOut,"<{{siteurl}}>",siteurl) strOut=Replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") Set f=fso.CreateTextFile(Server.MapPath("../"&html&""),true) f.WriteLine strOut f.close Response.Write "<li>生成"&name&"成功</A><br>" set f=Nothing set fso=Nothing links="" Set linksCount=Server.CreateObject("Adodb.Recordset") Sql="select * from detail where verity=1 and links>0" linksCount.open Sql,conn,1,1 links=links&"共有["&linksCount.RecordCount&"]个友情连接" linksCount.close Set linksCount = Nothing strOut=Replace(strOut,"<{{links}}>",links) dim linkw,link set fr=server.createobject("adodb.recordset") fr.open "select * from template where id=1",conn,3.3 strOut=fr("template") fr.close set fr=nothing link=empay set rs=server.createobject("adodb.recordset") rs.open "select * from detail where verity=1 and links>0 order by yl_intime desc,id",conn,1,3 jishu=1 noooo=1 while not rs.eof if jishu=1 or jishu mod 4=1 then noooo=noooo+1 if noooo mod 2=1 then bgcolor="#FFFFFF" else bgcolor="#F7F7F7" end if link=link&"<tr bgColor="&bgcolor&"><td width=25% height=25> <a class=a href="&rs("url")&" target=_blank>"&rs("title")&"</a></td>" else link=link&"<td width=25% height=20> <a class=a href="&rs("url")&" target=_blank>"&rs("title")&"</a></td>" end if if jishu mod 4=0 then link=link&"</tr>" jishu=jishu+1 rs.movenext wend jishu=jishu-1 if jishu mod 4<>0 then for i=1 to 4-(jishu mod 4) link=link & "<td width='25%'> </td>" if i=4-(jishu mod 4) then link=link&"</tr>" next end if rs.close strOut=replace(strOut,"<{{sc3}}>",link) strOut=replace(strOut,"<{{sc1}}>","><a class=word_White href='links.htm'>友情连接</a>") strOut=replace(strOut,"<{{sc2}}>","") strOut=replace(strOut,"<{{classname}}>","友情连接") strOut=replace(strOut,"<{{site}}>",site) strOut=replace(strOut,"<{{siteurl}}>",siteurl) strOut=replace(strOut,"<{{email}}>",email) strOut=Replace(strOut,"<{{icp}}>",icp) strOut=replace(strOut,"<{{Copyright}}>",Copyright) strOut=Replace(strOut,"<{{tj}}>",links) strOut=replace(strOut,"<{{creattime}}>",date()) strOut=Replace(strOut,"<{{qq}}>",qq) strOut=Replace(strOut,"<{{ads01}}>",ads01) strOut=Replace(strOut,"<{{ads02}}>",ads02) strOut=Replace(strOut,"<{{ads03}}>",ads03) strOut=Replace(strOut,"<{{ads04}}>",ads04) strOut=Replace(strOut,"<{{ads05}}>",ads05) strOut=Replace(strOut,"<{{ads06}}>",ads06) strOut=Replace(strOut,"<{{ads07}}>",ads07) strOut=Replace(strOut,"<{{ads08}}>",ads08) strOut=Replace(strOut,"<{{ads09}}>",ads09) strOut=Replace(strOut,"<{{ads10}}>",ads10) strOut=Replace(strOut,"<{{so2}}>",so2) Set fso=Server.CreateObject("Scripting.FileSystemObject") set linkw=fso.createtextfile(server.mappath("../html/links.htm"),true) linkw.writeline strOut linkw.close Response.Write "<li>生成友情连接页模板成功</A><br>" set rs=Nothing set linkw=Nothing set f=Nothing set fso=Nothing %> <br></td></tr> </table> </body> </html>