📄 art_body.asp
字号:
<%sub art_body()
dim totalart,Currentpage,totalpages,i,j,colname
sql="select art_id,cat_id,art_title,art_date,art_count from art order by art_date DESC"
if request("cat_id")<>"" then
sql="select art_id,cat_id,art_title,art_date,art_count from art where cat_id="&request("cat_id")&" order by art_date DESC"
elseif request("keyword")<>"" then
sql="select art_id,cat_id,art_title,art_date,art_count from art where "&request("select")&" like '%"&request("keyword")&"%'order by art_date DESC"
elseif request("cat_id")<>"" and request("keyword")<>"" then
sql="select art_id,cat_id,art_title,art_date,art_count from art where art_title or art_content like '%"&request("keyword")&"%'order by art_date DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<TABLE bgcolor="black" align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="<%=border%>" frame=vsides rules=none>
<TBODY>
<TR>
<td height="24" align="right">
<%
sql="select * from a_cat"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
if request("cat_id")=cstr(rs2("cat_id")) then
response.write " <img src=img/none.gif border=0><img src=img/link2.gif border='0'> <font color='#ff6600'>"&rs2("cat_name")&"</font>"
else
response.write " <img src=img/none.gif border=0><img src=img/link2.gif border='0'> <a href='art.asp?cat_id="&rs2("cat_id")&"'>"&rs2("cat_name")&"</a>"
end if
rs2.movenext
loop
if rs2.eof and rs2.bof then
response.write "当前没有分类!"
end if
%>
</TD>
</TR>
<TR>
<TD width="760" background="img/menu_bg2.gif" height="4"></TD>
</TR>
</TBODY>
</TABLE>
<TABLE align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="<%=border%>" frame=vsides rules=none>
<TBODY>
<TR>
<td width=553 align=left vAlign=top bgcolor="#000000"><%call br%>
<table width='530' height="25" border='0' align="center" cellspacing='0' background="img/mainbg.gif" cellpadding="2">
<tr>
<td> <img src="img/biao.gif" align="absmiddle">
<%if request("cat_id")<> "" then%>
本分类共有<span><%=rs.recordcount%></span>篇文章
<%elseif request("select")<>"" then%>
共搜索到<span><%=rs.recordcount%></span>篇文章
<%else%>
当前共有<span><%=rs.recordcount%></span>篇文章
<%end if%>
</td>
</tr>
</table>
<table width="530" border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="black" bordercolor="#C0C0C0" style="border-collapse: collapse">
<tr>
<td bgcolor="#333333" width="73%" align="center" height="22">文章标题</td>
<td bgcolor="#333333" width="27%" align="center">发表时间</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
%>
<tr>
<td bgcolor="black" height="22" > <img src=img/none.gif border=0><img src=img/i9.gif border='0'> <a href="javascript:art('showart.asp?art_id=<%=rs("art_id")%>&cat_id=<%=rs("cat_id")%>')"><%=left(rs("art_title"),30) & "..."%></a></td>
<td bgcolor="black" 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 bgcolor="black" height="25" colspan="2">当前没有文章!</td>
</tr>
<%end if
end if
if not request("type")=1 then%>
<form name="form1" method="post" action="art.asp?cat_id=<%=request("cat_id")%>&select=<%=request("select")%>&keyword=<%=request("keyword")%>">
<tr>
<td align="right" bgcolor="#333333" colspan="3">
<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/cha.gif" width=14 align=absMiddle> 共[<font color="#66FFFF"><%=totalart%></font>]个作品 分[<font color="#66ffff"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle bgcolor="#333333"><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=art.asp?page=1&cat_id="&request.querystring("cat_id")&">首页</a> "
response.write "<a href=art.asp?page="&CurrentPage-1&"&cat_id="&request.querystring("cat_id")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=art.asp?page="&CurrentPage+1&"&cat_id="&request.querystring("cat_id")
response.write ">下一页</a> <a href=art.asp?page="&totalpages&"&cat_id="&request.querystring("cat_id")&">尾页</a>"
end if
%>
<IMG height=11 src="img/gt.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%>页</option>
<%else%>
<option value=<%=i%>>第<%=i%>页</option>
<%end if
next%>
</select><input type="submit" name="Submit2" value="转向" class="button"> </TD>
</TR>
</FORM>
</TABLE>
</td>
</tr>
</form>
</table>
<%end if%>
<%call br%><%call br%>
</td>
<td width=1 height="190" background="img/xu.gif"></TD>
<td width=204 align=left vAlign=top background=img/left_bg2.gif>
<TABLE width=100% border=0 align=center cellPadding=0 cellSpacing=0>
<TBODY>
<TR><td width=204><img src=img/left_top.gif usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="41, 11, 67, 24" href="book.asp" title="留言本"><area shape="rect" coords="106, 8, 169, 30" href="../ryxs/Default.asp" title="流星情缘纯文学网站"></map></td></tr>
</table>
<TABLE width=196 border=0 align=right cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<td align=center height="24" background="img/title.jpg"><strong><font color="#008000">流星情缘排行榜</font></strong></td>
</tr>
<tr><td>
<font color="#008000">
<%
rs.close
set rs=nothing
set rs3=server.createobject("adodb.recordset")
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
%> <img src=img/none.gif border=0><img src=img/title.gif border='0'> <a href="javascript:art('showart.asp?art_id=<%=rs3("art_id")%>&cat_id=<%=rs3("cat_id")%>')" title="点击次数:<%=rs3("art_count")%>"> <%if len(Rs3("art_title"))>14 then
response.write left(Rs3("art_title"),12)&"..."
else
response.write Rs3("art_title")
end if%></a><br>
<%
rs3.movenext
loop
if rs3.eof and rs3.bof then
response.write "没有相关文章"
end if
rs3.close
set rs3=nothing
%>
</font>
</td>
</tr>
<TR>
<td align=center height="24" background="img/title.jpg"><strong><font color="#008000">流星情缘查找</font></strong></td>
</tr><form name="form2" method="post" action="art.asp"><tr><td height='28' align='center'>
<input type="radio" name="select" value="0" checked><font color=#0000FF>全部</font> 
<input type="radio" name="select" value="art_title"><font color=#FF00FF>标题</font>
<input type="radio" name="select" value="art_content"><font color=#FF7F50>内容</font>
</td>
</tr><tr><td height='28' align='center'>
<input type='text' name='keyword' size='15' value='搜索关键字' maxlength='50' onFocus='this.select();' class="lanyu"> <input type='submit' name='search' value='搜索' class="button"></td></tr></form>
<TR>
<td align=center height="24" background="img/title.jpg"><strong><font color="#008000">流星情缘情感</font></strong></td>
</tr>
<tr><td><font color="#008000"><%call br%> 我,没有强壮的身体,也没有英俊的脸庞,没有明亮的眼眸,更没有稳重的气质.我不求什么,我只希望你能够记住我:那个曾经的朋友……<br>
我尊重自己的选择,我当初选择了你,无论世界怎样变,我不会后悔,更不会埋怨……<%call br%><%call br%></font></td>
</tr>
</table>
</td>
</tr>
</table>
<%
rs2.close
set rs2=nothing
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -