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

📄 showad.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
字号:
<!--#include file ="include/config.asp"-->
<!--#include file ="include/conn.asp"-->
<%
dim AdsCategoryID,CurrentSCount,AdsID,AdsType,PicUrl,PicHeight,PicWidth,rs1
AdsCategoryID=request("AdsCategoryID")
if AdsCategoryID<>"" then

set rs=server.createobject("Adodb.recordset")
sql="select CurrentSCount,SProportion from Ads where AdsState=1 and AdsCategoryID="&AdsCategoryID
rs.open sql,conn,1,3
if rs.eof then response.end
CurrentSCount=0
while not rs.eof
  CurrentSCount=rs("CurrentSCount")+CurrentSCount
rs.movenext
wend
if CurrentSCount<=0 then
  rs.MoveFirst
  while not rs.eof
    rs("CurrentSCount")=rs("SProportion")
	rs.update
  rs.movenext
wend
end if

set rs=server.createobject("Adodb.recordset")
sql="select AdsID,AdsType,PicUrl,PicHeight,PicWidth,CurrentSCount,ShowState,ShowCount,AdsState,ShowFiltrationIP,ShowTime from Ads where AdsState=1 and AdsCategoryID="&AdsCategoryID&" order by CurrentSCount desc"
rs.open sql,conn,1,3
if rs.eof then response.end
AdsID=rs("AdsID")
AdsType=rs("AdsType")
PicUrl=rs("PicUrl")
PicHeight=rs("PicHeight")
PicWidth=rs("PicWidth")
rs("CurrentSCount")=rs("CurrentSCount")-1

select case AdsType
case "flash"
%>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="<%=PicWidth%>" height="<%=PicHeight%>"><param name=movie value="<%=PicUrl%>"><param name=quality value=high><embed src="<%=PicUrl%>" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="<%=PicWidth%>" height="<%=PicHeight%>"></embed></object>
<%
case "pic"
%>
<table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0>
  <tr>
    <td align="center"><a href="adsurl.asp?AdsID=<%=AdsID%>" target=_blank><img src="<%=PicUrl%>" border=0 width="<%=PicWidth%>" height="<%=PicHeight%>"></a></td>
  </tr></table>
<%
end select
end if
call close_conn()
%>

⌨️ 快捷键说明

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