<!--#include file="conn.asp"-->
<html><head><title><%=webname%>--用户评论</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<link href="../../mt_style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="5" marginwidth="0" bgcolor="#D9E6FF">
<%dim bookid,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 language=javascript>alert('您的回复已成功提交！！');history.go(-1);</script>"
response.End
end if
%>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr> 
<td align="center" bgcolor="#666666"><b><font color="#ffffff">回复评论</font></b></td>
</tr>
<tr> 
<form name="pinglunform" method="post" action="pinglun.asp?action=save&id=<%=pinglunid%>">
<td bgcolor="#E8F1FF"> 
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun where pinglunid="&pinglunid,conn,1,3
%>
<table width="100%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
<tr bgcolor="#E8F1FF"> 
<td width="40%" align="right">姓 名：</td>
<td width="60%"> 
<input name="pinglunname" type="text" id="pinglunname" size="30" value="<%=rs("pinglunname")%>" readonly>
</td>
</tr>
<tr bgcolor="#E8F1FF"> 
<td align="right">评 级：</td>
<td><img src="../../images/level<%=rs("pingji")%>.gif">
</td>
</tr>
<tr bgcolor="#E8F1FF"> 
<td align="right">评论标题：</td>
<td><input name="pingluntitle" type="text" id="pingluntitle" size="30" value="<%=rs("pingluntitle")%>" readonly></td>
</tr>
<tr bgcolor="#E8F1FF"> 
<td align="right" valign="top">评论正文：</td>
<td><textarea name="pingluncontent" cols="30" rows="3" id="pingluncontent" readonly><%=rs("pingluncontent")%></textarea></td>
</tr>
<tr bgcolor="#E8F1FF"> 
<td align="right" valign="top"><font color="#FF0000">管理回复：</font></td>
<td><textarea name="huifu" cols="30" rows="5" id="huifu"><%=rs("huifu")%></textarea></td>
</tr>
<tr bgcolor="#E8F1FF">
<td></td>
<td>
<input onClick="return check();" name="submit" type="submit" value="回复保存">
<input onclick="ClearReset()" type="reset" name="Clear" value="重新填写"></td>
</tr>
</table>
<%rs.close
set rs=nothing%>
</td>
</form>
</tr>
</table>
</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>