<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx1<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<html>
<head>
<title><%=webname%>--用户评论</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #000000;
	font-weight: bold;
}
-->
</style>
</head>
<body leftmargin="3" topmargin="4" marginwidth="00">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/right_top2.gif">
  <tr>
    <td width="1%">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td width="30%" style="font-size:14px;color:#ffffff">&nbsp;<span class="style1">发表评论</span></td>
          <td width="70%" align="right">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
<%dim shopid,action
pinglunid=request.QueryString("id")
action=request.QueryString("action")
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun where pinglunid="&pinglunid,conn,1,3
rs("huifu")=HTMLEncode2(trim(request("huifu")))
rs("huifudate")=now()
rs.update
rs.close
set rs=nothing
response.write "<script>alert('回复已提交');location.href='managepinglun.asp?action=all'</script>"
response.End
end if
%>
<br>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun where pinglunid="&pinglunid,conn,1,3
%>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
  <form name="pinglunform" method="post" action="pinglun.asp?action=save&id=<%=pinglunid%>"><tr bgcolor="#cccccc">
    <td colspan="4"><div align="center"><strong>评论标题：</strong>
          <input name="pingluntitle" class="wenbenkuang" type="text" id="pingluntitle" size="26" value="<%=rs("pingluntitle")%>" readonly>      
          <strong>IP：</strong><%=trim(rs("ip"))%><strong> 姓名：</strong>
          <input name="pinglunname" class="wenbenkuang" type="text" id="pinglunname2" size="12" value="<%=rs("pinglunname")%>" readonly>
          <strong>评级：</strong><img src="../img/pingji/<%=rs("pingji")%>.gif"></div></td>
    </tr>
  <tr bgcolor="#F3F3F3">
    <td width="14%" valign="top"><div align="center"><strong>评论正文：</strong></div></td>
    <td colspan="3">
      <textarea name="pingluncontent" class="wenbenkuang" cols="80" rows="5" id="pingluncontent" readonly><%=rs("pingluncontent")%></textarea>
    </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td valign="top"><div align="center"><font color="#FF0000">管理回复：</font></div></td>
    <td colspan="3">
      <textarea name="huifu" cols="80" rows="5" id="huifu"><%=rs("huifu")%></textarea>
    </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td colspan="4">
      <div align="center">
        <input name="Submit" type="submit" class="go-wenbenkuang" value="提交回复" onClick="return check();">
    </div></td>
  </tr></form>
</table>
<%rs.close
set rs=nothing%>
</body>
</html>
<%function HTMLEncode2(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode2 = fString
end function%>
<script LANGUAGE="javascript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function check()
{
  if(checkspace(document.pinglunform.pinglunname.value)) {
	document.pinglunform.pinglunname.focus();
    alert("请填写您的姓名！");
	return false;
  }
  if(checkspace(document.pinglunform.pingluntitle.value)) {
	document.pinglunform.pingluntitle.focus();
    alert("请填写评论标题！");
	return false;
  }
  if(checkspace(document.pinglunform.pingluncontent.value)) {
	document.pinglunform.pingluncontent.focus();
    alert("请填写评论正文！");
	return false;
  }
	  }
//-->
</script>