<!--#include file="conn.asp"-->
<!--#include file="webconfig.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">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>
<body leftmargin="3" topmargin="4" marginwidth="00">
<%dim bookid,action
bookid=request.QueryString("id")
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")=bookid
rs("pinglunname")=HTMLEncode2(trim(request("pinglunname")))
rs("pingluncontent")=HTMLEncode2(trim(request("pingluncontent")))
rs("pinglundate")=now()
rs("shenhe")=0
rs.update
rs.close
set rs=nothing
response.write "<br><br><table width=96% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=86 bgcolor=#F5F5F5><div align=center>"
response.write "您的评论已成功提交<br>经我们审核通过后方可发布！！<br><br><a href=javascript:window.close()>关闭窗口</a></div></td></tr></table>"
response.End
end if
%>
<table width="98%" border="1" cellspacing="0" cellpadding="1" bordercolor="#75A3D0" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" cellspacing="1" cellpadding="2">
                          <tr> 
                            <td><img src="images/postreviws1.gif" width="280" height="21"></td>
                          </tr>
                          <tr> 
                            <form name="pinglunform" method="post" action="pinglun.asp?action=save&id=<%=bookid%>">
                              <td> 
                                <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
                                  <tr bgcolor="#F5F5F5"> 
                                    <td width="23%">您的姓名：</td>
                                    <td width="77%"> 
                                      <input name="pinglunname" type="text" id="pinglunname" size="12">
                                    </td>
                                  </tr>
                                  <tr bgcolor="#F5F5F5"> 
                                    <td valign="top">评论正文：</td>
                                    <td> 
                                      <textarea name="pingluncontent" cols="26" rows="5" id="pingluncontent"></textarea>
                                    </td>
                                  </tr>
                                  <tr bgcolor="#F5F5F5"> 
                                    <td colspan="2"> 
                                      <div align="center"> 
                                        <input type="submit" name="Submit"style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="提 交" onClick="return check();">
                                        &nbsp; 
                                        <input type="reset" name="Submit2" style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="清 除">
                                      </div>
                                    </td>
                                  </tr>
                                </table>
                              </td>
                            </form>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </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.pingluncontent.value)) {
	document.pinglunform.pingluncontent.focus();
    alert("请填写评论正文！");
	return false;
  }
	  }
	  //-->
</script>