📄 search1.asp
字号:
<%response.expires=0%>
<!--#include file="inc/conn.asp"-->
<%
category=strFilter(request("category"),10)
if category="" then
call msgbox("请正确指定栏目!",1)
end if
skey=strFilter(request("skey"),30)
if skey="" then
call msgbox("请录入查询条件!",1)
end if
skey=replace(skey,",,",",")
skeyarray=split(skey,",")
skeynum=0
if isarray(skeyarray) then
for i=0 to ubound(skeyarray)
if skeyarray(i)><"" then
skeysql=skeysql&" title like '%"&skeyarray(i)&"%'"
skeynum=skeynum+1
end if
next
Set skeyarray=nothing
end if
if skeynum=1 then
skeysql=" and"&skeysql
else
skeysql=replace(skeysql,"' title","' or title")
skeysql=" and ("&skeysql&")"
end if
pic=len(strFilter(request("pic"),1))
if pic=1 then
skeysql=skeysql&" and pic=1"
end if
page=request("page")
if page="" then page=1
if not isnumeric(page) then page=1 else page=CCur(page)
sql="select id,title,pic,path,filenum,otime,categoryid from news where path like '%/"&category&"/%'"&skeysql&" order by id DESC"
rs.open sql,conn,1,1
AllNum =rs.recordcount
rs.pagesize =20
MaxPage =rs.pagecount
if not rs.eof then
if page<=MaxPage then
rs.absolutepage=page
else
rs.absolutepage=MaxPage
page =maxpage
end if
newslist =rs.getrows(20)
end if
rs.close
if page>AllNum then page=100
Set rs=nothing
Set conn=nothing
%>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>中文城市</title>
<link rel="stylesheet" href="css/default.css">
<body background="img/bg.gif">
<table border=0 cellPadding=2 cellSpacing=0 width="700" align=center><tbody>
<tr bgcolor=black>
<td colspan="2"><a href="/news">新闻频道</a></td>
</tr>
<tr><td height=50></td><td><img src="ad.gif" width=480 height=50></td></tr>
<tr bgcolor=#F0F0F0>
<td nowrap> WWW.ZWCITY.COM</td><td align=right>
<a href="/news/computer">电脑</a>|
<a href="/news/life">生活</a>|
<a href="/news/fun">娱乐</a>|
<a href="/news/school">校园</a>|
<a href="/news/finance">财经</a>|
<a href="/news/sport">体育</a>|
<a href="/news/game">游戏</a>
</td>
</tr>
</tbody></table>
<table border=0 cellPadding=0 cellSpacing=0 width="700" align=center>
<tbody>
<tr><td align=middle bgcolor=#F0F0F0 valign=top rowspan="2" width="200">
<br>
<table border=0 cellPadding=1 cellSpacing=0 width=90% align=center style="border:1 solid #888888"><tbody>
<form name="form" method="post" action="/news/search.asp">
<tr><th style="background:aaaaaa;color:ffffff"><b>新闻查询</b></td></tr>
<tr><td>栏 目<select name="category"><option value="computer">电脑科技<option value="life">时尚生活<option value="fun">娱乐剧场<option value="school">校园广播<option value="finance">财经要闻<option value="sport">体坛纵横<option value="game">游戏风暴</select> <input type="checkbox" name=pic value=1<%if pic=1 then%> checked<%end if%>>图文</td></tr>
<tr><td>关键字<input class="text" type="text" name=skey value="<%=skey%>"></td></tr>
<tr><td align=right nowrap>可以使用<font color=blue><b>|</b></font>分隔查询 <input class="button" type="submit" name="Submit" value="提 交"></td></tr>
</form>
</table>
<br>
<br>
<table border=0 cellPadding=1 cellSpacing=0 width=90% align=center style="border:1 solid #888888"><tbody>
<tr><th style="background:aaaaaa;color:ffffff"><b>热门专题</b></th></tr>
<tr><td><script src="/news/subject.asp"></script></td></tr>
</table>
<br>
<br>
</td><td width="480" bgcolor=#ffffff valign=top><br><br>
<%
if isarray(newslist) then
for i=0 to ubound(newslist,2)
%>
·<a href="/news/news.asp?id=<%=newslist(0,i)%>" style="line-height:18pt" target="_blank"><%=newslist(1,i)%></a><%if newslist(2,i)=true then%>[<font color=orange>图</font>]<%end if%> <font color=aaaaaa>(<%=newslist(5,i)%>)</font><br>
<%
next
Set newslist=nothing
end if
%>
</td></tr>
<tr><td bgcolor=ffffff height=20>
<script src="js/page.js"></script>
<script>page('/news/search1.asp?category=<%=category%>&skey=<%=skey%>&pic=<%=pic%>',<%=AllNum%>,<%=MaxPage%>,<%=Page%>,0);</script>
</td></tr>
<tr><td colspan="2" align="center" height="50">
<font style="font:9pt;color:FFFFFF;line-height:12pt">
Copyright ©2002 ZWCITY.COM LIMITED. All rights reserved.
</font>
</td></tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -