<!--#include file="conn.asp" -->
<%action=request.QueryString("action")
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun",conn,1,3
rs.addnew
rs("bookid")=request("bookid")
rs("pingji")=request("pingji")
rs("pinglunname")=trim(request("pinglunname"))
rs("pingluntitle")=trim(request("pingluntitle"))
rs("pingluncontent")=trim(request("pingluncontent"))
rs("ip")=Request.servervariables("REMOTE_ADDR")
rs("pinglundate")=now()
rs("shenhe")=1
rs.update
rs.close
set rs=nothing
response.write "<span style='height:500px;font-size:12px;padding-top:200px;padding-left:150px;color:red'>您的评论提交成功</span><script>window.setTimeout(""history.go(-1)"",1000);</script>"
response.End
end if%>
<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>