?? hfbook.asp
字號:
<%@ codepage ="936" %>
<%
if Request.Cookies("globalec")("globalecmaster")="" or Request.Cookies("globalec")("masterflag")="" then
response.write "<script language='javascript'>"
response.write"this.location.href='../login.asp';</SCRIPT>"
response.end
end if
if instr(Request.Cookies("globalec")("masterflag"),"02")=0 then
response.redirect "../err.asp"
response.end
end if
if Chkrequest(request("id")) then
id=request("id")
else
Response.Redirect ("/login/chklogin.asp?login=4")
end if
%>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<link rel="stylesheet" type="text/css" href="../css/style.css">
<title>回復留言</title><table width="98%" border="0" cellpadding="0" cellspacing="0" class="tableBorder">
<tr>
<th height="20" class="tableHeaderText" align="center">
<strong>
<font color="#FFffff">回 復 留 言</font></strong></td>
</th>
<tr>
<Form language=javascript name="Gbhf" method="POST" action="hfbook.asp?id=<%=id%>&up=add" onsubmit="return Gbhf_onsubmit()">
<td height="56" valign="top">
<div align="center">
<center>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="#111111" bordercolorlight="#E8F4FF" bordercolordark="#E8F4FF" bgcolor="F4F4F4" style="border-collapse: collapse">
<tr>
<td width="524" bgcolor="#FBFDFF">
<textarea name="G_Content" cols="72" rows="13" id="G_Content"></textarea>
</tr>
<tr align="center">
<td height="30" colspan="2" class=forumRowHighlight> <input type="submit" name="Submit" value="確 定 回 復">
</td>
</tr>
</table></center>
</div>
</td>
</Form>
</tr>
</table>
</center>
</div>
<SCRIPT language=javascript>
<!--
function Gbhf_onsubmit()
{
if(trim(document.Gbhf.G_Content.value)=="")
{
alert("回復不能為空!");
document.Gbhf.G_Content.focus();
return false;
}
}
//-->
//-->
function trim(inputString) {
if (typeof inputString != "string") { return inputString; }
var retValue = inputString;
var ch = retValue.substring(0, 1);
while (ch == " ") {
//檢查字符串開始部分的空格
retValue = retValue.substring(1, retValue.length);
ch = retValue.substring(0, 1);
}
ch = retValue.substring(retValue.length-1, retValue.length);
while (ch == " ") {
//檢查字符串結束部分的空格
retValue = retValue.substring(0, retValue.length-1);
ch = retValue.substring(retValue.length-1, retValue.length);
}
while (retValue.indexOf(" ") != -1) {
//將文字中間多個相連的空格變為一個空格
retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length);
}
return retValue;
}
//-->
</SCRIPT>
<%
if request("up")="add" then
Gcontent=request.form("G_Content")
set rs=server.createobject("adodb.recordset")
sql="select * from guestbook where id="&id&""
rs.open sql,conn,1,3
rs("reContent")=server.htmlencode(Gcontent)
rs("retime")=now()
rs.update
rs.close
conn.close
response.write"<SCRIPT language=JavaScript>alert('回復留言成功!');"
response.write"javascript:window.close();</script>"
response.end
End if
conn.execute("update guestbook set hf=1 where id="&request("id")&"")
%>
<script>
function window.onbeforeunload(){
window.opener.location.reload()
}
</script>
<br>
<!--#include file="../copy.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -