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

📄 search.asp

📁 某自治区政府的网站源代码
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<%
'################################################################
'#         易成 ADisease 1.0 广告发布管理系统
'#
'#      版权所有: 易成在线(isease.com)
'#
'#      程序制作: 庞磊(isease@isease.com)
'#
'#      主页地址: http://www.isease.com
'#
'#      开发环境:Win2000 SERVER+IIS5+ACCESS2000 IE5.0 
'################################################################
'#【版权声明】
'# 1、 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法
'#     修改、转载、散播。
'# 
'# 2、 程序中版权声明请勿删除,在您使用过程中,它不会向浏览广告
'#     的第三方提示任何与易成相关的信息,更不影响您的使用。
'# 
'# 3、 本软体为免费软件,用户自由选择是否使用,在使用中出现任何
'#     问题而造成的损失本站不负任何责任。
'# 
'# 4、 本软体不允许在没有事先通知的情况下用于商业用途,假如您需
'#     要用于商业用途,请和我们联系。
'# 
'# 5、 如果违反移上条款,易成在线isease.com对此保留一切法律追究
'#     的权利。 
'# 
'################################################################
'#
'#请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作,
'#
'#在您使用过程中,它不会向浏览广告的第三方提示任何与易成相关的信息,
'#
'#更不影响您的使用。
'#
'# 如有任何问题请到我们的论坛告诉我们。
'# 
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'################################################################
%>
<!--#include file=config.asp -->
<html><head>
<meta http-equiv=Content-Language content=zh-cn>
<meta http-equiv=Content-Type content=text/html; charset=gb2312>
<meta http-equiv=Pragma content=no-cache>
<link href=style.css rel=STYLESHEET type=text/css>
<script language=JavaScript>
<!--

function opw(url,name, width, height) { //v2.0
window.open(url,name,''+'width='+width+',height='+height+',scrollbars=yes'+'');
}
//-->
</script>
<title>易成 ADisease 广告发布管理系统 V1.0</title>
</script>
<base target=_top>
</head><body marginwidth=0 marginheight=0>


<%
if session("masterlogin")<>"superadvertadmin" then
%>
<div align=center><center>
<li>本页面为版主专用,请登陆管理后进入。
<form method=POST action=chkadm.asp><table cellpadding=3 border=0>
<tr><td colspan=2 align=center>管理员登陆</td></tr>
<tr><td align=right>用户名:</td>
<td><input name=username maxlength=20 size=20></td></tr>
<tr><td align=right>密 码:</td>
<td><input type=password name=password maxlength=16 size=20></td></tr>
<tr><td colspan=2 align=center>
<input type=submit name=Submit value=确定>
&nbsp;
<input type=reset name=Submit2 value=重写>
</td></tr></table></form>
</center></div>
<%
else
%>
<div align=center><center>
<table border=0 width=770 cellspacing=1 cellpadding=0 bgcolor=#000000>
<tr bgcolor=#ffffff align=center valign=top>
<td width=137><!--#include file=menu.asp --></td>
<td width=630>
<table border=0 width=100% cellspacing=3 cellpadding=3>
<tr><td align=center>
<%
if trim(request.form("kclass"))="1" then
%>
<font size="3"><b>搜索ID值为 <font color=red><%=trim(request.form("kword"))%></font> 的广告的结果</b></font>
<%
elseif trim(request.form("kclass"))="2" then
%>
<font size="3"><b>搜索关键字为 <font color=red><%=trim(request.form("kword"))%></font> 的广告的结果</b></font>
<%
end if

adsconn.Open adsdata
dim getid,adssql,adsrs
%>
</td></tr></table>


<table border=0 width=100% cellspacing="1" cellpadding=3 bgcolor=#000000>
<%
if trim(request.form("kclass"))="1" then

getid=cint(request.form("kword"))
set adsrs=server.createobject("adodb.recordset")
adssql="select * from ads where id="&getid&" order by regtime"

adsrs.open adssql,adsconn,1,1
if adsrs.eof and adsrs.bof then
response.write "<tr><td bgcolor=#ffffff>没有记录</td></tr></table>"
else
do while not (adsrs.eof or err)
%>
<tr><td height=28 bgcolor=#ffffee colspan=2><font color=red>ID:<%=adsrs("id")%></font>(<%if adsrs("act")=1 then%>正常播出<%elseif adsrs("act")=0 then%>被暂停<%elseif adsrs("act")=2 then%>失效<%end if%>)
<a href=<%=adsrs("url")%> target=_blank><%=adsrs("sitename")%></a> <%=adsrs("url")%></td></tr>
<tr bgcolor=#ffffff width=535><td> 加入时间:<font color=red><%=adsrs("regtime")%></font> 最近显示时间:<font color=red><%=adsrs("time")%></font></td>
<td width=90 align=center><a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=banner','banner<%=adsrs("id")%>',500,90)>查看banner</a></td></tr>
<tr bgcolor=#ffffff><td> 显示:<font color=red><%=adsrs("show")%></font>次(<a href=javascript:opw('listip.asp?id=<%=adsrs("id")%>&ip=sip','s<%=adsrs("id")%>',360,400)>显示记录</a>),点击:<font color=red><%=adsrs("click")%></font>次(<a href=javascript:opw('listip.asp?id=<%=adsrs("id")%>&ip=cip','c<%=adsrs("id")%>',360,400)>点击记录</a>),位置:<font color=red><%if adsrs("place")=1 then%>首要页面<%else%>一般页面<%end if%></font>,打开窗口:<font color=red><%if adsrs("window")=1 then%>原窗<%else%>新窗<%end if%></font>
</td>
<td align=center>
<%
if adsrs("act")=1 then
%>
<a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=close','close<%=adsrs("id")%>',300,140)>暂停</a>
<%
else
%>
<a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=open','open<%=adsrs("id")%>',300,140)>激活</a>
<%end if%> <a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=delit','del<%=adsrs("id")%>',300,140)>删除</a></td></tr>
<tr bgcolor=#ffffff><td>
 失效条件:<%
if adsrs("class")=1 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次
<%
elseif adsrs("class")=2 then
%>
显示<font color=red><%=adsrs("shows")%></font>次
<%
elseif adsrs("class")=3 then
%>
截止期<font color=red><%=adsrs("lasttime")%></font>
<%
elseif adsrs("class")=4 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次,显示<font color=red><%=adsrs("shows")%></font>次
<%
elseif adsrs("class")=5 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次,截止期<font color=red><%=adsrs("lasttime")%></font>
<%
elseif adsrs("class")=6 then
%>
显示<font color=red><%=adsrs("shows")%></font>次,截止期<font color=red><%=adsrs("lasttime")%></font>
<%
elseif adsrs("class")=7 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次,显示<font color=red><%=adsrs("shows")%></font>次,截止期<font color=red><%=adsrs("lasttime")%></font>
<%
else
%>
无限制条件
<%
end if
%>
</td>
<td align=center><a href=javascript:opw('modify.asp?id=<%=adsrs("id")%>','<%=adsrs("id")%>',500,420)>修改详细设置</a></td></tr>
<tr><td colspan=2 bgcolor=#dddddd>.</td></tr>
<%
adsrs.movenext
loop
end if
adsrs.close
set adsrs=nothing
adsconn.close
set adsconn=nothing


elseif trim(request.form("kclass"))="2" then

dim MaxPerPage,totalPut,CurrentPage,TotalPages,i,advlistact
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if

adskeyword=trim(request("kword"))
set adsrs=server.createobject("adodb.recordset")
adssql="Select * from [ads] where sitename like '%"&adskeyword&"%' or url like '%"&adskeyword&"%' order by time"


adsrs.open adssql,adsconn,1,1
if adsrs.eof and adsrs.bof then
response.write "<tr><td bgcolor=#ffffff>没有记录</td></tr></table>"
else
adsrs.pagesize=advertlistnumber'每页显示的记录数
totalPut=adsrs.recordcount '记录总数
totalPage=adsrs.pagecount
MaxPerPage=adsrs.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
adsrs.move  (currentPage-1)*MaxPerPage
dim bookmark
bookmark=adsrs.bookmark '移动到开始显示的记录位置
showContent
showpages
end if
end if
adsrs.close
set adsrs=nothing
end if
adsconn.close
set adsconn=nothing

end if
%>

</td></tr></table>


<%
sub showContent
i=0
do while not (adsrs.eof or err)
%>
<tr><td height=28 bgcolor=#ffffee colspan=2><font color=red>ID:<%=adsrs("id")%></font>(<%if adsrs("act")=1 then%>正常播出<%elseif adsrs("act")=0 then%>被暂停<%elseif adsrs("act")=2 then%>失效<%end if%>)
<a href=<%=adsrs("url")%> target=_blank><%=adsrs("sitename")%></a> <%=adsrs("url")%></td></tr>
<tr bgcolor=#ffffff width=535><td> 加入时间:<font color=red><%=adsrs("regtime")%></font> 最近显示时间:<font color=red><%=adsrs("time")%></font></td>
<td width=90 align=center><a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=banner','banner<%=adsrs("id")%>',500,90)>查看banner</a></td></tr>
<tr bgcolor=#ffffff><td> 显示:<font color=red><%=adsrs("show")%></font>次(<a href=javascript:opw('listip.asp?id=<%=adsrs("id")%>&ip=sip','s<%=adsrs("id")%>',360,400)>显示记录</a>),点击:<font color=red><%=adsrs("click")%></font>次(<a href=javascript:opw('listip.asp?id=<%=adsrs("id")%>&ip=cip','c<%=adsrs("id")%>',360,400)>点击记录</a>),位置:<font color=red><%if adsrs("place")=1 then%>首要页面<%else%>一般页面<%end if%></font>,打开窗口:<font color=red><%if adsrs("window")=1 then%>原窗<%else%>新窗<%end if%></font>
</td>
<td align=center>
<%
if adsrs("act")=1 then
%>
<a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=close','close<%=adsrs("id")%>',300,140)>暂停</a>
<%
else
%>
<a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=open','open<%=adsrs("id")%>',300,140)>激活</a>
<%end if%> <a href=javascript:opw('option.asp?id=<%=adsrs("id")%>&job=delit','del<%=adsrs("id")%>',300,140)>删除</a></td></tr>
<tr bgcolor=#ffffff><td>
 失效条件:<%
if adsrs("class")=1 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次
<%
elseif adsrs("class")=2 then
%>
显示<font color=red><%=adsrs("shows")%></font>次
<%
elseif adsrs("class")=3 then
%>
截止期<font color=red><%=adsrs("lasttime")%></font>
<%
elseif adsrs("class")=4 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次,显示<font color=red><%=adsrs("shows")%></font>次
<%
elseif adsrs("class")=5 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次,截止期<font color=red><%=adsrs("lasttime")%></font>
<%
elseif adsrs("class")=6 then
%>
显示<font color=red><%=adsrs("shows")%></font>次,截止期<font color=red><%=adsrs("lasttime")%></font>
<%
elseif adsrs("class")=7 then
%>
点击<font color=red><%=adsrs("clicks")%></font>次,显示<font color=red><%=adsrs("shows")%></font>次,截止期<font color=red><%=adsrs("lasttime")%></font>
<%
else
%>
无限制条件
<%
end if
%>
</td>
<td align=center><a href=javascript:opw('modify.asp?id=<%=adsrs("id")%>','<%=adsrs("id")%>',500,420)>修改详细设置</a></td></tr>
<tr><td colspan=2 bgcolor=#dddddd>.</td></tr>
<%
i=i+1
if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
adsrs.movenext
loop
end sub 

sub showpages()
dim n
n=totalPage
%>
</table>
<table border=0 width=100% cellspacing=1 cellpadding=0>
<tr><td></td></tr>
</table>
<table border=0 width=630 cellpadding=2 cellspacing=1>
<form method=post action=search.asp><tr bgcolor=#ffffff><td align=right colspan=4><input type=hidden name=kclass value="2"><input type=hidden name=kword value=<%=trim(request("kword"))%>>
共<font color=red><%=totalput%></font>条,每页<font color=red><%=advertlistnumber%></font>条,第<font color=red><%=currentPage%></font>页,共<font color=red><%=totalPage%></font>页 
<%
response.write " 转到:<select name='page' size=1>"
for i=1 to n
response.write "<option value="& i
if currentpage=i then
response.write " selected"
end if
response.write ">"& i &"</option>"
next
response.write "</select>&nbsp;<input type='submit'  value=' goto '>"
%>
</td></tr></form>
</table>
<%
end sub

end if
%>
</center></div>

</body>
</html>

⌨️ 快捷键说明

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