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

📄 html_make_index.asp

📁 完整的网址站
💻 ASP
字号:
<!--#include file="config.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='index.asp'>重新登录</a>!"
  call diserror()
  response.end
end if
if session("flag")>1 then
  errmsg=errmsg+"<br>"+"<li>你的管理权限不够!!</a>!"
  call diserror()
  response.end
  end if%>
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<style type="text/css">
<!--
.style1 {color: #000000}
.STYLE2 {
	color: #FFFFFF;
	font-weight: bold;
}
.STYLE3 {color: #FFFFFF}
-->
</style>
</head>
<body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"><script>if(top==self)top.location="index.asp" </script>
<BR><%if Request("action")="" then%> 
  <table width="95%" border="0" align='center' cellpadding="0" cellspacing="1" bgcolor="#0099CF">
 <form name="form1" method="post" action="?action=makehtm">
<tr bgcolor="#0099CF"> 
      <td height="26" bgcolor="#0099CF"><span class="STYLE3">确定更新首页</span></td>
    </tr> 
    <tr bgcolor="#ffffff"> 
        <td bgcolor="#ffffff" height="50" valign="middle">   
          <input type="submit" name="Submit" value="更新首页">
        </td>
    </tr></form>
    <tr bgcolor="#ffffffe"> 
      <td>&nbsp;</td>
    </tr>
</table>
  <BR> 
<BR> <% end if
if Request("action")="makehtm" then
%> <table cellspacing="1" cellpadding="3" width="95%" class="table1" align='center' >
    <tr bgcolor="#0099CF"> 
      <td height="25" class="title"><div align="center"><b><span class="STYLE3">首页更新完成</span> </b></div></td>
    </tr>
   <%
   menu="| "
   set rs_u=server.createobject("adodb.recordset")    
sql_u="select title,url from happywz_URL where space=5 order by id"          
rs_u.open sql_u,conn,1,1
while not rs_u.eof 
 menu=menu+"<a class='Channel' href='"&rs_u("url")&"' target='_blank'>"&rs_u("title")&"</a> | "
	rs_u.movenext
wend
rs_u.close
set rs_u=nothing

indexhtm=""
set rs_u=server.createobject("adodb.recordset")               
sql_u="select sort,sml from happywz_SORT where sortstep=0"          
rs_u.open sql_u,conn,1,1
jishu=1
while not rs_u.eof 
	if jishu=1 or jishu mod 2 = 1 then
indexhtm=indexhtm+"<TR bgColor=#ffffff class='listbg'><TD align=center "&webxs20gg&">[<a href='html/"&rs_u("sml")&".htm' title='"&rs_u("sort")&"'>"&rs_u("sort")&"</a>]</TD>"
	else
indexhtm=indexhtm+"<TD align=center "&webxs20gg&">[<a href='html/"&rs_u("sml")&".htm' title='"&rs_u("sort")&"'>"&rs_u("sort")&"</a>]</TD>"
    end if
	if jishu mod 2=0 then
indexhtm=indexhtm+"</tr>"
	end if
	jishu=jishu+1
	rs_u.movenext
wend
rs_u.close
set rs_u=nothing

'读出模版文件
set rs_2 = server.CreateObject ("Adodb.recordset")
if webv>0 then
sql_2="select * from happywz_DEMO where ifuse=1 and demoid="&webv
end if
rs_2.open sql_2,conn,1,1
okfile=rs_2("demohtml")
rs_2.close
set rs_2=nothing

 '---------替换模板数据
okfile = replace(okfile,"#titlename#",webtitle)
okfile = replace(okfile,"#url#",weburl)
okfile = replace(okfile,"#name#",webname)
okfile = replace(okfile,"#email#",webemail)
okfile = replace(okfile,"#webstat#",webstat)
okfile = replace(okfile,"#memo#",webdescription)
okfile = replace(okfile,"#indexhtm#",indexhtm)
okfile = replace(okfile,"#logo2#",weblogo2)
okfile = replace(okfile,"#keywords#",webkeywords)
okfile = replace(okfile,"#menu#",menu)

Set fso = Server.CreateObject(""&fsoset&"")
  Set fout = fso.Createtextfile(server.mappath("../index.html"),true)
 fout.writeline okfile
fout.close  
%>
      <td><div align="center"><font color="#0000FF">首页更新完成</font> 地址为默认 <a href="../index.html" target="_blank">../index.html </a></div></td>
    </tr><%end if%>
    </table>
 <TABLE WIDTH="95%" BORDER="0" CELLPADDING="2" CELLSPACING="1" BGCOLOR="#0099CF" align="center"> 
<TR BGCOLOR="#0099CF"> <TD HEIGHT="22" 
COLSPAN="2" align='center'><span class="STYLE2">操作说明</span></TD>
</TR> <TR BGCOLOR="#ffffff"> <TD WIDTH="87" HEIGHT="30"><B>操作说明:</B></TD><TD 
HEIGHT="30">
      <LI>您只需点击更新首页按钮就可按照你的设定更新首页</TD></TR> </TABLE>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -