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

<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 adv3") 
%>
<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=adv14.asp method=post name=advsetup>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品1</td>
      <td> <input type=text value="<%=rs("zimu")%>" name=zimu size=40 maxlength=50>
        [最多8字]</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品1链接</td>
      <td> <input type=text value="<%=rs("zimulink")%>" name=zimulink size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品2</td>
      <td> <input type=text value="<%=rs("zimu2")%>" name=zimu2 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品2链接</td>
      <td> <input type=text value="<%=rs("zimu2link")%>" name=zimu2link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品3</td>
      <td> <input type=text value="<%=rs("zimu3")%>" name=zimu3 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品3链接</td>
      <td> <input type=text value="<%=rs("zimu3link")%>" name=zimu3link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品4</td>
      <td> <input type=text value="<%=rs("zimu4")%>" name=zimu4 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品4链接</td>
      <td> <input type=text value="<%=rs("zimu4link")%>" name=zimu4link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品5</td>
      <td> <input type=text value="<%=rs("zimu5")%>" name=zimu5 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品5链接</td>
      <td> <input type=text value="<%=rs("zimu5link")%>" name=zimu5link size=40 maxlength=100></td>
    </tr>
	    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品6</td>
      <td> <input type=text value="<%=rs("zimu6")%>" name=zimu6 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品6链接</td>
      <td> <input type=text value="<%=rs("zimu7link")%>" name=zimu6link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品7</td>
      <td> <input type=text value="<%=rs("zimu7")%>" name=zimu7 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品7链接</td>
      <td> <input type=text value="<%=rs("zimu7link")%>" name=zimu7link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品8</td>
      <td> <input type=text value="<%=rs("zimu8")%>" name=zimu8 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品8链接</td>
      <td> <input type=text value="<%=rs("zimu8link")%>" name=zimu8link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品9</td>
      <td> <input type=text value="<%=rs("zimu9")%>" name=zimu9 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品9链接</td>
      <td> <input type=text value="<%=rs("zimu9link")%>" name=zimu9link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品10</td>
      <td> <input type=text value="<%=rs("zimu10")%>" name=zimu10 size=40 maxlength=50></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% height="18" align=right>热门商品10链接</td>
      <td> <input type=text value="<%=rs("zimu10link")%>" name=zimu10link size=40 maxlength=100></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan=2> <INPUT name="ok" TYPE="hidden" value="ok"> <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"))>12 or len(request.form("zimu2"))>12 or len(request.form("zimu3"))>12 or len(request.form("zimu4"))>12 or len(request.form("zimu5"))>12 or len(request.form("zimu6"))>12 or len(request.form("zimu7"))>12 or len(request.form("zimu8"))>12 or len(request.form("zimu9"))>12 or len(request.form("zimu10"))>12 or len(request.form("zimu11"))>12 or len(request.form("zimu12"))>12 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 adv3"
	 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("zimu3link")=trim(request.form("zimu3link"))
 	 rs("zimu4")=trim(request.form("zimu4"))
 	 rs("zimu4link")=trim(request.form("zimu4link"))
 	 rs("zimu5")=trim(request.form("zimu5"))
 	 rs("zimu5link")=trim(request.form("zimu5link"))
 	 rs("zimu6")=trim(request.form("zimu6"))
 	 rs("zimu6link")=trim(request.form("zimu6link"))
 	 rs("zimu7")=trim(request.form("zimu7"))
 	 rs("zimu7link")=trim(request.form("zimu7link"))
 	 rs("zimu8")=trim(request.form("zimu8"))
 	 rs("zimu8link")=trim(request.form("zimu8link"))
 	 rs("zimu9")=trim(request.form("zimu9"))
 	 rs("zimu9link")=trim(request.form("zimu9link"))
 	 rs("zimu10")=trim(request.form("zimu10"))
 	 rs("zimu10link")=trim(request.form("zimu10link"))
	rs.update
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

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

</body>
</html>

