⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ads_list.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 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_List
KSCls.Execute()
Set KSCls = Nothing

Class Ads_List
        Private KSCMS
		Private TotalPage,MaxPerPage,adssql,RSObj,totalPut,CurrentPage,TotalPages,i,advlistact
        Private px
		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="Style.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 5px;
	margin-top: 2px;
}
-->
</style>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="1"  width="100%" class=tableBorder >
   <form method=post action=Ads_list.asp?type=search>
    <tr>
      <td width="100%" align="right">快速搜索=&gt;&gt;
      <select size="1" name="adorder" >
<option value="id">广告ID</option>
<option value="name">名称关键字</option>
</select> <input type="text" name="nr" size="20">
<input type="submit" value="查 询" name="B1" class=button></td>
    </tr></form>
  </table>
  </center>
</div>
          <table border=0 width=100% cellspacing=3 cellpadding=3>
            <tr> 
              <td align=center> 
                <%
                  if request("px")="" then
                  px="desc"
                  else
                  px=""
                  end if
                  
                   Select Case KSCMS.G("type")
                   
                          Case "img"
                           adssql="select * from KS_Advertise where act=1 and (xslei='gif' or xslei='swf') order by regtime "&px
                %>
                <b>正常播放的图片类广告条列表</b>  <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
               
			    <%        Case "txt"
                           adssql="select * from KS_Advertise where act=1 and xslei='txt' order by regtime "&px
                %>
                <b>正常播放的纯文本广告条列表</b>  <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
                <%
                          Case "close"
                           adssql="select * from KS_Advertise where act=0 order by regtime "&px

                %>
                <b>处于暂停而未失效的广告条列表</b>  <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
                <%
                          Case "lose"
                           adssql="select * from KS_Advertise where act=2 order by regtime "&px
                %>
                <b>已经失效的的广告条列表</b> <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a> 
                <%
                          Case "click"
                           adssql="select * from KS_Advertise where act<>2 order by click "&px
                %>
                <b>按点击次数<%if px="desc" then: Response.Write "降序":else:Response.Write "升续":end if%>排列未失效广告条</b>  <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
               <%
                          Case "show"
                           adssql="select * from KS_Advertise where act<>2 order by show "&px
                %>
                <b>按显示次数<%if px="desc" then: Response.Write "降序":else:Response.Write "升续":end if%>排列未失效广告条</b> <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
               <%
                          Case "place"
                          
                          if isnumeric(request("place"))=true then
                           adssql="select * from KS_Advertise where act=1 and place="&trim(request("place"))&" order by regtime "&px
						 
		%>
                <b>ID为<%=request("place")%>的广告位中正常播放的广告条</b>  <a href=?type=<%=KSCMS.G("type")%>&place=<%=request("place")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>&place=<%=request("place")%>>降</a>
				 
                <%else
                  adssql="select * from KS_Advertise where act=1 order by regtime "&px
                %>
                <b>所有正常播放的广告条列表</b>  <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
                        
                <%end if%>
               <%
                          Case "search"
                          if request("adorder")="id" and isnumeric(request("nr"))=true then
                           adssql="select * from KS_Advertise where id="&trim(request("nr"))
                          
                %>
                <b>查询 ID为<%=request("nr")%> 的广告条信息</b>
                <%        else
                  adssql="select * from KS_Advertise where sitename like '%"&request("nr")&"%' order by regtime "&px
                %>
                <b>查询名称含有关键字“<%=request("nr")%>”广告条</b> <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
                        
                <%end if%>

                <%       
                          Case else
                          adssql="select * from KS_Advertise where act=1 order by regtime "&px
                %>
                <b>所有正常播放的广告条列表</b>  <a href=?type=<%=KSCMS.G("type")%>&px=x>升</a>  <a href=?type=<%=KSCMS.G("type")%>>降</a>
                <%
                    
                     
                    end Select
                %>
              </td>
            </tr>
          </table>
		   </body>
 </html>
<%

if isnumeric(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set RSObj=server.createobject("adodb.recordset")

RSObj.open adssql,Conn,1,1
if RSObj.eof and RSObj.bof then
Response.Write "<tr><td bgcolor=#ffffff align=center><BR><BR>没有任何相关记录<BR><BR><BR><BR>"
else
RSObj.pagesize=10  '每页显示的记录数
totalPut=RSObj.recordcount '记录总数
totalPage=RSObj.pagecount
MaxPerPage=RSObj.pagesize
if currentpage<1 then
currentpage=1
end if
if currentpage>totalPage then
currentpage=totalPage
end if
if currentPage=1 then
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
RSObj.move  (currentPage-1)*MaxPerPage
dim bookmark
bookmark=RSObj.bookmark '移动到开始显示的记录位置
showContent
showpages
end if
end if
RSObj.close
set RSObj=nothing
end if
Conn.close
set Conn=nothing
End Sub

sub showContent
i=0
do while not (RSObj.eof or err)
%>
  <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="1"  width="100%" class=tableBorder >
      	  <form action="Ads_listedit.asp" method="post" name="editform">
		  <input type="hidden" name="id" value="<%=RSObj("id")%>">
     <tr>
        <td width="175" class="forumRowHighlight"><font color="#FF0000">&nbsp;广告ID:<%=RSObj("id")%> </font></td>
        <td width="370" class=forumRow>&nbsp;名称:<input type="text" name="title" size="23" value="<%=RSObj("sitename")%>"></td>
        <td class=forumRow width="275">
       &nbsp;URL: 
       <input type="text" name="url1" size="30" value="<%=RSObj("url")%>"></td>
        <td  width="105" align="center" class="forumRowHighlight">
        <%if RSObj("xslei")="txt" then%>
           <a href=Ads_Manage.asp?id=<%=RSObj("id")%>&job=yulan>预览广告</a>
        <%else
        
        %>
            <a href=Ads_Manage.asp?id=<%=RSObj("id")%>&job=yulan>预览广告</a>
       <%end if%>
 </td>
      </tr>
      <tr>
        <td width="175" height="60" class="forumRowHighlight">&nbsp;打开:<%= Ggdklx(RSObj("window"))%><br>&nbsp;显示:<%= Ggxslx(RSObj("xslei"))%><br>
        &nbsp;类型:<%= Ggwlx(RSObj("place"))%></td>
        <td height="60" class="forumRowHighlight">&nbsp;加入时间:<font color=red><%=RSObj("regtime")%></font><br>&nbsp;最新显示:<font color=red><%=RSObj("time")%></font><br>
        &nbsp;最新点击:<font color=red><%=RSObj("lasttime")%></font></td>
        <td height="60" width="272"class="forumRowHighlight" >&nbsp;显示次数:<%call  Xscs()%><br>&nbsp;点击次数:<%call  Djcs()%><br>
        &nbsp;广 告 位:<%= Ggwm(RSObj("place"))%>  ID=<font color=red><%=RSObj("place")%></font></td>
        <td height="60" width="104" align="center" class="forumRowHighlight">              <%
if RSObj("act")=1 then
%>
              <a href=Ads_Manage.asp?id=<%=RSObj("id")%>&job=close>暂停</a> 
              <%
else
%>
              <a href=Ads_Manage.asp?id=<%=RSObj("id")%>&job=open>激活</a> 
              <%end if%>
               <a href=Ads_Manage.asp?id=<%=RSObj("id")%>&job=delit>删除</a></td>
      </tr>
      <tr>
        <td colspan="3" height="20">&nbsp;失效条件:<%call  Sxtj()%></td>
                <td height="20" width="104" align="center"><%if request("type")="" then%><input type="submit" name="Submit" value="确定修改"><%end if%></td>
      </tr>
	  </form>
      </table>
    </center>
</div>
  <%
i=i+1
if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
RSObj.movenext
loop
end sub 

sub Showpages()
%>
    
        <table border=0 width=100% cellpadding=2>
          <form method=post action=Ads_list.asp?type=<%=KSCMS.G("type")%>>
            <tr bgcolor=#ffffff> 
              <td align=right colspan=4>
			   <%'显示分页信息
			  Call KSCMS.ShowPageParamter(totalPut, MaxPerPage, "Ads_List.asp", True, "条", CurrentPage, "type=" & KSCMS.G("type"))
			  %>
              </td>
            </tr>
        </table>
     
<%
end sub

Sub Sxtj()

%>
<%
if RSObj("class")=1 then
%>
              点击<font color=red><%=RSObj("clicks")%></font>次 
              <%
elseif RSObj("class")=2 then
%>
              显示<font color=red><%=RSObj("shows")%></font>次 
              <%
elseif RSObj("class")=3 then
%>
              截止期<font color=red><%=RSObj("lasttime")%></font> 
              <%
elseif RSObj("class")=4 then
%>
              点击<font color=red><%=RSObj("clicks")%></font>次,显示<font color=red><%=RSObj("shows")%></font>次 
              <%
elseif RSObj("class")=5 then
%>
              点击<font color=red><%=RSObj("clicks")%></font>次,截止期<font color=red><%=RSObj("lasttime")%></font> 
              <%
elseif RSObj("class")=6 then
%>
              显示<font color=red><%=RSObj("shows")%></font>次,截止期<font color=red><%=RSObj("lasttime")%></font> 
              <%
elseif RSObj("class")=7 then
%>
              点击<font color=red><%=RSObj("clicks")%></font>次,显示<font color=red><%=RSObj("shows")%></font>次,截止期<font color=red><%=RSObj("lasttime")%></font> 
              <%
else
%>
              无限制条件 
<%
end if
%>
<%end sub

Sub Xscs()%>
 <font color=red><%=RSObj("show")%></font> (<a href=Ads_Listip.asp?id=<%=RSObj("id")%>&ip=sip>显示记录</a>)
<%end sub

Sub Djcs()%>
 <font color=red><%=RSObj("click")%></font> (<a href=Ads_Listip.asp?id=<%=RSObj("id")%>&ip=cip>点击记录</a>)
<%end sub
	'广告显示类型名
	Function Ggxslx(lx)
	Select Case lx
		  Case "txt":Ggxslx="纯文本"
		  Case "gif":Ggxslx="GIF图片"
		  Case "swf":Ggxslx="Flash动画"
		  Case "dai":Ggxslx="嵌入代码"
	End select
	End Function
	'广告打开类型名
	Function Ggdklx(lx)
	Select Case lx
		  Case 0:Ggdklx="新窗口"
		  Case else:Ggdklx="本窗口"
	End select
	End Function
	'广告位类型标示数字调用
	Function Ggwlxsz(place1)
	set PRSObj=server.createobject("adodb.recordset")
	PRSObj.open "select * From KS_ADPlace where place="&place1,Conn,1,1
	if not PRSObj.eof then
	Ggwlxsz=PRSObj(2)
	else
	Ggwlxsz=0
	end if
	PRSObj.close
	Set PRSObj=nothing
	End Function
	'广告位类型名称调用
	Function Ggwlx(place)
	Dim  PRSObj:Set PRSObj=server.createobject("adodb.recordset")
	PRSObj.open "select * From KS_ADPlace where place="&place,Conn,1,1
	if not PRSObj.eof then
	Ggwlx=PRSObj(2)
	Select Case Ggwlx
		   Case 1:Ggwlx="页内嵌入循环"
		   Case 2:Ggwlx="上下排列置入"
		   Case 3:Ggwlx="左右排列置入"
		   Case 4:Ggwlx="向上滚动置入"
		   Case 5:Ggwlx="向左滚动置入"
		   Case 6:Ggwlx="弹出多个窗口"
		   Case 7:Ggwlx="循环弹出窗口"
	End select
	else
	Ggwlx="广告位被删除"
	end if
	PRSObj.close
	Set PRSObj=nothing
	
	End Function
	'广告位名称调用
	Function Ggwm(place)
	Dim  PRSObj:Set PRSObj=server.createobject("adodb.recordset")
	PRSObj.open "select * From KS_ADPlace where place="&place,Conn,1,1
	if not PRSObj.eof then
	Ggwm=PRSObj(1)
	else
	Ggwm=""
	end if
	PRSObj.close
	Set PRSObj=nothing
	End Function
End Class
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -