<!-- #include file="inc/conn.asp" -->
<!-- #include file="inc/config.asp" -->
<!-- #include file="inc/Function.asp" -->
<html>
<head>
<title>本站新闻-<%=titlename%></title>
<!-- #include file="heard.asp" -->
<table cellSpacing="0" cellPadding="0" width="800" align="center" class="two">
<td align="center" width="25%" valign="top">
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" height="4"></td>
</tr>
</table>
<table width="99%" border="0" cellspacing="0" class="three"cellpadding="0" align="center">
<th colspan="2" style="padding-left: 5px"><span class="dot">|</span> <b><span class="fontshadow">站内搜索</span></b></th>
</tr>
<form method="POST" action="search.asp">
<tr class onmouseover="javascript:this.className='trOnMOver';" onmouseout="javascript:this.className='';">
<td width="30%" height="28" align="right">栏&nbsp;&nbsp;目&nbsp;</td>
<td width="70%">
<select name="bigclass">
<option value="搜索新闻">搜索站内新闻</option>
<option value="搜索文章">搜索站内文章</option>
<option value="搜索软件">搜索站内软件</option>
</select>
</td>
</tr>
<tr>
<td height="28" align="right">类&nbsp;&nbsp;别&nbsp;</td>
<td>
<select name="smallclass">
<option value="按标题">按标题(名称)</option>
<option value="按内容">按内容(简介)</option>
</select>
</td>
</tr>
<tr>
<td height="28" align="right">关键词&nbsp;</td>
<td><input type="text" maxlength="30" size=15 name="keyword"></td>
</tr>
<tr>
<td colspan="2" height="28" align="center"><input type="submit" name="submit" value="搜索" class="put" onmouseover=this.className='overput'  onmouseout=this.className='put'>&nbsp;&nbsp;<input type="reset" name="reset" value="重填" class="put" onmouseover=this.className='overput'  onmouseout=this.className='put'>		<input type="hidden" name="searching" value="true"></td>
</tr>
</form>
</td>
<tr>
<th colspan="2"></td>
</tr>
</table>
</td>
<td width="80%" align="center" valign="top">
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" height="4"></td>
</tr>
</table>
<table width="99%" border="0" cellspacing="0" class="three"cellpadding="0" align="center">
<tr>
<th height="22" style="padding-left: 5px"><span class="dot">+</span> <b><span class="fontshadow">-新闻列表-</span></b></th>
<th height="22" style="padding-left: 5px" width="15%" align="center">文章日期</th>
<th height="22" style="padding-left: 5px" width="15%" align="middle">浏览次数</th>
</tr>
<tr>
</tr>
<%
dim i,intPage,page,pre,last,filepath
set rs = server.CreateObject("adodb.recordset")
sql="select * from news order by istop=1,id desc"
rs.PageSize = newspage '这里设定每页显示的记录数
rs.CursorLocation = 3
rs.Open sql,conn,2,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
page = trim(request.querystring("page"))

if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
<tr class onmouseover="javascript:this.className='trOnMOver';" onmouseout="javascript:this.className='';">
<td height="22" style="padding-left: 5px"><span class="dot">2</span> <a href="shownews.asp?id=<%=rs("id")%>"><%=rs("news_title")%></a><%if rs("istop")=1 then%>&nbsp;&nbsp;<font color=#ff0000>[顶]</font><%elseif rs("istop")=2 then%>&nbsp;&nbsp;<font color=#ff0000>[荐]</font><%else%><%end if%></td>
<td height="22" width="15%" align="center">(<%=rs("date")%>)</td><td height="22" width="10%" align="center"><%=rs("num")%></td>
</tr>
<tr><td height="1" colspan="3" background="<%=skin%>/dotlineh.gif"></td></tr>
<% 
rs.movenext
next
%></table>

<table cellSpacing="0" cellPadding="0" width="99%">
<tr>
<td height="4"></td>
</tr>
</table>
<table height="22" class="three" width="99%">
<tr>
<%if rs.pagecount > 0 then%>
<td width="13%" align="left" border="1" style="padding-left:15px; padding-right:15px" height="22">当前页<%=intpage%>/<%=rs.PageCount%></td>
<%else%>
<td width="17%" align="left" style="padding-left:15px; padding-right:15px" height="24">当前页0/0</td><%end if%>
<td width="50%" align="right" style="padding-left:15px; padding-right:15px" height="24">
<a href="?page=1"><font face=webdings>9</font>首页</a>  
<%if pre then%>
<a href="?page=<%=intpage -1%>"><font face=webdings>3</font>上页</a>  <%end if%>
<%if last then%>
<a href="?page=<%=intpage +1%>">下页<font face=webdings>4</font></a>  <%end if%>
<a href="?page=<%=rs.PageCount%>">尾页</a><font face=webdings>:</font>  转到第
<select class=select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = intpage then%>
<option value="?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页</font> 
</td>
</tr>
</table>
</table>
<%rs.close
%>
<!-- #include file="end.asp" -->