📄 adslist.asp
字号:
<% Option Explicit %>
<!--#include file="../../../Inc/Const.asp" -->
<!--#include file="../../../Inc/Cls_DB.asp" -->
<%
'==============================================================================
'软件名称:风讯网站信息管理系统
'当前版本:Foosun Content Manager System(FoosunCMS V3.2SP1)
'最新更新:2006.50
'==============================================================================
'Copyright (C) 2002-2004 Foosun.Net All rights reserved.
'商业注册联系:028-85098980-601,项目开发:028-85098980-606、609,客户支持:608
'产品咨询QQ:394226379,159410,125114015
'技术支持QQ:315485710,66252421
'项目开发QQ:415637671,655071
'程序开发:四川风讯科技发展有限公司(Foosun Inc.)
'Email:service@Foosun.cn
'MSN:skoolls@hotmail.com
'论坛支持:风讯在线论坛(http://bbs.foosun.net)
'官方网站:www.Foosun.cn 演示站点:test.cooin.com
'网站通系列(智能快速建站系列):www.ewebs.cn
'==============================================================================
'免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接
'风讯公司保留此程序的法律追究权利
'如需进行2次开发,必须经过风讯公司书面允许。否则将追究法律责任
'==============================================================================
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../../../Inc/Session.asp" -->
<!--#include file="../../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P070200") then Call ReturnError1()
Conn.Execute("Update FS_Ads set State=0 where State<>0 and (ClickNum>=MaxClick or ShowNum>=MaxShow or ( EndTime<>null and EndTime<="&StrSqlDate&"))")
Dim TempState,RsAdsObj,AdsSql,AdsFlag,TempAddTime,TempType,TempAdsState,Location,AdsIDTemp
AdsSql = "Select * from FS_Ads order by Location asc"
AdsFlag = "正常广告"
TempState = Request("State")
if TempState <> "" then
if Cstr(TempState)="InGear" then
AdsSql = "Select * from FS_Ads where State=1 order by Location asc"
AdsFlag = "正常广告"
elseif Cstr(TempState)="ClickMax" then
AdsSql = "Select * from FS_Ads order by ClickNum desc,Location asc"
AdsFlag = "点击最高"
elseif Cstr(TempState)="ClickMin" then
AdsSql = "Select * from FS_Ads order by ShowNum desc,Location asc"
AdsFlag = "显示最高"
elseif Cstr(TempState)="Abate" then
AdsSql = "Select * from FS_Ads where State=0 order by Location asc"
AdsFlag = "失效广告"
elseif Cstr(TempState)="ShowAds" then
AdsSql = "Select * from FS_Ads where Type=1 order by Location asc"
AdsFlag = "显示广告"
elseif Cstr(TempState)="Stop" then
AdsSql = "Select * from FS_Ads where State=2 order by Location asc"
AdsFlag = "暂停广告"
elseif Cstr(TempState)="NewWindow" then
AdsSql = "Select * from FS_Ads where Type=2 order by Location asc"
AdsFlag = "弹出新窗口"
elseif Cstr(TempState)="OpenWindow" then
AdsSql = "Select * from FS_Ads where Type=3 order by Location asc"
AdsFlag = "打开新窗口"
elseif Cstr(TempState)="FilterAway" then
AdsSql = "Select * from FS_Ads where Type=4 order by Location asc"
AdsFlag = "渐隐消失"
elseif Cstr(TempState)="DialogBox" then
AdsSql = "Select * from FS_Ads where Type=5 order by Location asc"
AdsFlag = "网页对话框"
elseif Cstr(TempState)="ClarityBox" then
AdsSql = "Select * from FS_Ads where Type=6 order by Location asc"
AdsFlag = "透明对话框"
elseif Cstr(TempState)="DriftBox" then
AdsSql = "Select * from FS_Ads where Type=8 order by Location asc"
AdsFlag = "满屏浮动"
elseif Cstr(TempState)="LeftBottom" then
AdsSql = "Select * from FS_Ads where Type=9 order by Location asc"
AdsFlag = "左下底端"
elseif Cstr(TempState)="RightBottom" then
AdsSql = "Select * from FS_Ads where Type=7 order by Location asc"
AdsFlag = "右下底端"
elseif Cstr(TempState)="Couplet" then
AdsSql = "Select * from FS_Ads where Type=10 order by Location asc"
AdsFlag = "对联广告"
elseif Cstr(TempState)="Cycle" then
AdsSql = "Select * from FS_Ads where Type=11 or CycleTF=1 order by Location asc"
AdsFlag = "循环广告"
end if
end if
Set RsAdsObj = Server.CreateObject(G_FS_RS)
RsAdsObj.Open AdsSql,Conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>广告列表</title>
</head>
<link href="../../../CSS/FS_css.css" rel="stylesheet" type="text/css">
<script src="../../SysJS/PublicJS.js" language="JavaScript"></script>
<script language="JavaScript" src="../../SysJS/ContentMenu.js"></script>
<body topmargin="2" leftmargin="2" onclick="SelectAds();" onselectstart="return false;">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#999999">
<tr bgcolor="#EEEEEE">
<td height="26" colspan="5" valign="middle">
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width=35 align="center" alt="添加广告" onClick="AddAds();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">添加</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="修改广告" onClick="EditAds();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">修改</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="删除广告" onClick="DelAds();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">删除</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="暂停" onClick="StopAds();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">暂停</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="激活" onClick="StartAds();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">激活</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="调用代码" onClick="GetCode();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">调用代码</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="访问统计" onClick="ShowStat();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">访问统计</td>
<td width=2 class="Gray">|</td>
<td width=55 align="center" alt="点击统计" onClick="ClickStat();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">点击统计</td>
<td width=2 class="Gray">|</td>
<td width=35 align="center" alt="后退" onClick="top.GetEkMainObject().history.back();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">后退</td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" height="" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="5" height="2"></td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%" height="26" class="ButtonListLeft">
<div align="center">广告位</div></td>
<td width="23%" height="26" class="ButtonList">
<div align="center">广告类型</div></td>
<td width="22%" height="26" class="ButtonList">
<div align="center">添加时间</div></td>
<td width="16%" height="26" class="ButtonList">
<div align="center">点击次数</div></td>
<td width="16%" height="26" class="ButtonList">
<div align="center">显示次数</div></td>
<td width="13%" height="26" class="ButtonList">
<div align="center">状态</div></td>
</tr>
<%
if Not RsAdsObj.Eof then
Dim page_size,page_no,page_total,record_all
page_size=20
page_no=request.querystring("page_no")
if page_no <= 1 or page_no = "" then page_no=1
If Request.QueryString("page_no")="" then
page_no = 1
end if
RsAdsObj.PageSize = page_size
page_total = RsAdsObj.PageCount
if (cint(page_no) > page_total) then page_no=page_total
RsAdsObj.AbsolutePage=page_no
record_all=RsAdsObj.RecordCount
dim i
for i=1 to RsAdsObj.PageSize
if RsAdsObj.eof then exit for
select case RsAdsObj("Type")
case "1" TempType = "显示广告"
case "2" TempType = "弹出新窗口"
case "3" TempType = "打开新窗口"
case "4" TempType = "渐隐消失"
case "5" TempType = "网页对话框"
case "6" TempType = "透明对话框"
case "7" TempType = "右下底端"
case "8" TempType = "满屏浮动"
case "9" TempType = "左下底端"
case "10" TempType = "对联广告"
case "11" TempType = "循环广告"
end select
TempAddTime = year(RsAdsObj("AddTime"))&"-"&month(RsAdsObj("AddTime"))&"-"&day(RsAdsObj("AddTime"))
select case RsAdsObj("State")
case "0" TempAdsState="失效"
case "1" TempAdsState="正常"
case "2" TempAdsState="暂停"
end select
AdsIDTemp = RsAdsObj("ID")
%>
<tr height="20">
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../Images/Ads.gif" width="24" height="22"></td>
<td><span class="TempletItem" AdsID="<% = RsAdsObj("ID") %>" State="<%=RsAdsObj("State")%>" Location="<%=RsAdsObj("Location")%>">第<%=RsAdsObj("Location")%>位</span></td>
</tr>
</table></td>
<td height="25"> <div align="center"><%=TempType%></div></td>
<td><div align="center"><%=TempAddTime%></div></td>
<td><div align="center"><%=RsAdsObj("ClickNum")%></div></td>
<td><div align="center"><%=RsAdsObj("ShowNum")%></div></td>
<td><div align="center"><%=TempAdsState%></div></td>
</tr>
<%
RsAdsObj.MoveNext
Next
end if
RsAdsObj.Close
Set RsAdsObj = Nothing
%>
<%if page_total>1 then%>
<tr>
<td colspan="6" height="18"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" height="10">
<td width="51%" height="25" valign="middle"> <div align="right">
<% = "NO.<b>"& page_no &"</b>, " %>
<% = "Totel:<b>"& page_total &"</b>, RecordCounts:<b>" & record_all &"</b> "%>
<%
if Page_Total=1 then
response.Write " <img src=../images/First1.gif border=0 alt=首页></img> "
response.Write " <img src=../images/prePage.gif border=0 alt=上一页></img> "
response.Write " <img src=../images/nextPage.gif border=0 alt=下一页></img> "
response.Write " <img src=../images/endPage.gif border=0 alt=尾页></img> "
else
if cint(Page_No)<>1 and cint(Page_No)<>Page_Total then
response.Write " <a href=?page_no=1" &"&Keywords="&Request("Keywords")&"><img src=../images/First1.gif border=0 alt=首页></img></a> "
response.Write " <a href=?page_no="&cstr(cint(Page_No)-1) &"&Keywords="&Request("Keywords")&"><img src=../images/prePage.gif border=0 alt=上一页></img></a> "
response.Write " <a href=?page_no="&cstr(cint(Page_No)+1) &"&Keywords="&Request("Keywords")&"><img src=../images/nextPage.gif border=0 alt=下一页></img></a> "
response.Write " <a href=?page_no="& Page_Total &"&Keywords="&Request("Keywords")&"><img src=../images/endPage.gif border=0 alt=尾页></img></a> "
elseif cint(Page_No)=1 then
response.Write " <img src=../images/First1.gif border=0 alt=首页></img></a> "
response.Write " <img src=../images/prePage.gif border=0 alt=上一页></img> "
response.Write " <a href=?page_no="&cstr(cint(Page_No)+1) &"&Keywords="&Request("Keywords")&"><img src=../images/nextPage.gif border=0 alt=下一页></img></a> "
response.Write " <a href=?page_no="& Page_Total &"&Keywords="&Request("Keywords")&"><img src=../images/endpage.gif border=0 alt=尾页></img></a> "
else
response.Write " <a href=?page_no=1" &"&Keywords="&Request("Keywords")&"><img src=../images/First1.gif border=0 alt=首页></img> "
response.Write " <a href=?page_no="&cstr(cint(Page_No)-1) &"&Keywords="&Request("Keywords")&"><img src=../images/prePage.gif border=0 alt=上一页></img></a> "
response.Write " <img src=../images/nextPage.gif border=0 alt=下一页></img></a> "
response.Write " <img src=../images/endpage.gif border=0 alt=尾页></img> "
end if
end if
%>
</div></td>
<td width="7%" valign="middle"><select onChange="ChangePage(this.value);" style="width:50;" name="select">
<% for i=1 to Page_Total %>
<option <% if cint(Page_No) = i then Response.Write("selected")%> value="<% = i %>">
<% = i %>
</option>
<% next %>
</select></td>
</tr>
</table></td>
</tr>
<% end if %>
</table></td>
</tr>
</table>
</body>
</html>
<%
Set Conn = Nothing
%>
<script>
var TempStates = '<% = TempState %>';
var DocumentReadyTF=false;
var ListObjArray = new Array();
var ContentMenuArray=new Array();
function document.onreadystatechange()
{
if (DocumentReadyTF) return;
IntialListObjArray();
InitialContentListContentMenu();
DocumentReadyTF=true;
}
function InitialContentListContentMenu()
{
ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction("parent.EditAds();",'修改','disabled');
ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction("parent.DelAds();",'删除','disabled');
ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('seperator','','');
//ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('parent.StopAds();','暂停','disabled');
ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('parent.StartAds();','激活','disabled');
ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('parent.GetCode();','调用代码','disabled');
//ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('seperator','','');
//ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('top.GetEkMainObject().location.reload();','刷新','');
//ContentMenuArray[ContentMenuArray.length]=new ContentMenuFunction('prompt(\'本页面路径属性\',\'<%=Request.ServerVariables("SCRIPT_NAME")%>\');','路径属性','');
}
function ContentMenuFunction(ExeFunction,Description,EnabledStr)
{
this.ExeFunction=ExeFunction;
this.Description=Description;
this.EnabledStr=EnabledStr;
}
function ContentMenuShowEvent()
{
ChangeContentMenuStatus();
}
function ChangeContentMenuStatus()
{
var EventObjInArray=false,SelectAds='',DisabledContentMenuStr='';
for (var i=0;i<ListObjArray.length;i++)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -