<!--#include file="../include/hf_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("02")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">

<%
action=request("ok")
if action="" then 
Set rs = conn.Execute("select * from adv") 
%>

	<table width="98%" border="1"  style="border-collapse: collapse; border-style: dotted; border-width: 0px"  bordercolor="#333333" cellspacing="0" cellpadding="2">
	<form action=adv3.asp method=post name=advsetup>
	
	<tr class=backs><td colspan=2 class=td height=18>滚动字幕设置</td></tr>
	
	<tr><td width=20% align=right height="18">第一条滚动文字内容</td><td> <input type=text value="<%=rs("zimu")%>" name=zimu size=40 maxlength=50> [最多50字]</td></tr>                    
	
	<tr><td width=20% align=right height="18">字幕一的链接</td><td> <input type=text value="<%=rs("zimulink")%>" name=zimulink size=40 maxlength=100></td></tr>                    
	
	<tr><td width=20% align=right height="18">第二条滚动文字内容</td><td> <input type=text value="<%=rs("zimu2")%>" name=zimu2 size=40 maxlength=50></td></tr>                    
	
	<tr><td width=20% align=right height="18">字幕二的链接</td><td> <input type=text value="<%=rs("zimu2link")%>" name=zimu2link size=40 maxlength=100></td></tr>

	<tr><td width=20% align=right height="18">第三条滚动文字内容</td><td> <input type=text value="<%=rs("zimu3")%>" name=zimu3 size=40 maxlength=50></td></tr>                    
	
	<tr><td width=20% align=right height="18">字幕三的链接</td><td> <input type=text value="<%=rs("zimu3link")%>" name=zimu3link size=40 maxlength=100></td></tr>

	<tr><td width=20% align=right height="18">第四条滚动文字内容</td><td> <input type=text value="<%=rs("zimu4")%>" name=zimu4 size=40 maxlength=50></td></tr>                    
	
	<tr><td width=20% align=right height="18">字幕四的链接</td><td> <input type=text value="<%=rs("zimu4link")%>" name=zimu4link size=40 maxlength=100></td></tr>

	<tr><td width=20% align=right height="18">第五条滚动文字内容</td><td> <input type=text value="<%=rs("zimu5")%>" name=zimu5 size=40 maxlength=50></td></tr>                    
	
	<tr><td width=20% align=right height="18">字幕五的链接</td><td> <input type=text value="<%=rs("zimu5link")%>" name=zimu5link size=40 maxlength=100></td></tr>

	<tr><td width=20% align=right height="18">字幕间距</td><td> <input type=text value="<%=rs("zimujianju")%>" name=zimujianju size=5 maxlength=1> [1-9，数字越大，距离越大]</td></tr>

	<tr><td width=20% align=right height="18">字幕滚动速度</td><td> <input type=text value="<%=rs("zimuspeed")%>" name=zimuspeed size=5 maxlength=1> [1-9，数字越大，速度越大]</td></tr>
	
	<tr><td colspan=2>
<INPUT name="ok" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="保存设置"></td></tr>
</form></table>
	<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
end if%>

<%              
if action="ok" then

	if len(request.form("zimu"))>50 or len(request.form("zimu2"))>50 or len(request.form("zimu3"))>50 or len(request.form("zimu4"))>50 or len(request.form("zimu5"))>50 then
	response.write "<script language='javascript'>"
	response.write "alert('您填写的字幕内容太长，请不要超过50个文字，单击“确定”返回上一页！');"
	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 adv"
	 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("zimuspeed")=trim(request.form("zimuspeed"))
 	 rs("zimujianju")=trim(request.form("zimujianju"))
	rs.update
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

	response.write "<script language='javascript'>"
	response.write "alert('操作成功，您设置的滚动字幕已保存！');"
	response.write "location.href='adv3.asp';"
	response.write "</script>"
	response.end
end if%>

</body>
</html>

