<%
if request.cookies("buyok")("admin")="" then response.write "<meta http-equiv='refresh' content='0;URL=../admin.asp'>"
%>
<!--#include file="../include/config.asp"-->

<script language=javascript src=../include/mouse.js></script>
     <%
sub checkmanage(str)
Set mrs = conn.Execute("select * from manage where username='"&request.cookies("buyok")("admin")&"'")
if not (mrs.bof and mrs.eof) then
manage=mrs("manage")
if instr(manage,str)<=0 then
response.write "<script language='javascript'>"
response.write "alert('警告：您没有此项操作的权限！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
else
session("buyok_admin_login")=0
end if
else 
response.write "<script language='javascript'>"
response.write "alert('没有登陆，不能执行此操作！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
end if
set mrs=nothing
end sub
%>
<%call checkmanage("08")%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../images/css.css" type=text/css rel=stylesheet>
<LINK href="../list/newhead.css" type=text/css rel=stylesheet>
<script language="JavaScript" type="text/JavaScript">
function CheckAll(form) {
 for (var i=0;i<form.elements.length;i++) {
 var e = form.elements[i];
 if (e.name != 'chkall') e.checked = form.chkall.checked; 
 }
 }
</script>
</head>
<BODY bgcolor="#D9EAFC">
<%
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from bsetup"
rs.open sql,conn,1,3
if request("save")="ok" then
if (not isNumeric(request.form("maxlength"))) or (not isNumeric(request.form("pages"))) or (not isNumeric(request.form("book_jianju"))) then
response.write "<script language='javascript'>"
response.write "alert('出错了，资料填写不完整或有错误，请检查后重新提交。');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
rs("view")=request("view")
rs("view1")=request("view1")
rs("maxlength")=request("maxlength")
rs("pages")=request("pages")
rs("pages1")=request("pages1")
rs("html")=request("html")
rs("book_jianju")=request("book_jianju")
rs("mailyes")=request("mailyes")
rs("mailyes1")=request("mailyes1")
rs("huifutishi")=trim(request("huifutishi"))
rs("huifucolor")=trim(request("huifucolor"))
if request("bad")<>"" then
bad=request("bad")
bad=replace(bad,vbCRLF,"")
bad=replace(bad," ","")
bad=replace(bad,"／","/")
rs("bad")=bad
end if
rs.update
response.write "<script language='javascript'>"
response.write "alert('操作成功，您的设置已保存。');"
response.write "location.href='book0.asp?action=setup';"
response.write "</script>"
response.end
else
%>
<table height="5"><tr><td></td></tr></table>
<TABLE cellSpacing=0 cellPadding=0 width=95% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
  <TBODY>
    <TR>
      <TD width="90%" bgColor=#f4f5fd><font color="#000000">　<B><font color="#FF0000">&nbsp;商品评论选项设置</font></B></font></TD>
      <TD bgColor=#f4f5fd height=30><font color="#000000">&nbsp;</font></TD>
    </TR>
  </TBODY>
</TABLE>
		  <table height="5"><tr><td></td></tr></table>

<table width="95%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee">
  <form name=book action=book0.asp method=post>
    <tr bgcolor="#FFFFFF"> 
      <td align=right>留言审核 &nbsp; &nbsp; </td>
      <td>打开 
        <input type=radio name=view value="0" <%if rs("view")="0" then%> checked<%end if%>>
        关闭 
        <input type=radio name=view value="1" <%if rs("view")="1" then%> checked<%end if%> > 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="建议选择打开留言审核<br>以免受到垃圾信息、非法信息的骚扰"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>评论审核 &nbsp; &nbsp; </td>
      <td>打开 
        <input type=radio name=view1 value="0" <%if rs("view1")="0" then%> checked<%end if%>>
        关闭 
        <input type=radio name=view1 value="1" <%if rs("view1")="1" then%> checked<%end if%> ></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>屏蔽html代码 &nbsp; &nbsp; </td>
      <td>是 
        <input type=radio name=html value="0" <%if rs("html")="0" then%> checked<%end if%>>
        否 
        <input type=radio name=html value="1" <%if rs("html")="1" then%> checked<%end if%> > 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="建议选择“是”"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align=right>留言必填Email &nbsp; &nbsp;</td>
      <td>是 
        <input type=radio name=mailyes value="0" <%if rs("mailyes")="0" then%> checked<%end if%>>
        否 
        <input type=radio name=mailyes value="1" <%if rs("mailyes")="1" then%> checked<%end if%> > 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="用户发表留言时，是否必须填写有效E-mail地址"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>评论必填Email &nbsp; &nbsp; </td>
      <td>是 
        <input type=radio name=mailyes1 value="0" <%if rs("mailyes1")="0" then%> checked<%end if%>>
        否 
        <input type=radio name=mailyes1 value="1" <%if rs("mailyes1")="1" then%> checked<%end if%> > 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="用户发表评论时，是否必须填写有效E-mail地址"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>评论长度 &nbsp; &nbsp; </td>
      <td><input type=text name=maxlength value="<%=rs("maxlength")%>" maxlength=3 size=10> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="留言/评论内容的最多字符数，例如200"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td align=right>每页留言条数 &nbsp; &nbsp; </td>
      <td><input name=pages type=text id="pages" value="<%=rs("pages")%>" size=10 maxlength=2> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="每页显示留言的条数，推荐10"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>每页评论条数 &nbsp; &nbsp; </td>
      <td><input type=text name=pages1 value="<%=rs("pages1")%>" maxlength=2 size=10> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="每页显示评论的条数，推荐10"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>评论表格间距 &nbsp; &nbsp; </td>
      <td><input type=text name=book_jianju value="<%=rs("book_jianju")%>" maxlength=2 size=10> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="合适的间距可使版面更美观，推荐10"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>管理员回复提示 &nbsp; &nbsp; </td>
      <td><input type=text name=huifutishi value="<%=rs("huifutishi")%>" maxlength=10 size=10> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="如：“管理员回复”、“客服回复”"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>回复内容的颜色 &nbsp; &nbsp; </td>
      <td><input type=text name=huifucolor value="<%=rs("huifucolor")%>" maxlength=10 size=10> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="英文单词或16进制数，如：<font color=red>red</font>、<font color=blue>blue</font>、<font color=#CCAA33>#CCAA33</font>"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>留言内容过滤 &nbsp; &nbsp; </td>
      <td><TEXTAREA NAME="bad" ROWS="6" COLS="50" style="overflow:auto;"><%=rs("bad")%></TEXTAREA> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="多个过滤词之间用半角“/”隔开"  align=top></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan=2><INPUT name="save" TYPE="hidden" value="ok">
        <INPUT TYPE="submit" value="保存设置"></td>
    </tr>
  </form>
</table>
<table height="5"><tr><td></td></tr></table>

<%
end if
rs.close
set rs=nothing
%>
