日期:2014-05-16 浏览次数:20399 次
<frameset cols="*" rows="74,*" style="height: 100%;" framespacing="0" id="globalFrame"> <frame scrolling="no" marginwidth="0" marginheight="0" src="<%=request.getContextPath() %>/Login_loginTop" name="topFrame" frameborder="0" scrolling="no" noresize="noresize" id="topFrame"/> <frameset cols="166,8,*" id="myFrame" > <frame frameborder="0" scrolling="no" src="<%=request.getContextPath() %>/LeftMenu_leftMenuShow" name="leftFrame" id="leftFrame" /> <frame frameborder="0" scrolling="no" noresize="noresize" id="midFrame" name="midFrame" src="<%=request.getContextPath() %>/Login_loginSwitch"/> <frame frameborder="0" scrolling="auto" src="<%=request.getContextPath() %>/Login_loginRight" name="main" id="main"/> </frameset> <noframes></noframes> </frameset>?
/*系统升级公告*/ setInterval("showUpGrade()", 1000*60*10); function showUpGrade(){ $.ajax({ type:'post', url:'Login_showUpGrade', async: false , dataType:'json', success:function(data){ if(data.upGradeState=="true"){ window.parent.frames['globalFrame'].rows=data.frameRows; $("#top_notice").html(data.upGradeString); $("#top_notice").css("display", "block"); } else{ window.parent.frames['globalFrame'].rows=data.frameRows; $("#top_notice").css("display", "none"); } } }); }
/** * 显示系统升级公告 * @author mengxianjun * @date 2011-11-22 下午16:09:29 */ public void showUpGrade(){ String upGradeString = ""; String upGradeState = "false";//公告状态 String frameRows = "74,*";//主frameset页的rows大小 try { TUpgrade upGrade = new TUpgrade(); upGrade.setNowDate(new Date()); List<TUpgrade> upGradeList = UpGradeService.queryAll(upGrade); if(upGradeList.size()>0){ upGradeString = "升级公告:";//系统升级公告字符串 for(TUpgrade myTUpgrade: upGradeList){ upGradeString = upGradeString+myTUpgrade.getUpgradeInfo(); } upGradeState = "true"; frameRows = "102,*"; } PrintWriter out = this.getResponse().getWriter(); out.print("{\"upGradeString\":\""+upGradeString+"\",\"upGradeState\":\""+ upGradeState+"\",\"frameRows\":\""+frameRows+"\"}"); }catch (Exception e){ log.error("LoginAction's showUpGrade():" + e.fillInStackTrace()); } }
<select id="queryModel" parameterClass="com.hanpeng.base.phone.model.TUpgrade" resultClass="com.hanpeng.base.phone.model.TUpgrade"> select UPGRADE_NUM as upgradeNum , UPGRADE_INFO as upgradeInfo , CREATE_DATE as createDate , PUBLISH_DATE as publishDate , FINISH_DATE as finishDate , EMPLOYEE_ID as employeeId from (select * from t_upgrade t where t.finish_date>=sysdate order by t.create_date desc) where rownum = 1 </select>?