<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
Response.Buffer=true
sjjh_name=Session("sjjh_name")
if sjjh_name<>Application("sjjh_user") then 
	Response.Write "<script Language=Javascript>alert('提示：你不是正站长，你不能操作！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
%>
<html><head><title>世纪江湖飘动广告设置</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="jh.css" rel="stylesheet" type="text/css"></head>
<body background="IMAGES/strip.jpg">
<SCRIPT language=JavaScript>
function check(){
var pdWidth=document.form.pdWidth.value;
if(pdWidth=="" ){alert("提示：宽度不能为空！");return false;}
if(checknum(pdWidth)){alert("提示：宽度请使用数字！");return false;}
var pdHeight=document.form.pdHeight.value;
if(pdHeight=="" ){alert("提示：高度不能为空！");return false;}
if(checknum(pdHeight)){alert("提示：高度请使用数字！");return false;}
var pdimg=document.form.pdimg.value;
if(pdimg=="" ){alert("提示：图片不能为空！");return false;}
var pdLink=document.form.pdLink.value;
if(pdLink=="" ){alert("提示：连接地址不能为空！");return false;}
}
function checknum( String )
{
    var Letters = "1234567890-+";
     var i;
     var c;
     for( i = 0; i <= String.length; i ++ )
     {
          c = String.charAt( i );
    	  if (Letters.indexOf( c ) ==-1)
     	return true;
     }
     return false;
}
</SCRIPT>
<form method=POST action="jhgl.asp?act=chatpd&id=403" name="form" onSubmit="return check(this);">
<div align="center"> 世纪江湖飘动广告设置<br>
此广告位于聊天室公共聊天区,在公共聊天区飘动,这样可以达到更好的效果!<br>
<br>
<br>
<%
rs.open "SELECT * from sjjh_system where id=403",conn,1,1
%>
    <select name="pdis" id="pdis">
      <option value="1" <%if clng(rs("svalue"))=1 then%>selected<%end if%> >打开飘动广告</option>
      <option value="0" <%if clng(rs("svalue"))=0 then%>selected<%end if%>>关闭飘动广告</option>
    </select>
    <br>
    <br>
<%rs.close
rs.open "SELECT * from sjjh_system where id=404",conn,1,1
%>
    广告图片: 
    <input name="pdimg" type="text" id="pdimg" value="<%=trim(rs("svalue"))%>" size="40" maxlength="150">
    <br>
    <br>
<%rs.close
rs.open "SELECT * from sjjh_system where id=405",conn,1,1
%>
    广 告 宽: 
    <input name="pdWidth" type="text" id="pdWidth" value="<%=trim(rs("svalue"))%>" size="16" maxlength="3">
<%rs.close
rs.open "SELECT * from sjjh_system where id=406",conn,1,1
%>广告高: 
    <input name="pdHeight" type="text" id="pdHeight" value="<%=trim(rs("svalue"))%>" size="15" maxlength="3">
    <br>
    <br>
<%rs.close
rs.open "SELECT * from sjjh_system where id=407",conn,1,1
%>点击连接: 
    <input name="pdLink" type="text" id="pdLink" value="<%=trim(rs("svalue"))%>" size="40" maxlength="150">
    <br>
    <br>
    <br>
    <input type=submit value=确定飘动广告修改 name="submit" style="border: 1px solid; font-size: 9pt; border-color:#000000 solid">
  </div>
</form>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
</body>
</html>
