?? art_list.asp
字號(hào):
<!--#Include File="Check_hx.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/format.asp"-->
<%
start="文章中心"
dim founderr
founderr=false
if request.querystring("cat_id")<>"" then
if not isInteger(request.querystring("cat_id")) then
founderr=true
Response.Write "<script language=javascript>alert('參數(shù)非法');javascript:history.back();</script>"
end if
end if
if request("page")<>"" then
if not isInteger(request("page")) then
founderr=true
Response.Write "<script language=javascript>alert('參數(shù)非法');javascript:history.back();</script>"
end if
end if
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
founderr=true
Response.Write "<script language=javascript>alert('搜索參數(shù)非法');javascript:history.back();</script>"
end if
end if
cat_id=request.querystring("cat_id")
mtyid2=cat_id
call head()
call menu()
aabb01=""
mtyid2=int(mtyid2)
aabb01=aabb01+"<table border=0 width=760 align=center bgcolor=#FFFFFF cellpadding=0 cellspacing=0 height=20 class=table-hx66s><tr><td><table border=0 align=center bgcolor=#FFFFFF width=756 cellpadding=0 cellspacing=0>"
set hx01=conn.execute("select cat_id,cat_name,sid from a_cat order by cat_id")
do while not hx01.eof
if hx01("sid")=0 then
if hx01("cat_id")=mtyid2 then
hx1=hx1+"<a href=art_list.asp?cat_id="&hx01("cat_id")&" title="&hx01("cat_name")&"><font color=red>"&hx01("cat_name")&"</font></a> <img src=img/menu.gif align=absmiddle border=0> "
else
hx1=hx1+"<a href=art_list.asp?cat_id="&hx01("cat_id")&" title="&hx01("cat_name")&">"&hx01("cat_name")&"</a> <img src=img/menu.gif align=absmiddle border=0> "
end if
end if
if mtyid2=hx01("sid") then
hx66010=hx66010+" or cat_id="&hx01("cat_id") '顯示頁(yè)所需變量art_list.asp
hx2=hx2+"<a href=art_list.asp?cat_id="&hx01("cat_id")&" title="&hx01("cat_name")&">"&hx01("cat_name")&"</a> <img src=img/menu.gif align=absmiddle border=0> "
end if
if mtyid2=hx01("cat_id") then
hx6603=hx01("sid")
if hx6603<>0 then
hxa01="select cat_id,cat_name,sid from a_cat where sid="&hx6603&" order by cat_id"
set hx02=conn.execute(hxa01)
do while not hx02.eof
if hx02("cat_id")=mtyid2 then
hx5=hx5+"<a href=art_list.asp?cat_id="&hx02("cat_id")&" title="&hx02("cat_name")&"><font color=red>"&hx02("cat_name")&"</font></a> <img src=img/menu.gif align=absmiddle border=0> "
else
hx5=hx5+"<a href=art_list.asp?cat_id="&hx02("cat_id")&" title="&hx02("cat_name")&">"&hx02("cat_name")&"</a> <img src=img/menu.gif align=absmiddle border=0> "
end if
hx02.movenext
loop
hx02.close
set hx02=nothing
end if
end if
hx01.movenext
loop
hx01.close
set hx01=nothing
'if hx1<>"" then aabb01=aabb01+"<tr align=center><td background=img/B_bg.gif height=20><img src=img/menu.gif align=absmiddle border=0> "&hx1&" </td></tr>"
if hx2<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx2&"</td></tr>"
if hx3<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx3&"</td></tr>"
if hx4<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx4&"</td></tr>"
if hx5<>"" then aabb01=aabb01+"<tr align=center><td><img src=img/menu.gif align=absmiddle border=0> "&hx5&"</td></tr>"
aabb01=aabb01+"</table></td></tr></table>"
response.write aabb01
dim totalart,Currentpage,totalpages,i
sql="select * from art where passed=0 order by istop desc,art_date DESC"
if request("cat_id")<>"" then
sql="select * from art where passed=0 and (cat_id="&cat_id&hx66010&") order by istop desc,art_date DESC"
elseif request("keyword")<>"" then
sql="select * from art where passed=0 and "&request("select")&" like '%"&request("keyword")&"%' order by istop desc,art_date DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-hx66s">
<TBODY>
<TR vAlign=top align=left>
<TD width=188>
<DIV class="table-right">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 文 章 分 類</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<tr><td height="7"> </td>
<tr><td>
<%
response.write " <font color=#FF0000>·</font> <a href=art_list.asp>全部文章</a><BR>"
sql="select * from a_cat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
if request("cat_id")=cstr(rs1("cat_id")) then
sql2 = "select * from a_cat where sid="&rs1("cat_id")&""
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
response.write " <font color=#FF0000>· "&rs1("cat_name")&"</a></font> (小類:"
response.write rs2.recordcount&"個(gè))<BR>"
else
sql2 = "select * from a_cat where sid="&rs1("cat_id")&""
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
response.write " <font color=#FF0000>·</font> <a href='art_view.asp?cat_id="&rs1("cat_id")&"'>"&rs1("cat_name")&"</a> (小類:"
response.write rs2.recordcount&"個(gè))<BR>"
end if
rs1.movenext
loop
rs1.close
set rs1=nothing%>
</td></tr>
<tr><td height="7"> </td>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 熱 門 排 行</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%
set rs3=server.createobject("adodb.recordset")
if request.querystring("cat_id")<>"" then
sql="select top "&toparticlenum&" art_id,art_title,art_count,cat_id,art_date from art where cat_id="&request.querystring("cat_id")&" and passed=0 order by art_count DESC"
else
sql="select top "&toparticlenum&" art_id,art_title,art_count,cat_id,art_date from art where passed=0 order by art_count DESC"
end if
rs3.open sql,conn,1,1
do while not rs3.eof
%>
<tr><td width="6"></td><td height=22 class=table-xia>
<font color=#FF0000>·</font><a href='showart.asp?cat_id=<%=rs("cat_id")%>&art_id=<%=rs3("art_id")%>' Title='文章標(biāo)題:<%=rs3("art_title")%>
發(fā)表時(shí)間:<%=rs3("art_date")%>
閱讀次數(shù):<%=rs3("art_count")%>次'><%=left(rs3("art_title"),13)%></a></td><td width="6"></td></tr>
<%
rs3.movenext
loop
if rs3.eof and rs3.bof then
response.write " 沒有相關(guān)文章"
end if
rs3.close
set rs3=nothing
%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 推 薦 文 章</td>
</tr>
</table>
<table width="100%" border=0 cellspacing="0" cellpadding="0">
<%
sql="SELECT top "&bestart&" cat_id,art_id,art_title,art_count,cat_id,art_date FROM art where isbest = 1 order by art_date desc"
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1
do while not rs3.eof
%>
<tr><td width="6"></td><td height=22 class=table-xia>
<font color=#FF0000>·</font><a href='showart.asp?cat_id=<%=rs("cat_id")%>&art_id=<%=rs3("art_id")%>' Title='文章標(biāo)題:<%=rs3("art_title")%>
發(fā)表時(shí)間:<%=rs3("art_date")%>
閱讀次數(shù):<%=rs3("art_count")%>次'><%=left(rs3("art_title"),13)%></a></td><td width="6"></tr>
<%
rs3.movenext
loop
if rs3.eof and rs3.bof then
response.write " 沒有推薦文章"
end if
rs3.close
set rs3=nothing
%></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 文 章 查 找</td>
</tr>
</table>
<form name="form2" method="post" action="art_list.asp"><div align=center><input type="radio" name="select" value="art_title" checked class='inuptCG'>標(biāo)題 <input type="radio" name="select" value="art_content" class='inuptCG'>內(nèi)容 <input type='radio' name='select' value='review' class='inuptCG'>評(píng)論<br><input type='text' name='keyword' size='15' value='搜索關(guān)鍵字' maxlength='50' onfocus="this.value=''" class='input'> <input type='submit' name='search' value='搜索' onmouseover="this.className='boton'" onmouseout="this.className='botoff'">
</div></form>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> 本 站 聲 明</td>
</tr>
</table>
<div style="LINE-HEIGHT: 180%"> <font color=#FF0000>·</font>本站的大部分資料,文章都來自網(wǎng)上收集,其版權(quán)歸作者本人所有,如果有任何侵犯您權(quán)益的地方,請(qǐng)聯(lián)系我們,我們將馬上進(jìn)行整理,謝謝。</div>
</TD>
<TD>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-shangxia">
<tr>
<td height="23" class="a1"> <%if request("cat_id")<> "" then%>本分類共有<%elseif request("select")<>"" then%>共搜索到<%else%>當(dāng)前共有<%end if%><span><%=rs.recordcount%></span>篇文章</td>
</tr>
</table>
<table width="99%" border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse" class="table-left" align="right" frame=lhs>
<tr><TD width="6%" align=Center height="26">狀態(tài)</TD><td width="60%" bgcolor="#FFFFFF" align="center">主 題</td><TD width="10%" align=Center>人氣</TD><td width="24%" bgcolor="#FFFFFF" align="center">發(fā)表時(shí)間</td></tr>
<%
if not rs.eof then
rs.movefirst
rs.pagesize=articleperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totalart=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*articleperpage<totalart then
rs.move(currentpage-1)*articleperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalart mod articleperpage)=0 then
totalpages=totalart\articleperpage
else
totalpages=totalart\articleperpage+1
end if
i=0
do while not rs.eof and i<articleperpage
sql="select cat_id,cat_name from a_cat where cat_id="&rs("cat_id")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
%>
<%
if rs("istop")="1" then
folder="<img src=""img/1.gif"" title=固頂文章>"
else
folder="<img src=""img/4.gif"" title=普通文章>"
end if
if rs("istop")="0" then
if rs("isbest")="1" then
folder="<img src=""img/2.gif"" title=推薦文章>"
elseif rs("art_count")>150 then
folder="<img src=""img/3.gif"" title=熱門文章>"
else
folder="<img src=""img/4.gif"" title=普通文章>"
end if
end if
%>
<tr><TD width="6%" align=Center height="26"><%=folder%></TD><td width="60%" bgcolor="#FFFFFF"><a href='art_list.asp?cat_id=<%=rs("cat_id")%>'>『<%=left(rscat("cat_name"),10)%>』</a><a href='showart.asp?cat_id=<%=rs("cat_id")%>&art_id=<%=rs("art_id")%>' Title='文章標(biāo)題:<%=rs("art_title")%>
發(fā)表時(shí)間:<%=rs("art_date")%>
閱讀次數(shù):<%=rs("art_count")%>次'><%=rs("art_title")%></a>
<%if rs("isimg")=1 then
Response.Write " <img src='img/img.gif' alt='圖片文章'>" & vbCrLf
end if%><%if DateDiff("h",rs("art_date"),now())<=24 then
Response.Write "<img src='img/new.gif' alt='24小時(shí)內(nèi)文章'>" & vbCrLf
end if%></td><TD width="10%" align=Center><%=rs("art_count")%></TD><td width="24%" bgcolor="#FFFFFF" align="center"><%=rs("art_date")%></td></tr>
<%
i=i+1
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
<tr align="center"><td align=middle height="60" colSpan=4><%if request("cat_id")<> "" then%>該分類暫時(shí)沒有文章<%elseif request("keyword")<>"" then%>沒有找到包含[<b><font color=red><%=request("keyword")%></font></b>]的文章!<%else%>沒有任何文章,請(qǐng)管理員到后臺(tái)添加!<%end if%></td></tr>
<%end if
end if%>
<form name="form1" method="post" action="art_list.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&cat_id=<%=request("cat_id")%>"><tr><td colspan="4"><TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0><TBODY>
<TR><TD align=middle width="35%" height=25><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totalart%></font>]篇文章 分[<font color="#FF6666"><%=totalpages%></font>]頁(yè)</TD><TD width="40%" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首頁(yè) 上一頁(yè)</font> "
else
response.write "<a href=art_list.asp?select="&request("select")&"&keyword="&request("keyword")&"&page=1&cat_id="&request.querystring("cat_id")&">首頁(yè)</a> "
response.write "<a href=art_list.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&cat_id="&request.querystring("cat_id")&">上一頁(yè)</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一頁(yè) 尾頁(yè)</font>"
else
response.write "<a href=art_list.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&cat_id="&request.querystring("cat_id")
response.write ">下一頁(yè)</a> <a href=art_list.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&totalpages&"&cat_id="&request.querystring("cat_id")&">尾頁(yè)</a>"
end if
%>
<IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD><TD align=middle width="25%"><select name="page" class="lanyu">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>頁(yè)</option><%else%><option value=<%=i%>>第<%=i%>頁(yè)</option>
<%end if
next%>
</select><input type="submit" name="Submit2" value="轉(zhuǎn)向" onmouseover="this.className='boton'" onmouseout="this.className='botoff'" class="botoff"> </TD></TR></TABLE></td></tr></form>
<tr align="center"><td height="10" colspan="4"></td></tr></table><br>
</TD></TR>
</TBODY></TABLE>
<%
rs.close
set rs=nothing
call footer()
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -