<!--#include file="../include/Conn.jsp"-->
<!--#include file="../Include/Char.jsp" -->
<!--#include file="Admin_IsLogin.jsp" -->


<%
if Request.QueryString("action") = "read" then
  m_ID = checkstr(Request.QueryString("ID"))
  m_Sql = "SELECT * FROM T_Gbook WHERE F_ID=" & m_ID
  Set rs = conn.Execute(m_Sql)
  if Not rs.Eof then
    m_UserName = rs("F_UserName")
    m_Content = rs("F_Content")
    m_ReplyContent = rs("F_ReplyContent")	
  end if
end if

If Request.ServerVariables("REQUEST_METHOD")="POST" then
  'Read Reuest
  m_ID = Request.Form("hidID")
  m_ReplyContent= checkStr(Trim(Request.Form("txtReplyContent")))
  m_Content = checkStr(rTrim(Request.Form("txtContent")))
  m_Addtime = (Trim(Request.Form("txtAddtime")))
  m_Sql = "Update T_Gbook set"
  m_Sql = m_Sql + " F_ReplyContent='"&m_ReplyContent&"',"
  m_Sql = m_Sql + " F_Content='"&m_Content&"',"
  m_Sql = m_Sql + " F_ReplyTime='"&m_Addtime&"'"
  m_Sql = m_Sql + " Where F_ID="&m_ID
  conn.Execute(m_Sql)
  Call CloseDataBase()
  Response.Write "<script language=""javascript"">opener.location.reload();window.close()</script>"
end if
%>
<html>
<head>
<title>修改记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../Include/Style.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function CheckData()
{
  if (document.form1.txtName.value=="")
  {
    alert("对不起，姓名不能为空，请输入！");
	document.form1.txtName.focus();
	return false;
   }
}
//-->
</script>
</head>

<body bgcolor="#CCCCCC" leftmargin="0" topmargin="0">
<table width="488" border="0" cellpadding="0" cellspacing="1">
  <tr>
    <form name="form1" method="post" action="admin_GbookCallback.jsp" onSubmit="return CheckData()">
      <td valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="f2f2f2">
          <tr align="center"> 
            <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td align="center" background="../images/mmTo.gif"><span style="CURSOR: hand; FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1);  WIDTH: 100%"><strong>留言回复</strong></span><strong><span style="CURSOR: hand; FILTER: dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1);  WIDTH: 100%"> 
                    </span></strong></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td width="14%" height="3" align="right" bgcolor="#FFFFFF">留 言 者：</td>
            <td width="86%" height="19" bgcolor="#FFFFFF"><%= m_UserName %>&nbsp; </td>
          </tr>
          <tr> 
            <td height="4" align="right" bgcolor="#FFFFFF">留言内容：</td>
            <td width="86%" height="4" bgcolor="#FFFFFF"><textarea name="txtContent" cols="54" rows="7" class="text"><%=m_Content%></textarea></td>
          </tr>
          <tr> 
            <td height="7" align="right" bgcolor="#FFFFFF">回复内容：</td>
            <td bgcolor="#FFFFFF"><textarea name="txtReplyContent" cols="54" rows="8" class="text"><%=m_ReplyContent%></textarea></td>
          </tr>
          <tr> 
            <td height="27" align="right" bgcolor="#FFFFFF">回复时间：</td>
            <td bgcolor="#FFFFFF"><input name="txtAddtime" type="text" class="text" value="<%=now()%>" size="21" maxlength="50"> 
              <input name="hidID" type="hidden" value="<%=m_ID%>"> 
              <input name="hidUserID" type="hidden" value="<%=m_UserID%>"></td>
          </tr>
          <tr> 
            <td height="16" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="35" bgcolor="#FFFFFF"><input type="submit" name="Submit" value="提交"> 
              <input type="reset" name="Submit2" value="取消"> <input type="button" name="Submit22" value="关闭" onClick="javascript:window.close()"></td>
          </tr>
        </table></td>
    </form>
  </tr>
</table>
</body>
</html>
