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

<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>
<body bgcolor="#D9EAFC"><center>
<%
action=request("ok")
if action="" then
Set rs = conn.Execute("select * from page") 
%>

		  <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 bgColor=#f4f5fd height=30><font color="#000000">　<B><font color="#FF0000">&nbsp;编辑网站帮助信息</font></B></font></TD>
      </TR>
    </TBODY>
  </TABLE>
  		  <table height="5"><tr><td></td></tr></table>
  <TABLE cellSpacing=0 cellPadding=1 width=95% align=center bgColor=#FFFFFF border=0>
    <TR> 
      <TD vAlign=center bgColor=#ffffff>  <TABLE cellSpacing=0 cellPadding=0 width=100% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>

          <tr class=backs>
            <td class=td height=18 colspan=2><font color="#000000">　<B><font color="#FF0000">&nbsp;</font></B></font>编辑网站帮助信息</td>
          </tr>
          <form name="modify" method="post" action="help88.asp">
            <tr>
              <td align=center width=20%>标题：</td>
              <td><input name="zimu" type="text" id="zimu" value="<%=rs("title24")%>" size="40" maxlength="100" ></td>
            </tr>
            <tr>
              <td align=center width=20%>内容：</td>
              <td> 			   <textarea name="body11" style="display:none"><%=Server.HTMLEncode(rs("body24"))%></textarea>
			  <iframe ID="edit1" src="../edit/ewebeditor.asp?id=body11&style=putong" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe> 

                <br>
                </td>
            </tr>
            <tr> 
              <td colspan=2><font color="#000000">　<B><font color="#FF0000">&nbsp;</font></B></font>
<input type="submit" name="SubmitName3" value="保存设置"> 
                <INPUT name="ok" TYPE="hidden" value="ok"></td>
            </tr>
          </form>
		 <tr><td height="10"></td><td></td></tr>
        </table>
</TD>
    </TR>
  </TABLE>
  	<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
end if%>

  <%              
if action="ok" then

	if len(request.form("zimu"))>8 then
	response.write "<script language='javascript'>"
	response.write "alert('您填写的网站帮助标题太长，请不要超过8个文字，单击“确定”返回上一页！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

     Set rs=Server.CreateObject("ADODB.Recordset")
	 sql="select * from page"
	 rs.open sql,conn,1,3
 	 rs("title24")=trim(request.form("zimu"))
 	 rs("body24")=trim(request.form("body11"))

	rs.update
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

	response.write "<script language='javascript'>"
	response.write "alert('操作成功，您设置的网站帮助已保存！');"
	response.write "location.href='adv13.asp';"
	response.write "</script>"
	response.end
end if%>

  </body></center>

</html>

<%
set conn=nothing
%>
