<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录！');history.go(-1);</script>"
response.End
else
if request.cookies("timesshop")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录！');history.go(-1);</script>"
response.End
end if
end if

dim messid,action
messid=SafeRequest("id",1)
action=Request.Form("action")
select case action
case "save"
if session("rank")>2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('你无权回复留言！');history.go(-1);</script>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select messfrom from mess where messid="&messid,conn,1,3
rs("messfrom")=trim(request.form("messfrom"))
rs.update
rs.close
set rs=nothing
conn.close
set conn = nothing
response.write "<script language=javascript>alert('回复成功！');history.go(-1);</script>"
response.End
case ""
%>
<title>回复留言</title>
<% set rs=server.CreateObject("adodb.recordset")
rs.open "select * from mess where messid="&messid,conn,1,1

%>

	
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class=table-zuoyou>
  <form name="form1" method="post" action="replymess.asp?id=<% = messid %>">
  <tr> 
    <td align="center" colspan="3" class=table-xia height="28"><b>回复留言</b></td>
  </tr>
		  <tr height=25> 
            <td width="10%" class=table-youxia style="PADDING-LEFT: 6px">留言主题：</td>
            <td width="40%" class=table-youxia style="PADDING-LEFT: 6px"><%=trim(rs("messsubject"))%></td>
            <td width="50%" class=table-xia style="PADDING-LEFT: 6px">留言类型： 
              <% select case rs("messtype")
case "1"
response.write "普通留言"
case "2"
response.write "意见建议"
case "3"
response.write "缺货登记"
case "4"
response.write "合作意向"
case "5"
response.write "产品投诉"
case "6"
response.write "服务投诉"
end select %>
             </td>
          </tr>
          <tr height=25> 
            <td class=table-youxia style="PADDING-LEFT: 6px">留言用户：</td>
            <td class=table-youxia style="PADDING-LEFT: 6px"> <a href=mailto:<% = trim(rs("messemail"))%>><% = trim(rs("messusername")) %></a></td>
            <td class=table-xia style="PADDING-LEFT: 6px">电子邮件： <a href=mailto:<% = trim(rs("messemail"))%>>
              <% = trim(rs("messemail")) %>
              </a></td>
          </tr>
          <tr height=25> 
            <td class=table-youxia style="PADDING-LEFT: 6px">发表时间：</td>
            <td class=table-youxia style="PADDING-LEFT: 6px"><%=rs("messdtm")%> 来访IP：<% = trim(rs("messip")) %></td>
            <td class=table-xia style="PADDING-LEFT: 6px">联系电话：<% = trim(rs("messtel")) %></td>
          </tr>
          <tr height=30> 
            <td style="PADDING-LEFT: 6px" valign="top" class=table-youxia>留言内容：</td>
            <td colspan="2" style="PADDING-LEFT: 6px" class=table-youxia><%=trim(rs("messcontent"))%></td>
          </tr>
          <tr> 
            <td valign="top" class=table-youxia style="PADDING-LEFT: 6px">回　　复：</td>
            <td colspan="2" class=table-xia style="PADDING-LEFT: 6px"><TEXTAREA NAME="messfrom" COLS="80" ROWS="6"><%=trim(rs("messfrom"))%></TEXTAREA></td>
          </tr>
          <tr> 
            <td height="28" colspan="3" class=table-xia style="PADDING-LEFT: 6px" align="center"> 
			<input name="action" type="hidden" value="save">
			<input type="submit" name="Submit" value="回 复"></td>
          </tr>
		  </form>
        </table>
      
<%
rs.close
set rs=nothing 
conn.close
set conn = nothing%>
 <!--#include file="footer.asp"-->
<% end select %>