📄 ads_addadw.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Ads_Addadw
KSCls.Execute()
Set KSCls = Nothing
Class Ads_Addadw
Private KSCMS
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Sub Execute()
%>
<html>
<link href="../Inc/Admin_Style.CSS" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function isok(theform)
{
if (theform.placename.value=="")
{
alert("请填写广告位标识!");
theform.placename.focus();
return (false);
}
}
-->
</script>
<body>
<center>
<table border="0" align="center" width=100% cellpadding="0" cellspacing="0" height="1">
<tr>
<td valign="top">
<table border=0 width=98% cellspacing=0 cellpadding=0>
<tr bgcolor=#ffffff align=center valign=top>
<td>
<table border=0 width=100% cellspacing=0 cellpadding=2 style="border-collapse: collapse" bordercolor="#111111">
<form method="POST" action=?job=add onSubmit="return isok(this)">
<%
if KSCMS.G("job")="add" then
set RSObj=server.createobject("adodb.recordset")
if request("place")="0" then
SqlStr="select * From KS_ADPlace "
RSObj.open SqlStr,Conn,1,3
RSObj.AddNew
else
SqlStr="select * From KS_ADPlace where place="&trim(request("place"))
RSObj.open SqlStr,Conn,1,3
end if
RSObj(1) = trim(request("placename"))
RSObj(2)= trim(request("placelei"))
RSObj(3)= trim(request("placehei"))
RSObj(4)= trim(request("placewid"))
RSObj(5)=trim(request("show_flag"))
RSObj.update
RSObj.close
set RSObj=nothing
Conn.close
set Conn=nothing
Response.Redirect "?"
end if
if KSCMS.G("job")="del" then
if isnumeric(request("place"))=true then
set RSObj=server.createobject("adodb.recordset")
SqlStr="select * From KS_ADPlace where place="&trim(request("place"))
RSObj.open SqlStr,Conn,3,3
RSObj.delete
RSObj.close
set RSObj=nothing
Conn.close
set Conn=nothing
Response.Redirect "?"
end if
end if
%>
<tr bgcolor=#ffffff>
<td> </td>
<td> <input type=hidden name=place value="0" >
<p align="center">广告位名称
<input type=text name=placename size=20 maxlength=30>
<font color="#FF0000">15字以内</font> 打开与否
<select name="show_flag">
<option value="1" selected>打开</option>
<option value="0">关闭</option>
</select>
高度
<input type=text name=placehei value="60" size=3 maxlength=30>
宽度<input type=text name=placewid value="468" size=3 maxlength=30> 类型
<%Call Ggwlei(1)%>
<input type=submit value=新增广告位 name=B1></p>
<p align="center">
<font color="#808080">*** 请尽量不要使用相同的广告位标识,高度、宽度主要应用于弹出窗口大小、滚动区域设置,请适当设置,不可为空</font></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr color="#808080" size="1">
<p align="center"> <font color=red><b>已有广告位列表</b></font></p>
<p align=left><font color="#808080">*** 请在高度、宽度中输入合适的<b>数字或百分比或为空自动</b></font></p>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<tr>
<td width="61" align="center" height="20" bgcolor="#F5F5F5"> <font color="#FF0000">广告位ID</font></td>
<td width="191" height="20" align="center" bgcolor="#F5F5F5">广告位名称</td>
<td width="65" height="20" align="center" bgcolor="#F5F5F5">高度</td>
<td width="66" height="20" align="center" bgcolor="#F5F5F5">宽度</td>
<td width="111" align="center" height="20" bgcolor="#F5F5F5">广告位显示方式</td>
<td width="201" align="center" height="20" bgcolor="#F5F5F5">显示与否</td>
<td width="210" align="center" bgcolor="#F5F5F5">操 作</td>
</tr>
<%
Dim RSObj:Set RSObj=server.createobject("adodb.recordset")
Dim SqlStr:SqlStr="select * From KS_ADPlace"
RSObj.open SqlStr,Conn,1,1
do while not RSObj.eof
%>
<form method="POST" action="?job=add" onSubmit="return isok(this)">
<tr>
<td width="61" align="center" nowrap><font color=red><%=RSObj(0)%></font> <input type=hidden name=place value="<%=RSObj(0)%>" >
</td>
<td align="center" nowrap>
<input type=text name=placename value="<%=RSObj(1)%>" size=22 maxlength=30>
</td>
<td width="65" align="center" nowrap>
<input type=text name=placehei value="<%=RSObj(3)%>" size=3 maxlength=30>
</td>
<td width="66" align="center" nowrap>
<input type=text name=placewid value="<%=RSObj(4)%>" size=3 maxlength=30>
</td>
<td width="111" align="center" nowrap> <div align="center">
<%Call Ggwlei(RSObj("placelei"))%>
</div></td>
<td width="201" align="center">
<%if RSObj(5)=1 then%>
<input type="radio" name="show_flag" value="1" checked>
<font color="#FF0000">打开</font>
<input type="radio" name="show_flag" value="0">
关闭
<%else%>
<input type="radio" name="show_flag" value="1">
打开
<input type="radio" name="show_flag" value="0" checked>
<font color="#FF0000">关闭</font>
<%end if%>
</td>
<td width="210" align="center" nowrap>
<input type="submit" value="修改" name="B1">
<a href=?job=del&place=<%=RSObj(0)%>>删除</a> <a href=Ads_list.asp?type=place&place=<%=RSObj(0)%>>已有广告条</a>
<a href=Ads_Manage.asp?id=<%=RSObj(0)%>&job=yulanggw>预览广告</a></td>
</tr>
</form>
<%RSObj.movenext
loop
RSObj.close
set RSObj=nothing
Conn.close
set Conn=nothing
%>
</table>
</center>
</div>
<p align="left">
<p align="left"><hr color="#808080" size="1">
<p align="left"><font color="#FF0000"><a name="说明">广告位显示方式说明</a>:</font></p>
<center>
</p>
<ul>
<li><p align="left">
页内嵌入循环:就是将广告位直接置入某页面一固定位置,并在同一位置循环显示广告位中的所有正常广告条,这样,每刷新一次就会更替显示一个新的广告条</p>
</li>
<li><p align="left">上下排列置入:从上到下竖排广告位中的所有正常广告条</p>
</li>
<li><p align="left">左右排列置入:从左到右横排广告位中的所有正常广告条</p>
</li>
<li><p align="left">向上滚动置入:向上滚动显示广告位中的所有正常广告条</p>
</li>
<li><p align="left">向左滚动置入:向左滚动显示广告位中的所有正常广告条</p>
</li>
<li><p align="left">弹出多个窗口:页面打开时同时弹出多个窗口,每个窗口内显示一个广告条,弹出数量跟该广告位中的正常广告条数一致</p>
</li>
<li><p align="left">
循环弹出窗口:页面打开时同时弹出一个窗口,在同一窗口内循环显示广告位中的正常广告,这样,每刷新一次就会在弹出窗口中更替显示一个新的广告条</p>
</li>
</ul>
<p align="left"><font color=red> 广告插入方法:</font>
<div align=left>
<li><font color="#FF0000">方法1、</font>在模板编辑器中插入相应的广告位标签;
<li><font color="#FF0000">方法2、</font>将下表内容放到预定广告位置,并将其中的<font color="#FF0000">广告位ID</font>对应正确
<font color="#808080">请在广告位列表中查看</font><font color="#FF0000">广告位ID</font>
</div>
<input type="text" name="T1" size="100" value="<script language=javascript src=<%=KSCMS.GetDomain%>Advertise.asp?i=广告位ID></script>">
</p>
</body>
</html>
<%End Sub
'调用常用广告位类型下拉菜单
Sub Ggwlei(shu) '用于表示类型的数
%>
<select size=1 name=placelei>
<option value=1 <% if shu=1 then%>selected<%end if%>>页内嵌入循环</option>
<option value=2 <% if shu=2 then%>selected<%end if%>>上下排列置入</option>
<option value=3 <% if shu=3 then%>selected<%end if%>>左右排列置入</option>
<option value=4 <% if shu=4 then%>selected<%end if%>>向上滚动置入</option>
<option value=5 <% if shu=5 then%>selected<%end if%>>向左滚动置入</option>
<option value=6 <% if shu=6 then%>selected<%end if%>>弹出多个窗口</option>
<option value=7 <% if shu=7 then%>selected<%end if%>>循环弹出窗口</option>
</select>
<%end sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -