<!--#include file="Config.asp" -->
<div class='menu'>&nbsp;编辑 &gt; 留言</div>
<%
eims = "FeedBack"
eTable = Prefix&eims
ListUrl = eims&"List.asp?eims="&eims
EditUrl = eims&"Edit.asp?eims="&eims
Mgt("p01") 'Cookies : Permission
'------------------------------------------------
If action = "Save" Then
If Trim(Request.Form("Reply")) = "" Then WtMsg("回复内容不能为空")
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open "Select * From ["&eTable&"] Where ItemID="&ItemID,Conn,1,3
Rs("Reply") = Trim(Request.Form("Reply"))
Rs.Update
Rs.Close:Set Rs=Nothing
Response.Write "<script>alert('回复成功！');location.href='"&ListUrl&"';</script>"
Response.End
End If
'================================================
'显示数据
'================================================
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open "Select * From ["&eTable&"] Where ItemID="&ItemID,Conn,1,1
If Not Rs.Eof Then
UserName = Trim(Rs("UserName"))
Title = Trim(Rs("Title"))
ItemNote = Trim(Rs("ItemNote"))
AddDate = Rs("AddDate")
Reply = Trim(Rs("Reply"))
QQ = Trim(Rs("QQ"))
Tel = Trim(Rs("Tel"))
Mail = Trim(Rs("Mail"))
UserType = Trim(Rs("UserType"))
End If
Rs.Close:Set Rs=Nothing
%>
<div class="content">
<Form name='eForm' method='post' action='<%=EditUrl%>&action=Save&ItemID=<%=ItemID%>'>
  <table width="100%" border="0" cellspacing="1" cellpAdding="1" align="center">
      <tr>
        <td align="center" width="12%">用户</td>
        <td><%=UserName%> | <%=UserRank(UserType)%></td>
      </tr>
      <tr>
        <td align="center">电话</td>
        <td><%=Tel%></td>
      </tr>
      <tr>
        <td align="center">邮箱</td>
        <td><%=Mail%></td>
      </tr>
      <tr>
        <td align="center">MSN/QQ</td>
        <td><%=QQ%></td>
      </tr>
      <tr>
        <td align="center">时间</td>
        <td><%=AddDate%></td>
      </tr>
      <tr>
        <td align="center">标题</td>
        <td><%=Title%></td>
      </tr>
      <tr>
        <td align="center">内容</td>
        <td><%=ItemNote%></td>
      </tr>
      <tr>
        <td align="center">回复</td>
        <td><textarea name="Reply" cols="60" rows="8"><%=Reply%></textarea></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td></td>
        <td align="left"><input type="submit" name="Submit" value="回 复">
          &nbsp;&nbsp;<input type="button" value="返 回" onClick="history.go(-1);"></td>
      </tr>    
  </table>
</Form>
</div>
</body></html>
<%Call CloseConn()%>
