?? reply.asp
字號:
<%@ language=VBScript %>
<!--#include file="setup.asp"-->
<!--#include file="inc/check.asp"-->
<%
call index()
sub index()
if Request("menu") = "replyadd" then
call replyadd()
end if
%>
<html><head><title><%=gbook_name%>--站長回復</title>
<link rel="stylesheet" href="../css/admin.css">
</head>
<body topmargin=0 background="">
<table width=600 height="27" border=1 bordercolor="#FFFFFF" align="center" cellpadding=0 cellspacing=1 style="border: 1px solid #CCCCCC;">
<tr>
<td width="245"><div align="right">【<a href="index.asp">查看留言</a>】 【<a href="write.asp">簽寫留言</a>】</div></td>
</tr>
</table>
<br>
<script language="JavaScript1.2">
<!--
clckcnt = 0;
var postmaxchars = <%=bodymax%>;
function clckcntr(eventobject){if(event.ctrlKey && window.event.keyCode==13){clckcnt++;if (clckcnt>1)
{alert('回復正在發出,請耐心等待!');return false;}document.reply.Submit.disabled = true; this.document.reply.submit();}}
function validate(theform) {
if (theform.password.value=="" || theform.reply.value=="") {
alert("管理口令和回復內容是必須填寫的!");
clckcnt=0;
return false; }
if (postmaxchars != 0) {
if (theform.reply.value.length > <%=bodymax%>) {
alert("你的信息太長了.\n\n請限制在 "+<%=bodymax%>+" 字節以內.\n當前已有 "+theform.reply.value.length+" 字節.");
clckcnt=0;
return false; }
else { document.reply.Submit.disabled = true; return true; }
} else {
document.reply.Submit.disabled = true; return true; }
}
-->
</script>
<table width="600" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#999999">
<tr bgcolor="#ebebeb">
<td height="210" align="center" valign="middle" bgcolor="#f7f7f7">
<form name=reply method="post" action="reply.asp" onSubmit="return validate(this)">
<input type=hidden name=menu value=replyadd>
<input type=hidden name=replyid value=<%=request("replyid")%>>
<table width="86%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#f7f7f7">
<td width="17%" align="center" nowrap>管理口令:</td>
<td width="83%" nowrap>
<input type="password" name="password" size="20" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#F7FBFF'" onMouseOut = "this.style.backgroundColor = ''" value=<%=Request.cookies("password")%>> <input type=checkbox name=save value=save <%if Request.cookies("save") <> "" then%>checked<%end if%>>記住密碼
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td align="center" nowrap>回復內容:</td>
<td nowrap>
<textarea name="reply" cols="60" rows="6" wrap=hard style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#F7FBFF'" onMouseOut = "this.style.backgroundColor = ''" onkeydown=clckcntr()></textarea>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td colspan="2" align="center" nowrap>
<input type="submit" name="Submit" value="回 復" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋體; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
<input type="reset" name="Submit2" value="重 置" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋體; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
<input type="button" name="Submit3" value="取 消" Onclick="javascript:history.back(-1);" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋體; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
</td>
</tr></form>
</table>
</td>
</tr>
</table>
<br>
<%
call htmlend()
Response.End
end sub
sub replyadd()
dim password,reply,replyid
password = Request.form("password")
reply = htmlencode2(trim(Request.form("reply")))
replyid = Request.form("replyid")
save = Request.form("save")
if replyid = "" then
message=message&"對不起,你的回復ID號不能為空!\n"
end if
sql = "select * from gbook where id="&replyid
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
message=message&"對不起,你的回復ID號不存在!\n"
end if
Rs.close
if password <> passwords then
message=message&"您的管理口令不正確!\n"
end if
if reply = "" then
message=message&"回復內容不能為空!\n"
end if
if reply <>"" and len(reply)> bodymax then
message=message&"對不起,回復字數不能超過 "&bodymax&" 字,謝謝!\n"
end if
if message <> "" then
call error(""&message&"")
Response.end
else
if save <> "" then
Response.cookies("password") = password
Response.cookies("save") = save
else
Response.cookies("password") = ""
Response.cookies("save") = ""
end if
sql = "select * from reply"
Rs.open sql,conn,3,2
Rs.addnew
Rs("reply")=reply
Rs("replytime")=now
Rs("replyid")=replyid
Rs.update
Rs.close
conn.close
set Rs = nothing
set conn = nothing
Response.redirect "index.asp"
Response.End
end if
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -