?? first1.jsp
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id='db' scope='request' class='Base.DataBean.DefaultDataBean' /><jsp:useBean id='notice' scope='request' class='common.flyhigh.noticeBean' /><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link rel="stylesheet" type="text/css" href="index.css"><title>無標(biāo)題文檔</title></head><%@ page contentType="text/html;charset=gb2312"%><%@page import="java.util.*,java.text.*"%><%DateFormat df = DateFormat.getDateInstance();notice.Init(db);int allcount=db.getCount("weeks");java.util.Date today=new Date();java.util.Date start=new Date();java.util.Date end=new Date();int weeknum=0;for(int i=0;i<db.getCount("weeks");i++){start=df.parse(db.getAttributeStr("weeks.start",i));end = df.parse(db.getAttributeStr("weeks.end",i));if(today.compareTo(start)>=0&&today.compareTo(end)<0){weeknum=Integer.parseInt(db.getAttributeStr("weeks.weeknum",i));}}%><% com.util.DealString ds = new com.util.DealString(); com.db.CommonBean myBean = new com.db.CommonBean(); //發(fā)送給我的 String sql1 = " select a.*,b.name,c.id as backid,c.ifread,c.backs" +" from kjc_publish a,kjc_people b,kjc_back c " +" where a.model='1' " +" and a.froms=b.id " +" and a.id=c.objectid " +" and c.backer="+(String)session.getAttribute("ID") + " " +" order by a.endtime desc,c.ifread,c.backs desc"; Vector vect1 = myBean.getDataBySql(sql1);%><body leftmargin="0" topmargin="0"><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="10"> </td> <td width="*"><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="20" class="title_s"> 您已登陸: <%=ds.toString((String)session.getAttribute("NAME"))%> </td><td align=right class="title_s">[<a href="../user/show.cgi?id=<%=(String)session.getAttribute("ID")%>">個(gè)人信息</a>|<a href="../user/modify.cgi?id=<%=(String)session.getAttribute("ID")%>">修改</a>]</td> </tr> <tr> <td height="5" bgcolor="#A3BED9" colspan=2></td> </tr> <tr> <td height="1" bgcolor="#0A1870" colspan=2></td> </tr> </table></td> <td width="30"> </td> </tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="10"> </td> <td width="*"> <table class="main_w" width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="FFFFFF" bgcolor="E7F2FF"> <tr bgcolor="#FFFFFF" class="title_s"> <td height="20" colspan="7"><div align="center">我的新消息 </div> <div align="center"></div></td> </tr> <tr> <td width="44" align=center>序號</td> <td width="266" height="20" align=center>通知標(biāo)題</td> <td width="70" height="20" align=center>發(fā)布人</td> <td width="70" height="20" align=center>發(fā)布日期</td> <td width="70" height="20" align=center>有效日期</td> <td width="50" height="20" align=center>附件數(shù)</td> <td width="50" height="20" align=center ><div align="center">操作</div></td> </tr> <% int t = 0 ; String uid = ds.toString((String)session.getAttribute("ID")); for(int i=0;i<vect1.size();i++){ Hashtable hash = (Hashtable)vect1.get(i); String id = (String)hash.get("id"); String title = (String)hash.get("title") ; String froms = (String)hash.get("froms"); String backid = (String)hash.get("backid"); String name = (String)hash.get("name"); String addtime = (String)hash.get("addtime"); String endtime = (String)hash.get("endtime"); String ifread = ds.toString((String)hash.get("ifread")); String backs = ds.toString((String)hash.get("backs")); //狀態(tài) String status = ""; if(!backs.equals(""))status = "<font color=#FF9933>已回</font>" ; else if(ifread.equals("1"))status = "<font color=#669933>已讀</font>" ; else status = "<font color=red>未讀</font>" ; if(!status.equals("<font color=red>未讀</font>"))continue; //統(tǒng)計(jì)附件數(shù) String sql = "select count(id) as count from kjc_file where objectid="+id ; String count_file = ds.toString((String)(((Hashtable)(((Vector)myBean.getDataBySql(sql)).get(0))).get("count"))); //顯示為空 if(title.equals(""))title = " "; if(froms.equals(""))froms = " "; if(name.equals(""))name = " "; if(addtime.equals(""))addtime = " "; if(endtime.equals(""))endtime = " "; t++; %> <tr> <td height="20" align=center><%=(i+1)%></td> <td height="20"><a href="../notice1/show.jsp?id=<%=id%>&backid=<%=backid%>"><%=title%></a></td> <td height="20" align=center><%=name%></td> <td height="20" align=center><%=addtime%></td> <td height="20" align=center><%=endtime%></td> <td height="20" align=center><%=count_file%></td> <td height="20" align=center><a href="../notice1/newback.jsp?id=<%=id%>&backid=<%=backid%>&title=<%=title%>">回復(fù)</a></td> </tr> <% } %> <%if(t==0)out.println("<tr><td colspan=7 align=center>沒有新消息!</td></tr>");%> </table> </td> <td width="30"> </td> </tr></table></body></html><% myBean.closeConn ( ) ;%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -