📄 articlecat.asp
字号:
<%
sub articlecat()
sql="select * from a_cat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
%>
<table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" bgcolor="#F5F5F5">
<tr>
<td height="24" align="center" background="images/bg3.gif" bgcolor="#C0C0C0">文章分类</td>
</tr>
<tr>
<td align="center"> <%
do while not rs2.eof
if request("cat_id")=cstr(rs2("cat_id")) then
response.write "<font color='#ff6600'>"&rs2("cat_name")&"</font><br>"
else
response.write "<a href='article.asp?cat_id="&rs2("cat_id")&"'>"&rs2("cat_name")&"</a><br>"
end if
rs2.movenext
loop
if rs2.eof and rs2.bof then
response.write "当前没有分类!"
end if
%> </td>
</tr>
</table>
<br>
<table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" bgcolor="#F5F5F5">
<tr>
<td height="24" align="center" background="images/bg3.gif" bgcolor="#C0C0C0">本类热门文章
</td>
</tr>
<tr>
<td align="center"> <%
set rs3=server.createobject("adodb.recordset")
if request.querystring("cat_id")<>"" then
sql="select top 15 art_id,art_title,art_count,cat_id from art where cat_id="&request.querystring("cat_id")&" order by art_count DESC"
else
sql="select top 15 art_id,art_title,art_count,cat_id from art order by art_count DESC"
end if
rs3.open sql,conn,1,1
do while not rs3.eof
%>
<a href="showart.asp?art_id=<%=rs3("art_id")%>&cat_id=<%=rs3("cat_id")%>" target="_blank">
<font color="#808080">
<%if len(Rs3("art_title"))>14 then
response.write left(Rs3("art_title"),12)&"..."
else
response.write Rs3("art_title")
end if%>
</font></a><span style='font-size: 9pt;color=#66CC33'><font color="#666666">(</font><%=rs3("art_count")%><font color="#666666">)</font></span><br> <%
rs3.movenext
loop
if rs3.eof and rs3.bof then
response.write "<font style='font-size:9pt'> 没有相关文章!</font>"
end if
rs3.close
set rs3=nothing
%> </td>
</tr>
</table>
<br>
<table width="90%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form2" method="post" action="article.asp">
<tr>
<td height="24" align="center" background="images/bg3.gif" bgcolor="#EFEFEF" class="chinese">文章搜索</td>
</tr>
<tr>
<td align="center" bgcolor="#F5F5F5"> <select name="select">
<option value="art_title">搜索文章标题</option>
<option value="art_content">搜索文章内容</option>
</select> <br> <input type="text" name="keyword" class="textarea" size="20">
<br> <input type="submit" name="search" value=" 搜索 " class="button"> </td>
</tr>
</form>
</table>
<br>
<table class="chinese" height="1" cellSpacing="0" cellPadding="5" width="85%" align="center" border="0">
<tr>
<td class="chinese" align="right" height="1">
<p style="LINE-HEIGHT: 150%" align="center"><strong><font color="#666666">本
站 声 明</font></strong></td>
</tr>
<tr>
<td align="right" height="1">
<div align="left"> <font color="#999999"> 本站的大部分资料,图片,文章都收集自网上,其版权归作者本人所有,如果有任何侵犯您权益的地方,请联系我<span lang="zh-cn">们</span>,我<span lang="zh-cn">们</span>将马上进行整理,谢谢。
</font> </div>
</td>
</tr>
</table>
<%rs2.close
set rs2=nothing
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -