articlecat.asp
来自「功能简介: 1) 首页投票调查系统 2)FLASH导航清新直观(带FLA源文件」· ASP 代码 · 共 117 行
ASP
117 行
<%
sub articlecat()
sql="select * from a_cat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
%>
<table width="90%" border="0" cellspacing="1" cellpadding="4" bgcolor="#E7E7E7" class="chinese" bordercolor="#C0C0C0" style="border-collapse: collapse">
<tr>
<td bgcolor="#F5F5F5" width="84%" align="center" background="images/dh.gif"> 文章分类</td>
</tr>
<tr>
<td bgcolor="#F7F7F7" width="84%" align="center"> <font color="#FFFFFF">
<%
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
%>
</font></td>
</tr>
</table>
<br>
<table width="90%" border="0" cellspacing="1" cellpadding="0" bgcolor="#E7E7E7" bordercolor="#C0C0C0" style="border-collapse: collapse" height="73">
<tr>
<td bgcolor="#EFEFEF" align="center" height="25" class="chinese" background="images/dh.gif">
本类热门文章</td>
</tr>
<tr>
<td bgcolor="#F7F7F7" height="13">
<%
set rs3=server.createobject("adodb.recordset")
dim a_j
a_j=1
if request.querystring("cat_id")<>"" then
sql="select top 10 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 10 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
if a_j>=10 then exit do
a_j=a_j+1
%>
<a href="showart.asp?art_id=<%=rs3("art_id")%>&cat_id=<%=rs3("cat_id")%>" target="_blank"><font color="#808080">
<%if len(Rs3("art_title"))>12 then
response.write "·"&left(Rs3("art_title"),10)&"..."
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 "没有相关文章"
end if
rs3.close
set rs3=nothing
%>
</td>
</tr>
</table>
<br>
<table width="90%" border="0" cellspacing="1" cellpadding="0" bgcolor="#E7E7E7" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form2" method="post" action="article.asp">
<tr>
<td bgcolor="#EFEFEF" align="center" height="23" class="chinese" background="images/dh.gif">文章搜索</td>
</tr>
<tr>
<td bgcolor="#F7F7F7" align=center>
<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=" 搜索 " >
</td>
</tr>
</form>
</table>
<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 + =
减小字号Ctrl + -
显示快捷键?