📄 hfbook.asp
字号:
<%@ codepage ="936" %>
<%
if instr(session("flag"),"01")=6 then
response.redirect "../login.asp"
response.end
end if
%>
<!--#include file="../../conn/dbconn2.asp" -->
<link rel="stylesheet" type="text/css" href="../style.css">
<STYLE type=text/css>
<!--
td { font-family: "宋体"; font-size: 9pt; line-height: 14pt; }
-->
</STYLE>
<p> </p>
<div align="center">
<center>
<table width="80%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="20" bgcolor="#E8F4FF" width="80%">
<div align="center"><strong>
<font color="#FF0000" style="font-size: 10.5pt">回 复 留 言</font></strong></div></td>
</tr>
<tr>
<Form language=javascript name="Gbhf" method="POST" action="hfbook.asp?id=<%=request("id")%>&up=add" onsubmit="return Gbhf_onsubmit()">
<td height="56" valign="top" width="80%">
<div align="center">
<center>
<table width="100%" border="1" cellspacing="1" bgcolor="F4F4F4" bordercolorlight="#E8F4FF" bordercolordark="#E8F4FF" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="524" bgcolor="#FBFDFF">
<textarea name="G_Content" cols="55" rows="10" id="G_Content"></textarea>
</tr>
<tr align="center">
<td height="30" colspan="2" width="653" bgcolor="#FBFDFF"> <input type="submit" name="Submit" value="回 复">
</td>
</tr>
</table></center>
</div>
</td>
</Form>
</tr>
<tr>
<td height="20" valign="top" bgcolor="#E8F4FF" width="80%"> </td>
</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="&request("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
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -