📄 reply.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="ubbcode.asp"-->
<% if not Session("rank")>=1 then
response.Redirect("index.asp")
Response.End()
end if%>
<link href="style.css" rel="stylesheet" type="text/css">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from guestbook where id="&request("id")
rs.open sql,dbconn,1,3
if request("action")<>"save" then
%>
<SCRIPT language=JavaScript>
function CheckInput(){
if(form.reply.value==''){
alert("内容不能为空!");
form.reply.focus();
return false;
}
if(form.reply.value.length>300){
alert("内容不能超过300个字符!");
form.reply.focus();
return false;
}
return true;
}
</SCRIPT>
<body>
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<form action="reply.asp?action=save&id=<%=request("id")%>" method="post" name="form" id="form" onsubmit=return(CheckInput())>
<table width="530" bgcolor="#FFFFFF" class="atable1">
<tr>
<td>
<table class=tdmenu width="520" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center"> <table width="100%" border="0" class=log_titlewidth="100%">
<tr>
<td width="65%" align="right"><strong>管 理 员 回 复 </strong></td>
<td align="right"> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="65%"> 回复<font color="#990033"><%=rs("name")%></font>的留言</td>
<td><div align="right"></div></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="middle">回复内容:</td>
<td width="318"> <textarea name="reply" cols="38" rows="8" class="1" id="reply"><%=rs("reply")%></textarea>
</td>
</tr>
<tr>
<td height="30" colspan="2" align="center"> <input type="submit" class=log value="回复留言" name="button">
<input name="Submit2" type="reset" class=log id="Submit2" value="清除重写">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
<%
else
if request.form("reply")="" then
response.write"<SCRIPT language=JavaScript>alert('公告内容不能为空!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
rs("reply")=Server.HTMLEncode(request.form("reply"))
rs.update
rs.close
set rs=nothing
response.redirect "index.asp"
end if
end if
dbconn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -