作者在 2007-06-05 05:59:00 发布以下内容
<div><!----页角连接---->
<% String linktitle = "";
String link = "";
String linkstop="||<<";
ResultSet rs_link=sql.query("select id,title from article where fid='"+fid+"' and id>'"+id+"' order by time limit 0,1;");
if(!rs_link.next()){
link=linkstop;
}
else{
rs_link.next();
linktitle=rs_link.getString("title");
link="<a href=\"show.jsp?fid="+fid+"&id="+rs_link.getString("id")+"\" title=\""+linktitle+"\">上一页</a>";
rs_link.close();
}
out.print(link);//上一页
%>
||
<%
rs_link=sql.query("select id,title from article where fid='"+fid+"' and id<'"+id+"' order by time limit 0,1;");
if(!rs_link.next()){
linktitle = linkstop;
}
else{
rs_link.next();
linktitle=rs_link.getString("title");
link="<a href=\"show.jsp?fid="+fid+"&id="+rs_link.getString("id")+"\" title=\""+linktitle+"\">下一页</a>";
rs_link.close();
}
out.print(link);
%>
</div><!----页角连接 OVER---->
<% String linktitle = "";
String link = "";
String linkstop="||<<";
ResultSet rs_link=sql.query("select id,title from article where fid='"+fid+"' and id>'"+id+"' order by time limit 0,1;");
if(!rs_link.next()){
link=linkstop;
}
else{
rs_link.next();
linktitle=rs_link.getString("title");
link="<a href=\"show.jsp?fid="+fid+"&id="+rs_link.getString("id")+"\" title=\""+linktitle+"\">上一页</a>";
rs_link.close();
}
out.print(link);//上一页
%>
||
<%
rs_link=sql.query("select id,title from article where fid='"+fid+"' and id<'"+id+"' order by time limit 0,1;");
if(!rs_link.next()){
linktitle = linkstop;
}
else{
rs_link.next();
linktitle=rs_link.getString("title");
link="<a href=\"show.jsp?fid="+fid+"&id="+rs_link.getString("id")+"\" title=\""+linktitle+"\">下一页</a>";
rs_link.close();
}
out.print(link);
%>
</div><!----页角连接 OVER---->