<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "../admin/tuzh_pri.asp"-->
<!--#include file="../connadmin.asp"-->
<%id=cint(request("id"))
act=request("act")
function invert(str) 
    invert=replace(replace(replace(replace(replace(replace(str,"&lt;","<"),"&gt;",">"),"<img src='","[img]"),"'>","[/img]"),"<br>",chr(13)),"&nbsp;"," ")
end function

function invert2(str)
    invert2=replace(replace(replace(replace(replace(replace(str," ","&nbsp;"),"<","&lt;"),">","&gt;"),"[img]","<img src='"),"[/img]","'>"),chr(13),"<br>")
end function

if act="modi" then
huitxt=request("hui")
set rs=server.createobject("ADODB.recordset")
sql="select * from tubook where id="& id
rs.open sql,conn,1,3
rs("bookhui")=invert2(huitxt)
rs("huitime")=now()
rs.update
rs.close
response.Redirect("admin_do.asp")
end if
set rs=server.createobject("ADODB.recordset")
sql="select * from tubook where id="& id &" order by id desc"
rs.open sql,conn,1,1
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../img/css.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=site_name%></title>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>
</head>

<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr> 
    <td height="565" align="center" valign="top" class="bg_low"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>留言回复</b></font> 
          </td>
        </tr>
      </table>
      <form id="form1" name="form1" method="post" action="book_do.asp?act=modi&id=<%=id%>">
        <table width="494" border="1" cellpadding="4" cellspacing="0" bordercolor="#ABCEDD">
          <tr> 
            <td width="90">姓名：</td>
            <td width="384">&nbsp;<%=rs("bookname")%></td>
          </tr>
          <tr> 
            <td>主题：</td>
            <td><%=rs("booktitle")%>&nbsp;</td>
          </tr>
          <tr> 
            <td>E-mail：</td>
            <td><%=rs("bookemail")%>&nbsp;</td>
          </tr>
          <tr> 
            <td>时间</td>
            <td valign="top"><%=rs("booktime")%>&nbsp;</td>
          </tr>
          <tr> 
            <td>ip：</td>
            <td valign="top"><%=rs("txtip")%>&nbsp;</td>
          </tr>
          <tr> 
            <td>留言内容</td>
            <td valign="top"><%=rs("bookcon")%>&nbsp;</td>
          </tr>
          <tr> 
            <td>回复</td>
            <td valign="top"><label> 
              <textarea name="hui" cols="50" rows="7" id="textarea"><%=invert(rs("bookhui"))%></textarea>
              </label></td>
          </tr>
          <tr> 
            <td align="right"><input type="submit" name="Submit" value="提交" /></td>
            <td><input type="reset" name="Submit2" value="重置" /></td>
          </tr>
        </table>
      </form>
      <%rs.close
conn.close%>
    </td>
  </tr>
</table>
</body>
</html>
