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

📄 admin_moban.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
moban=Request("moban")
n=Request("id")
FPath1=Request("FPath")
action=Request.QueryString("action")
set rs=server.createobject("adodb.recordset")
if n<>"" then
rs.open "select * from happywz_url where id="&n&"",conn,1,3
if not rs.eof then
FPath2=rs("url")
FPath="../"&FPath2
mbtitle=rs("title")
end if
rs.close
set rs=nothing
if action="make" then
Dim fso, f1, ts, moban, FilePath 
FilePath=server.mappath(FPath1)
Set fso = CreateObject(""&fsoset&"") 
Set f1 = fso.CreateTextFile(FilePath, True) 
f1.Write moban 
f1.Close 
set f1=nothing 
set fso=nothing 
response.write"<SCRIPT language=JavaScript>alert('网页修改成功!');"
response.write"location.href='admin_moban.asp?id="&n&"'</SCRIPT>"
end if
FilePath=server.mappath(FPath)
Const ForReading = 1 
Set fso = CreateObject(""&fsoset&"") 
Set ts = fso.OpenTextFile(FilePath, ForReading) 
moban1 = ts.ReadAll  
set ts=nothing 
set fso=nothing 
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: #FF0000}
-->
</style>
</head>
<body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"><script>if(top==self)top.location="index.asp" </script><br>
<table width="650" border="2" align="center" cellpadding="3" cellspacing="0" bordercolor="#0099CF" style="border-collapse: collapse">
    <%set r=server.createobject("adodb.recordset")
	r.open "select * from happywz_url where space=1",conn,1,3
	jishu=1
while not r.eof
    if jishu=1 or jishu mod 6=1 then%><tr><td width="100" align="center"><a href="?id=<%=r("id")%>"><%=r("title")%></a></td>
    <%else%><td width="100" align="center"><a href="?id=<%=r("id")%>"><%=r("title")%></a></td>
	<%end if
	if jishu mod 6=0 then%></tr><%
	end if
	jishu=jishu+1
	r.movenext
wend
r.close
set r=nothing%></tr>
  </table><%if n<>"" then%><br>
 <table width="650" align="center" border="0" cellpadding="0" cellspacing="1">
  <tr> 
    <td height="25" align="center" bgcolor="#0099CF"><font color=#FFFFFF><strong><%=mbtitle%> 来自<%=FPath2%></strong></font></td>
  </tr><form name="form1" method="post" action="admin_moban.asp?action=make">
  <tr><td>
    <textarea name="moban" rows="20" cols="90"><%=moban1%></textarea>
</td>
  </tr>
  <tr>
    <td><INPUT type=hidden name="id" value="<%=n%>"><INPUT type=hidden name="FPath" value="<%=FPath%>">
      <input type="submit" name="Submit" value="点击修改文件"> <span class="STYLE2">&lt;% %&gt;之间的部分是asp内容,谨慎修改</span>      &nbsp;注意,操作是不可逆的,请注意备份!</td>
  </form>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
      </table>
      
    </td>
  </tr>
</table><%end if%>
</body></html>

⌨️ 快捷键说明

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