📄 edit.asp
字号:
<!--#include file="tot_conn.asp" -->
<!--#include file="md5.asp" -->
<html>
<head>
<title><%=application("TOT_Title")%>留言板</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(images/webbg.gif);
background-position:center 50%;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
}
.style2 {color: #FF0000}
-->
</style></head>
<script src="js/inc.js"></script>
<SCRIPT language=JavaScript>
function b()
{
document.myform.id.src='images/img/'+document.myform.Image.value;
}
</SCRIPT>
<body>
<%
Function GetCode()
Dim TestObj
On Error Resume Next
Set TestObj = Server.CreateObject("Adodb.Stream")
Set TestObj = Nothing
If Err Then
Dim TempNum
Randomize timer
TempNum = cint(8999*Rnd+1000)
Session("GetCode") = TempNum
GetCode = Session("GetCode")
Else
GetCode = "<img src=""GetCode.asp"">"
End If
End Function
%>
<%=application("BBS_Head")%>
<table width="750" height="40" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="228"><div align="center">-=>您现在的位置:<a href="#">首页</a>-><a href="#">留言</a></div></td>
<td width="522" style="padding:0 60px 0 0; "><div align="right">
<%if(isAdmin) then%>
<a href="edit.asp?act=config"><img src="images/config.jpg" width="71" height="26" border="0"></a> <a href="edit.asp?act=logout"><img src="images/logout.jpg" width="71" height="26" border="0"></a>
<%end if%>
<a href="admin_login.asp"><img src="images/LoginA.gif" width="71" height="26" border="0"></a> <a href="guest_add.asp"><img src="images/LoginB.gif" width="71" height="26" border="0"></a> <a href="index.asp"><img src="images/LoginC.gif" width="71" height="26" border="0"></a></div></td>
</tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12"><div align="left"><img src="images/tot_a.gif" width="12" height="16"></div></td>
<td width="726" background="images/tot_b.gif"> </td>
<td width="12"><div align="right"><img src="images/tot_c.gif" width="12" height="16"></div></td>
</tr>
<tr>
<td height="25" colspan="3" background="images/bg.gif"> <span class="style1">-=>站点公告</span></td>
</tr>
<tr>
<td colspan="3"><table width=750
border=1 align="center" cellPadding="0" cellSpacing="0" borderColor="#e6e6e6" bgcolor="#FFFFFF">
<tr>
<td align=middle width=30 height=30><div align="center"><img src="images/b.jpg" width="16" height="18"></div></td>
<td width=470><div align="center"><%=application("TOT_Content")%></div></td>
<td width=250> <font color=#e08700>■</font> 今日留言: <%=application("TOT_TodayAddNum")%> <font color=#e08700>■</font> 留言总数: <%=application("TOT_TotalAddNum")%></td>
</tr>
</table></td>
</tr>
</table>
<TABLE height=2 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD width=12><IMG src="images/tot_aa.gif" width="12" height="12"></TD>
<TD width=726 background=images/tot_bb.gif></TD>
<TD width=12><IMG src="images/tot_cc.gif" width="12" height="12"></TD>
</TR>
</TBODY>
</TABLE><br>
<%
dim act,a,b,c,d,e,f,randNum,rs,sql,VerifyCode,UserName,UserPass,SqlLogin
act=trim(request("act"))
cd=trim(request("cd"))
Select Case act
Case "logout"
session("TOT_ADMIN")=""
response.Redirect("index.asp")
Case "top"
conn.Execute("update TOT_GuestBook set Top_Sort=Top_Sort+1 where cd='"&cd&"'")
application.Lock()
application("TOT_Cache")=1
application.UnLock()
response.Redirect("index.asp")
Case "del"
conn.Execute("delete from TOT_GuestBook where cd='"&cd&"'")
application.Lock()
application("TOT_Cache")=1
application.UnLock()
response.Redirect("index.asp")
Case "reply"
call ReplyGuest()
Case "replyok"
conn.Execute("update TOT_GuestBook set Replies='"&request.Form("rcontent")&"' where cd='"&cd&"'")
application.Lock()
application("TOT_Cache")=1
application.UnLock()
response.Redirect("index.asp")
Case "editor"
call Editor()
Case "editorok"
conn.Execute("update TOT_GuestBook set Title='"&Request.Form("Title")&"',Content='"&Request.Form("Content")&"' where cd='"&cd&"'")
application.Lock()
application("TOT_Cache")=1
application.UnLock()
response.Redirect("index.asp")
Case "config"
call ConfigSite()
Case "configok"
set rs=server.createobject("adodb.recordset")
rs.open "select * from TOT_Admin",conn,3,3
if not rs.eof then
password=trim(request.Form("password"))
if(len(password)>0 and password<>"") then
password=md5(password,32)
rs("password")=password
end if
rs("Title")=trim(request.Form("title"))
rs("PageSize")=trim(request.Form("pagesize"))
rs("CloseBook")=trim(request.Form("closebook"))
application("TOT_CloseBook")=trim(request.Form("closebook"))
rs("IP")=trim(request.Form("ip"))
rs("DeChar")=trim(request.Form("dechar"))
rs("Content")=trim(request.Form("content"))
rs("Title")=trim(request.Form("title"))
rs("BBS_Head")=request.Form("BBS_Head")
rs("BBS_Root")=request.Form("BBS_Root")
rs.update
end if
rs.close
set rs=nothing
application.Lock()
application("TOT_Cache")=1
application.UnLock()
response.Redirect("index.asp")
End Select
%>
<%
sub ReplyGuest
%>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12"><div align="left"><img src="images/tot_a.gif" width="12" height="16"></div></td>
<td width="726" background="images/tot_b.gif"> </td>
<td width="12"><div align="right"><img src="images/tot_c.gif" width="12" height="16"></div></td>
</tr>
<tr>
<td height="25" colspan="3" background="images/bg.gif">
<div align="center"><span class="style1">-=> 回复留言<=-</span></div></td>
</tr>
<tr>
<td colspan="3">
<FORM name=myform action="edit.asp?act=replyok" method="post">
<table width=750
border=1 align="center" cellPadding="0" cellSpacing="0" borderColor="#e6e6e6" bgcolor="#FFFFFF">
<tr>
<td width="207" height=30 align=middle bgcolor="#f7f7f7"><div align="right">回复内容:</div></td>
<td width="537"><span class="dp">
<textarea name="rcontent" cols="50" rows="6" id="rcontent"><%=conn.execute("select Replies from TOT_GuestBook where cd='"&cd&"'")(0)%></textarea>
</span></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right"></div></td>
<td height="40"><div align="left"><span class="dp">
<input type="hidden" name="cd" value="<%=cd%>">
<INPUT name="image" type=image src="images/button3.gif" width="77" height="30">
</span></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<TABLE height=2 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD width=12><IMG src="images/tot_aa.gif" width="12" height="12"></TD>
<TD width=726 background=images/tot_bb.gif></TD>
<TD width=12><IMG src="images/tot_cc.gif" width="12" height="12"></TD>
</TR>
</TBODY>
</TABLE>
<%end sub%>
<%
sub ConfigSite
set rs=server.createobject("adodb.recordset")
rs.open "select * from TOT_Admin",conn,3,1
if not rs.eof then
%>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12"><div align="left"><img src="images/tot_a.gif" width="12" height="16"></div></td>
<td width="726" background="images/tot_b.gif"> </td>
<td width="12"><div align="right"><img src="images/tot_c.gif" width="12" height="16"></div></td>
</tr>
<tr>
<td height="25" colspan="3" background="images/bg.gif">
<div align="center"><span class="style1">-=> 系统设置<=-</span></div></td>
</tr>
<tr>
<td colspan="3">
<FORM name=myform action="edit.asp?act=configok" method="post">
<table width=750
border=1 align="center" cellPadding="0" cellSpacing="0" borderColor="#e6e6e6" bgcolor="#FFFFFF">
<tr>
<td width="207" height=30 align=middle bgcolor="#f7f7f7"><div align="right">密码:</div></td>
<td width="537"><span class="dp">
<input name="password" type="text" id="password" size="20">
</span></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">站点标题:</div></td>
<td height="40"><div align="left"><span class="dp">
<input name="title" type="text" id="password3" value="<%=rs("Title")%>" size="20">
</span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">每页显示条数:</div></td>
<td height="40"><div align="left"><span class="dp">
<input name="pagesize" type="text" id="password4" value="<%=rs("PageSize")%>" size="10">
</span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">是否关闭:</div></td>
<td height="40"><div align="left"><span class="dp"> </span>
<select name="closebook">
<option value="0" selected>否</option>
<option value="1">是</option>
</select>
</div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">限制IP:</div></td>
<td height="40"><div align="left"><span class="dp">
<textarea name="ip" cols="50" rows="5."><%=rs("ip")%></textarea>
</span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">过滤字符:</div></td>
<td height="40"><div align="left"><span class="dp">
<textarea name="dechar" cols="50" rows="5." id="dechar"><%=rs("DeChar")%></textarea>
</span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">头内容:</div></td>
<td height="40"><div align="left"><span class="dp">
<textarea name="content" cols="50" rows="5" id="content"><%=rs("content")%></textarea>
</span></div></td>
</tr>
<!--head-->
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">头部内容:</div></td>
<td height="40"><div align="left"><span class="dp">
<textarea name="BBS_Head" cols="50" rows="5" id="content"><%=rs("BBS_Head")%></textarea>
</span></div></td>
</tr>
<!--root-->
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">尾部内容:</div></td>
<td height="40"><div align="left"><span class="dp">
<textarea name="BBS_Root" cols="50" rows="5" id="content"><%=rs("BBS_Root")%></textarea>
</span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right"></div></td>
<td height="40"><div align="left"><span class="dp">
<input type="hidden" name="cd" value="<%=cd%>">
<INPUT name="image" type=image src="images/button3.gif" width="77" height="30">
</span></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<TABLE height=2 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD width=12><IMG src="images/tot_aa.gif" width="12" height="12"></TD>
<TD width=726 background=images/tot_bb.gif></TD>
<TD width=12><IMG src="images/tot_cc.gif" width="12" height="12"></TD>
</TR>
</TBODY>
</TABLE>
<%
end if
end sub
%>
<%
sub Editor
if(isAdmin) then
set rs=server.createobject("adodb.recordset")
rs.open "select * from TOT_GuestBook where cd='"&cd&"'",conn,3,1
if not rs.eof then
%>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12"><div align="left"><img src="images/tot_a.gif" width="12" height="16"></div></td>
<td width="726" background="images/tot_b.gif"> </td>
<td width="12"><div align="right"><img src="images/tot_c.gif" width="12" height="16"></div></td>
</tr>
<tr>
<td height="25" colspan="3" background="images/bg.gif">
<div align="center"><span class="style1">-=> 编辑留言<=-</span></div></td>
</tr>
<tr>
<td colspan="3">
<FORM name=myform action="edit.asp?act=editorok" method="post">
<table width=750
border=1 align="center" cellPadding="0" cellSpacing="0" borderColor="#e6e6e6" bgcolor="#FFFFFF">
<tr>
<td width="207" height=30 align=middle bgcolor="#f7f7f7"><div align="right">留言标题:</div></td>
<td width="537"><span class="dp">
<INPUT id=Title size=50 name="Title" value="<%=rs("Title")%>">
</span></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right">留言内容:</div></td>
<td height="40"><div align="left"><span class="dp">
<TEXTAREA id=GuestContent name="Content" rows=7 cols=50><%=rs("Content")%></TEXTAREA>
</span></div></td>
</tr>
<tr>
<td height=30 align=middle bgcolor="#f7f7f7"><div align="right"></div></td>
<td height="40"><div align="left"><span class="dp">
<input type="hidden" name="cd" value="<%=cd%>">
<INPUT name="image" type=image src="images/button3.gif" width="77" height="30">
</span></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<TABLE height=2 cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD width=12><IMG src="images/tot_aa.gif" width="12" height="12"></TD>
<TD width=726 background=images/tot_bb.gif></TD>
<TD width=12><IMG src="images/tot_cc.gif" width="12" height="12"></TD>
</TR>
</TBODY>
</TABLE>
<%
end if
else
response.Redirect("admin_login.asp")
end if
end sub
%>
<%=application("BBS_Root")%>
</body>
</html>
<%call connclose()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -