<%
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("03")%>

<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>
</head>
<BODY bgcolor="#D9EAFC">

<%
action=request("ok")
if action="" then 
Set rs = conn.Execute("select * from adv4") 
%>
<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>&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
		  <table height="5"><tr><td></td></tr></table>


<table width="95%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee">
  <form action=adv33.asp method=post name=advsetup>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>常规属性内容一</td>
      <td>	  
	  <textarea name="zimu" style="display:none"><%=rs("zimu")%></textarea> <iframe ID="edit1" src="../edit/ewebeditor.asp?id=zimu&style=putong" frameborder="0" scrolling="no" width="100%" HEIGHT="150"></iframe> 
        </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>常规属性内容二</td>
      <td>
	  <textarea name="zimulink" style="display:none"><%=rs("zimulink")%></textarea> <iframe ID="edit1" src="../edit/ewebeditor.asp?id=zimulink&style=putong" frameborder="0" scrolling="no" width="100%" HEIGHT="150"></iframe> 
	   </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>常规属性内容三</td>
      <td> 
	  <textarea name="zimu2" style="display:none"><%=rs("zimu2")%></textarea> <iframe ID="edit1" src="../edit/ewebeditor.asp?id=zimu2&style=putong" frameborder="0" scrolling="no" width="100%" HEIGHT="150"></iframe> 
	  </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>常规属性内容四</td>
      <td> 
	  <textarea name="zimu2link" style="display:none"><%=rs("zimu2link")%></textarea> <iframe ID="edit1" src="../edit/ewebeditor.asp?id=zimu2link&style=putong" frameborder="0" scrolling="no" width="100%" HEIGHT="150"></iframe> 
	  </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>常规属性内容五</td>
      <td> 
	  <textarea name="zimu3" style="display:none"><%=rs("zimu3")%></textarea> <iframe ID="edit1" src="../edit/ewebeditor.asp?id=zimu3&style=putong" frameborder="0" scrolling="no" width="100%" HEIGHT="150"></iframe> 
	  </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan=2> <INPUT name="ok" TYPE="hidden" value="ok"> <INPUT name="zimujianju" TYPE="hidden" value="9"> 
        <INPUT name="zimuspeed" TYPE="hidden" value="5"> <INPUT name=action TYPE="submit" value="保存设置"></td>
    </tr>
  </form>
</table>
		  <table height="5"><tr><td></td></tr></table>

	
<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
end if%>
<%              
if action="ok" then

	if len(request.form("zimu"))>500 or len(request.form("zimu2"))>500 or len(request.form("zimu3"))>500 or len(request.form("zimu4"))>50 or len(request.form("zimu5"))>50 then
	response.write "<script language='javascript'>"
	response.write "alert('您填写的常规属性内容太长，请不要超过500个文字，单击“确定”返回上一页！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	If not isNumeric(request.form("zimuspeed")) or not isNumeric(request.form("zimujianju")) then
	response.write "<script language='javascript'>"
	response.write "alert('在要求填写数字的地方，您填写了非数字内容，单击“确定”返回上一页！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

     Set rs=Server.CreateObject("ADODB.Recordset")
	 sql="select * from adv4"
	 rs.open sql,conn,1,3
 	 rs("zimu")=trim(request.form("zimu"))
 	 rs("zimulink")=trim(request.form("zimulink"))
 	 rs("zimu2")=trim(request.form("zimu2"))
 	 rs("zimu2link")=trim(request.form("zimu2link"))
 	 rs("zimu3")=trim(request.form("zimu3"))
	rs.update
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

	response.write "<script language='javascript'>"
	response.write "alert('操作成功，您设置的商品常规属性已保存！');"
	response.write "location.href='adv33.asp';"
	response.write "</script>"
	response.end
end if%>

</body>
</html>

