<!--#include file="../../Include/Const.asp" -->
<!--#include file="../../Include/Conn1.asp" -->
<!--#include file="../CheckAdmin.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" src="../inc/Admin.js"></script>
<link rel="stylesheet" href="../Images/CssAdmin.css">
      <%
	  dim ID,Action
	  ID=Request("ID")
	  if ID="" or isnumeric(ID)=false then
	  	Response.write "<script>"
		Response.write "alert('系统无法获取留言信息！');"
		Response.write "window.location.href='User_Message.asp';"
		Response.write "</script>"
		Response.End
	  end if
	  Action = Request("Action")

	set oRs=server.createobject("adodb.recordset")
	  if Action="add" then
	  sSql = "Select * from Angel_Message where ID="&ID
	   oRs.Open sSql, Conn,3,3
	   ors("Re_Mess")=Request("Tb_Reply")
	   ors("Re_Date")=now()
	   ors.update
	   ors.close
	   Response.write "<script>"
		Response.write "alert('留言回复成功！');"
		Response.write "window.location.href='User_Message.asp';"
		Response.write "</script>"
		Response.End
	  end if
	  sSql = "Select * from Angel_Message where ID="&ID
	   oRs.Open sSql, Conn, 1, 1
	   %>
 <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#628AE1">
   <tr>
     <td height="24" nowrap="nowrap"><font color="#FFFFFF"><img src="../Images/Explain.gif" width="18" height="18" border="0" align="absmiddle" />&nbsp;<strong>回复，删除，搜索留言信息</strong></font></td>
   </tr>
   <tr>
     <td height="36" align="center" nowrap="nowrap"  bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0">
         <tr>
           <form action="Search.asp" method="post" name="formSearch" id="formSearch">
             <td nowrap="nowrap"> 留言搜索：从
               <script language="JavaScript" type="text/javascript"> 
          var myDate=new dateSelector(); 
          myDate.year--; 
		  myDate.date; 
          myDate.inputName='start_date';  //注意这里设置输入框的name，同一页中日期输入框，不能出现重复的name。 
          myDate.display(); 
          </script>
               &nbsp;到
               <script language="JavaScript" type="text/javascript"> 
          myDate.year++;
		  myDate.year++;
          myDate.inputName='end_date';  //注意这里设置输入框的name，同一页中的日期输入框，不能出现重复的name。 
          myDate.display(); 
          </script>
               &nbsp;&nbsp;关键字：
               <input name="Keyword" type="text" class="textfield" value="<%=Keyword%>" size="18" />
               <input name="submitSearch" type="submit" class="button" value="搜索" />
             </td>
             <td align="right" nowrap="nowrap">&nbsp;</td>
           </form>
         </tr>
     </table></td>
   </tr>
 </table>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
     <td height="25">留言：回复</td>
   </tr>
 </table>
<%
	   if oRs.eof then
	   %>
	   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td  height="60" align="center">系统无法获取留言信息</td>
         </tr>
 </table>
	   <%
	   else
	   do while not ors.eof
	   
	  %>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#f7f7f7">
        <tr>
          <td width="80" height="20" bgcolor="#d7e3f7">留言标题：</td>
          <td align="left" bgcolor="#d7e3f7"><b><%=ors("Title")%></b></td>
          <td width="180" align="right" bgcolor="#d7e3f7">留言时间：<%=ors("adddate")%></td>
        </tr>
		<tr>
          <td height="20" bgcolor="#ffffff">公司名称：</td>
		  <td align="left" bgcolor="#ffffff"><%=ors("Company")%></td>
	      <td align="left" bgcolor="#ffffff">&nbsp;</td>
		</tr>
		<tr>
          <td height="20" bgcolor="#ffffff">联系人：</td>
		  <td align="left" bgcolor="#ffffff"><%=ors("username")%></td>
	      <td align="left" bgcolor="#ffffff">&nbsp;</td>
		</tr>
		<tr>
          <td height="20" bgcolor="#ffffff">联系电话：</td>
		  <td align="left" bgcolor="#ffffff"><%=ors("phone")%></td>
	      <td align="left" bgcolor="#ffffff">&nbsp;</td>
		</tr>
		<tr>
          <td height="20" bgcolor="#ffffff">手机：</td>
		  <td align="left" bgcolor="#ffffff"><%=ors("Mobile")%></td>
	      <td align="left" bgcolor="#ffffff">&nbsp;</td>
		</tr>
        <tr>
          <td height="20" bgcolor="#ffffff">邮箱：</td>
          <td align="left" bgcolor="#ffffff"><%=ors("email")%></td>
          <td align="left" bgcolor="#ffffff">&nbsp;</td>
        </tr>
        <tr>
          <td height="20" bgcolor="#ffffff">地址：</td>
          <td colspan="2" align="left" bgcolor="#ffffff"><%=ors("address")%></td>
        </tr>
        <tr>
          <td height="20" bgcolor="#ffffff">邮编：</td>
          <td align="left" bgcolor="#ffffff"><%=ors("Zipcode")%></td>
          <td align="left" bgcolor="#ffffff">&nbsp;</td>
        </tr>
        <tr>
          <td height="20" bgcolor="#ffffff">留言内容：</td>
          <td align="left" bgcolor="#ffffff"><%=htmlencode2(ors("Message"))%></td>
          <td align="left" bgcolor="#ffffff">&nbsp;</td>
        </tr>
        <form id="form1" name="form1" method="post" action="User_Message_Reply.asp"><tr>
          <td height="20" bgcolor="#ffffff">管理员回复：</td>
          <td align="left" bgcolor="#ffffff">
            
			
              <textarea name="Tb_Reply" cols="40" rows="10" id="Tb_Reply"><%=ors("re_mess")%></textarea>
              <input name="ID" type="hidden" id="ID" value="<%=ID%>" />
                     <input name="Action" type="hidden" id="Action" value="add" /></td>
          <td align="left" bgcolor="#ffffff">&nbsp;</td>
        </tr>
		<tr>
          <td height="20" align="center" bgcolor="#ffffff">&nbsp;</td>
          <td height="20" colspan="2" align="left" bgcolor="#ffffff"><input type="submit" name="Submit" value="提交"  class="input_submit"/>
            <input type="reset" name="Submit2" value="重置"  class="input_submit"/></td>
        </tr></form> 
 </table>
<br>
	  <%
	  ors.movenext
	  loop
	  %>
<%
			  end if
			  ors.close
			  %>
	  </td>
  </tr>
</table>

