?? listgq.jsp
字號(hào):
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>供求信息列表 : SaaS 農(nóng)業(yè)信息化綜合服務(wù)平臺(tái)</title>
<link href="/css/new.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="980" border="0" cellspacing="0" cellpadding="0" style="margin-left:15px;">
<tr>
<td valign="top">
<%@include file="/inc/head.jsp" %>
</td>
</tr>
<tr>
<td valign="top">
<div class="containerone">
<div class="newlbleft">
<div class="newlbleftone">您的位置:首頁(yè) >> 新聞列表</div>
<div class="newlblefttwo">
<div class="newlblefttwo1">
<div class="newlbone">
<div class="newlboneleft">新聞列表</div>
<div class="newlboneright"></div>
</div>
<div class="newlbtwo">
<%
com.xsaas.util.DBConnection dbc = new com.xsaas.util.DBConnection(true);
dbc.getConnection();
String spage= request.getParameter("p"),type= request.getParameter("t"),stmp="0",content="";
String con = "";
if(type!=null)
con = " where title like '%"+type+"%'";
if(spage==null) spage="0";
else{
stmp = Integer.toString(Integer.parseInt(spage)*10);
}
String sqltext = "select id,title from saasnews.agriinfo "+con+" order by id desc limit "+stmp+",10";
//out.println(sqltext);
String title = "";
com.xsaas.util.Charset charset = new com.xsaas.util.Charset();
java.sql.ResultSet rs = dbc.getRS(charset.GBK_2_ISO(sqltext));
while(rs.next()){
%>
<div class="newlbtwo1">
<div class="newlbtwo2 lblj"><a href='showgq.jsp?id=<%= rs.getString(1) %>' target='_blank'>
<%
title = charset.ISO_2_GBK(rs.getString(2)) ;
if(title.length()>30){
title=title.substring(0,30)+"...";
}
out.println(title);
%>
</a></div>
<!--div class="newlbtwo3">2008-02-25 點(diǎn)機(jī)數(shù):127次</div-->
<div class="newlbtwo4"><%
content= com.xsaas.util.ETTagsSequence.getBody((content),false).trim();
if((content!=null)&&(content.length()>100)){
content=content.substring(0,100);
}
out.println(content);
%>
...</div>
</div>
<%
}
rs=null;
dbc.close();
%>
</div>
<div class="newlbtwo lbg" style="text-align:center;"><%
out.println(dbc.getPageList(dbc," saasnews.agriinfo "," ","listgq.jsp?p=",spage,6,20));
%>
</div>
</div>
</div>
</div>
<div class="newlbright">
<%@include file="/inc/right.jsp" %>
</div>
</div>
</td>
</tr>
<tr>
<td valign="top">
<div class="containertwo">
<%@include file="/inc/foot.jsp" %>
</div>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -