?? list.asp
字號:
<!--#Include file="../../Common/Inc_DatConn.asp"-->
<!--#Include file="../Common/Inc_Config.asp"-->
<!--#Include file="../../Common/Inc_Function.asp"-->
<!--#Include file="../Common/Inc_Function.asp"-->
<%
'┌─ 風云ASP在線 ────────────────────────┐
'│ │
'│ 作者:趙振波. http://www.fyasp.com │
'│ │
'│ Q Q:185623333 │
'│ │
'│ Email:fy96@163.com │
'│ │
'│ 程序定做,系統開發,網站制作,提供高質量的網絡產品、技術和服務!│
'│ │
'│【版權聲明】 │
'│ │
'│ 本程序版權歸坐看風云所有,未經授權擅自修改、復制或散布本程序│
'│ │
'│的部分或全部,將承受嚴厲的民事和刑事處罰,對已知的違反者將給予法 │
'│ │
'│律范圍內的全面制裁。對非法使用此程序所造成的一切后果本人概不負責!│
'│ │
'└─────────────────── http://www.fyasp.com ──┘
strml="../"
%>
<%if IsTimeOut(Session("strAccount"),Session("strPassWord")) then Response.Redirect "index.asp"%>
<html>
<head>
<title><% = strSiteName%> - 網站后臺管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../Common/Site.css" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
function delad(){
if (confirm("確定要刪除這則廣告么?刪除后不可以再恢復哦!?")){return true;}
return false;
}
</SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<body leftMargin="0" topMargin="2">
<!--#Include file="../Common/inc_Top.asp"-->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="105" valign="top" style="border-left: 1px solid rgb(0,0,0); border-right: 1px solid rgb(0,0,0)" class="bottom"><br>
<!--#Include file="../Common/Inc_Button.asp"-->
</td>
<td valign="top" style="border-right: 1px solid rgb(0,0,0)" align="center"><br>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="88%">
<TR>
<TD width="100%" valign="top"><%
Dim pagesize,rs,sql,curpage,strcate,i
Dim id,ADID,ADViews,ADHits,ADType,ADSrc,ADLink,ADAlt,ADWidth,ADHeight,ADNote,ADStopViews,ADStopHits,ADStopDate
pagesize=10 '設置每頁顯示廣告樹目
If Request.QueryString("page")="" Then
curpage = 1
Else
curpage = cint(Request.QueryString("page"))
End If
Set rs = Server.CreateObject("ADODB.Recordset")
if Request.QueryString("action")="stop" then
sql = "SELECT * FROM [ad] where ( ADStopViews <> 0 and ADViews > ADStopViews) or ( ADStopHits <> 0 and ADHits > ADStopHits) or ( DateDiff(day,GetDate(),ADStopDate)<1 ) ORDER BY id DESC"
Else
sql = "SELECT * FROM [ad] ORDER BY id DESC"
end If
rs.open sql, conn, 1, 1
'監測是否存在錯誤
If err.number <> 0 Then
Response.Write "打開數據庫出錯,請檢查conn.asp中數據庫地址是否正確"
Response.End
End If
If rs.bof or rs.eof Then
rs.Close
if Request.QueryString("action")="stop" Then
%>
<table width="100%" height="200" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td align="center"><font color="#990000">暫時沒有過期廣告!</font></td>
</tr>
</table>
<%Else%>
<table width="100%" height="200" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td align="center" bgcolor="#DEDBEF" class="banma1">暫時沒有任何廣告!-- <a href=add.asp>立即添加新廣告</a></td>
</tr>
</table>
<%
End If
Response.End
End If
rs.pagesize = pagesize
rs.absolutepage = curpage
%>
<div align="center">
<table width='100%' height="22" border=0 cellpadding=0 cellspacing=1 bgcolor="#9BB375">
<tr bgcolor="#BDBEDE">
<td height="28" align="center" class="bottom"><div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60" align="center"><span class="style1"><span style="font-size: 9pt"><font size="2"> </font><a href="list.asp">全部列表</a></span></span> </td>
<td width="57" align="center"><a href="list.asp?action=stop">過期廣告</a></td>
<td width="69" align="center"><a href=add.asp><font color="#0000FF">添加新廣告</font></a></td>
<td width="48" align="center"><a href="code.asp">代碼示例</a></td>
<td>
<div align="right">
<%If curpage = 1 Then%>
首頁 上一頁
<%Else%>
<a href='?page=1'>首頁</a> <a href='?page=<%=cstr(curpage-1)%>'>上一頁</a>
<%End If
If curpage = rs.pagecount Then%>
下一頁 尾頁
<%Else%>
<a href='?page=<%=cstr(curpage+1)%>'>下一頁</a> <a href='?page=<%=cstr(rs.pagecount)%>'>尾頁</a>
<%End If%>
</div></td>
</tr>
</table>
</div> </td>
</tr>
</table>
</div>
<div align="center">
<table width='100%' border="0" cellpadding=3 cellspacing=1 bgcolor="#9BB375">
<% Do While NOT rs.eof
id=rs("id")
ADID=rs("ADID")
ADViews=rs("ADViews")
ADHits=rs("ADHits")
ADType=rs("ADType")
ADSrc=rs("ADSrc")
ADLink=rs("ADLink")
ADAlt=rs("ADAlt")
ADSrc=rs("ADSrc")
ADWidth=rs("ADWidth")
ADHeight=rs("ADHeight")
ADNote=rs("ADNote")
ADStopViews=rs("ADStopViews")
ADStopHits=rs("ADStopHits")
ADStopDate=rs("ADStopDate")%>
<tr class="banma1">
<td width="20%" height="25">名稱:<%=ADID%> <%if IsStop(ADViews,ADStopViews,ADStopHits,ADHits,ADStopDate) Then Response.Write(" <font color=#FF0000>過期") End If%></td>
<td width="20%">顯示:<%=ADViews%></td>
<td width="20%">點擊:<%=ADHits%></td>
<td width="40%">管理:<a href="edit.asp?id=<%=id%>">編輯</a> <a href="createjs.asp?id=<%=ADID%>">生成JS</a> <a href="del.asp?id=<%=id%>" onclick='return delad();'>刪除</a></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="50%" height="25" colspan=2>廣告類型:<%=ShowAdType(ADType,rs("ADSrc"))%></td>
<td width="50%" colspan=2>顯示地址:
<%If ADType<>6 Then%><a href=<%=ADSrc%> target=_blank><font color="#000000"><%=ADSrc%></font></a><font color="#000000"><%else%>不顯示<%end if%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan=2>鏈接地址:<a href=<%=ADLink%> target=_blank><font color="#000000"><%=ADLink%></a></td>
<td colspan=2>提示文字:<%=ADAlt%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan=2>廣告規格:<%=ADWidth%>×<%=ADHeight%></td>
<td colspan=2>備 注:<%=ADNote%></td>
</tr>
<%
i=i+1
rs.movenext
If i>=rs.PageSize Then Exit Do
Loop
%>
</table>
</div>
</body>
</html>
<%
rs.close
set rs=nothing
conn.Close
set conn=nothing
'檢測是否過期
function IsStop(ADViews,ADStopViews,ADStopHits,ADHits,ADStopDate)
IsStop=false
If ( ADStopViews <> 0 and ADViews > ADStopViews) Then
IsStop=true
Exit function
ElseIf ( ADStopHits <> 0 and ADHits > ADStopHits) Then
IsStop=true
Exit function
ElseIf ( DateDiff("d",Now(),ADStopDate)<1 ) Then
IsStop=true
Exit function
End If
end function
'判斷廣告類型
function ShowAdType(ADType,ADSrc)
Dim ADExt
ADExt="圖片"
If InStr(1,ADSrc,".swf",1)>0 Then ADExt="FLASH"
Select Case ADType
Case 1
ShowAdType="普通"&ADExt
Case 2
ShowAdType="全屏浮動"&ADExt
Case 3
ShowAdType="上下浮動 - 右"&ADExt
Case 4
ShowAdType="上下浮動 - 左"&ADExt
Case 5
ShowAdType="漸隱消失"&ADExt
Case 6
ShowAdType="網頁對話框"
Case 7
ShowAdType="移動透明對話框"
Case 8
ShowAdType="打開新窗口"
Case 9
ShowAdType="彈出新窗口"
Case 10
ShowAdType="對聯式廣告"
Case else
ShowAdType="<font color=red><b>錯誤!將不能正確顯示</b>"
End Select
end function
%></TD>
</TR>
<TR>
<TD height=1 width="100%"></TD>
</TR>
</TABLE>
</td>
</tr>
<!--#Include file="../Common/Inc_Bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -