📄 reply.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../public/conn.asp" -->
<%
if not session("quanxian")="master" then
response.redirect "index.asp"
end if
%>
<%
if request("action")="save" then
sql="select * from user where username='" & session("username")&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,secondconn,1,2
replyauthor=rs("nickname")
rs.close
set rs=nothing
replycontent=request.form("replycontent")
sql1="select * from guestbook where id=" & request("id")
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,secondconn,3,3
rs1("replycontent")=replycontent
rs1("replytime")=now()
rs1("replyauthor")=replyauthor
rs1.update
rs1.close
set rs1=nothing
response.Redirect "index.asp"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="reply.asp?action=save&id=<%=request("id")%>" onsubmit="return VerifyInput();">
<table width="600" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
<td><div align="center">回复留言</div></td>
</tr>
<tr>
<td><div align="center">
<textarea name="replycontent" cols="60" rows="10" id="replycontent"></textarea>
</div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form>
</body>
</html>
<script language="JavaScript">
//-->
function VerifyInput()
{
replycontent = document.form1.replycontent.value;
if (replycontent == "")
{
alert("请填写回复内容");
document.myform.replycontent.focus();
return false;
}
if (replycontent == "无")
{
alert("回复内容不能为“无”");
document.myform.replycontent.focus();
return false;
}
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -