<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if%>
<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">
</head>
<body leftmargin="0" topmargin="5" marginwidth="0" >
<%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 review 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" background="../images/admin_bg_1.gif"><b><font color="#ffffff">发表评论</font></b></td>
</tr>
<tr> 
<form name="pinglunform" method="post" action="review.asp?action=save&id=<%=pinglunid%>">
<td > 
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from review where pinglunid="&pinglunid,conn,1,3
%>
<table width="100%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
<tr > 
<td width="23%" align="right">姓 名：</td>
<td width="77%"> 
<input name="pinglunname" type="text" id="pinglunname" size="30" value="<%=rs("pinglunname")%>" readonly>
</td>
</tr>
<tr > 
<td align="right">评 级：</td>
<td><img src="../images/level<%=rs("pingji")%>.gif">
</td>
</tr>
<tr > 
<td align="right">评论标题：</td>
<td><input name="pingluntitle" type="text" id="pingluntitle" size="30" value="<%=rs("pingluntitle")%>" readonly></td>
</tr>
<tr > 
<td align="right" valign="top">评论正文：</td>
<td><textarea name="pingluncontent" cols="30" rows="3" id="pingluncontent" readonly><%=rs("pingluncontent")%></textarea></td>
</tr>
<tr > 
<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 >
<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>
