不锈钢闸门 螺杆式启闭机 卷扬式启闭机 枸杞苗 防火卷帘门 空心砖机 负压引流 深圳格力空调拆装 钢制闸门 仓储笼 潍坊商务宾馆 铝桶 别墅门 北京清洗地毯公司 碱性电池 弯曲试验机 停车设备
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="data.*" %> CAD CG <% Conn conn=new Conn(); String sql = "select * from news order by shijian desc"; ResultSet rs1=null; ResultSet rs2=null; ResultSet rs3=null; String title1=null; String title2=null; String img=null; String abs=null; String shijian1=null; String shijian2=null; %>

新闻

<% MyTime mytime=new MyTime(); String id=null; String id1=null; String id2=null; rs1=conn.executeQuery(sql); if(rs1==null) throw new Exception("database exception"); if(rs1.next())//新闻的第一条 { title1=rs1.getString("title"); // title1=mytime.getStrByLength(title1,40); abs=rs1.getString("abstract"); shijian1=rs1.getString("shijian"); // shijian1=mytime.getStrByLength(title1,10)+"..."; id1=rs1.getString("ID"); %>

>>><%=title1 %> <%=abs %>

<%} else { %>

<%} %> <% if(rs1.next()) { abs=rs1.getString("abstract");// 新闻的第二条 title2=rs1.getString("title"); // title2=mytime.getStrByLength(title2,40); shijian2=rs1.getString("shijian"); id2=rs1.getString("ID"); %>

>>><%=title2 %> <%=abs %>

<%} else { %>

<%} %>

更多新闻:

<% if(rs1.next()) {//更多新闻的第一条 abs=rs1.getString("abstract"); title2=rs1.getString("title"); shijian2=rs1.getString("shijian"); shijian2=mytime.getStrByLength(shijian2,10); id2=rs1.getString("ID"); %>

>>> <%=title2 %>[<%=shijian2 %>]

<% } %> <% if(rs1.next()) {//更多新闻的第二条 abs=rs1.getString("abstract"); title2=rs1.getString("title"); shijian2=rs1.getString("shijian"); shijian2=mytime.getStrByLength(shijian2,10); id2=rs1.getString("ID"); %>

>>> <%=title2 %>[<%=shijian2 %>]

<% } %> <% if(rs1.next()) {//更多新闻的第三条 abs=rs1.getString("abstract"); title2=rs1.getString("title"); shijian2=rs1.getString("shijian"); shijian2=mytime.getStrByLength(shijian2,10); id2=rs1.getString("ID"); %>

>>> <%=title2 %>[<%=shijian2 %>]

<% } %>

学术报告

<% rs1.close(); rs2=conn.executeQuery("SELECT * FROM xsbg order by shijian desc"); if(rs2==null) throw new Exception("database exception"); if(rs2.next()) { //学术报告第一条 abs=rs2.getString("abstract"); title1=rs2.getString("title"); // title1=mytime.getStrByLength(title1,40); shijian1=rs2.getString("shijian"); id1=rs2.getString("ID"); %>

>>><%=title1 %> <%=abs %>

<%} else { %>

<%} %> <% // rs=conn.executeQuery("SELECT * FROM xsbg order by shijian desc"); if(rs2.next()) { //学术报告第二条 abs=rs2.getString("abstract"); title2=rs2.getString("title"); // title2=mytime.getStrByLength(title2,40); shijian2=rs2.getString("shijian"); id2=rs2.getString("ID"); %>

>><%=title2 %> <%=abs %>

<% } else { %>

<%} %>

更多报告:

<% if(rs2.next()) { // abs=rs.getString("abstract"); title2=rs2.getString("title"); shijian2=rs2.getString("shijian");//学术报告第一条 shijian2=mytime.getStrByLength(shijian2,10); id2=rs2.getString("ID"); %>

>>> <%=title2 %> [<%=shijian2 %>]

<% } %> <% if(rs2.next()) { // abs=rs.getString("abstract"); title2=rs2.getString("title"); shijian2=rs2.getString("shijian");//学术报告第二条 shijian2=mytime.getStrByLength(shijian2,10); id2=rs2.getString("ID"); %>

>>> <%=title2 %> [<%=shijian2 %>]

<% } if(rs2.next()) { // abs=rs.getString("abstract"); title2=rs2.getString("title"); shijian2=rs2.getString("shijian");//学术报告第三条 shijian2=mytime.getStrByLength(shijian2,10); id2=rs2.getString("ID"); %>

> >><%=title2 %> [<%=shijian2 %>]

<% } %>

征文通知

<% rs2.close(); rs3=conn.executeQuery("SELECT * FROM zwtz where ID=16"); if(rs3==null) throw new Exception("database exception"); if(rs3.next()) { //通知一 abs=rs3.getString("abstract"); title1=rs3.getString("title"); // title1=mytime.getStrByLength(title1,40); shijian1=rs3.getString("shijian"); id1=rs3.getString("ID"); %>

>>><%=title1 %><%=abs %>

<%} %>

更多通知:

<% // rs=conn.executeQuery("SELECT * FROM zwtz order by shijian desc"); rs3=conn.executeQuery("SELECT * FROM zwtz order by shijian desc"); if(rs3.next()) { //通知 一 abs=rs3.getString("abstract"); title2=rs3.getString("title"); shijian2=rs3.getString("shijian"); shijian2=mytime.getStrByLength(shijian2,10); id2=rs3.getString("ID"); } %>

>>> <%=title2 %> [<%=shijian2 %>]

<% if(rs3.next()) { //通知二 abs=rs3.getString("abstract"); title2=rs3.getString("title"); shijian2=rs3.getString("shijian"); shijian2=mytime.getStrByLength(shijian2,10); id2=rs3.getString("ID"); %>

>>> <%=title2 %> [<%=shijian2 %>]

<% // rs=conn.executeQuery("SELECT * FROM zwtz order by shijian desc"); } if(rs3.next()) { //通知三 abs=rs3.getString("abstract"); title2=rs3.getString("title"); shijian2=rs3.getString("shijian"); shijian2=mytime.getStrByLength(shijian2,10); id2=rs3.getString("ID"); %>

>>> <%=title2 %> [<%=shijian2 %>]

<% } rs3.close(); conn.close(); %>