⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bulletin.jsp

📁 这是一个法律事务所系统源码
💻 JSP
字号:
<%--
模块名称:律所公告
模块功能:公告显示
版    本:V1.0
著 作 人:蔡静
著作日期:2001-11-12
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
	修改日期:2001-12-30
	修 改 人:Celts
	修改理由:内容无原格式输出
	修改出处:
	= = = = = = = = = = = = = = = = = = = = = = = = = =

--%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<%@ page import="system.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<jsp:useBean id="stringset" class="system.ExtendString" scope="page" />
<%
  Security auth = new Security();
  String employee_id = (String)session.getAttribute("employee_id");
  if(employee_id == null || employee_id.equals(""))
  {
    response.sendRedirect(response.encodeRedirectURL("../Error/nonlogin.htm"));
  }
  String modelid = "Bbs010";
  int authflag = auth.popedom(employee_id, modelid);
  if(authflag == 0 || authflag == 2 || authflag == -1)
  {
%>
  <jsp:forward page="../inc/noauth.jsp" >
  </jsp:forward>
<%
  }
%>
<%
  String num = request.getParameter("pagenum");
  int pagenum, pagesize = 10, recordcount, pagecount;
  if ((num == null) || (num.equals("")))
    pagenum = 1;
  else
    pagenum = Integer.parseInt(num);
  String sql = "select a.bulletin_id, a.bulletin_title, a.input_time, ";
  sql = sql + "b.employee_name as input_person from t_bulletin a, t_employee b where ";
  sql = sql + "a.input_person = b.employee_id order by bulletin_id";
  ResultSet rs = db.executeQuery(sql);
  if (rs != null) {
    rs.last();
    recordcount = rs.getRow();
    if (recordcount == recordcount/pagesize*pagesize)
      pagecount = recordcount/pagesize;
    else
      pagecount = recordcount/pagesize + 1;
    if (pagenum < 1)
      pagenum = 1;
    if (pagenum > pagecount)
      pagenum = pagecount;
    rs.absolute((pagenum-1)*pagesize+1);
%>
<html>
<head>
<title>律 所 公 告</title>
<%@ include file="../inc/config.jsp" %>
</head>

<body class=page>
<script language="javascript">
   function go() {
     document.thisForm.action="Bulletin.jsp";
     document.thisForm.submit();
   }

   function keygo() {
     if(event.keyCode == 13){
	document.thisForm.action="Bulletin.jsp";
	document.thisForm.submit();
     }
     else {
       if (event.keyCode<48 || event.keyCode>57) {
         alert("请输入数字!");
         document.thisForm.pagenum.value="";
         event.returnValue=false;
       }
     }
   }
</script>
<form name="thisForm" METHOD="post">
<!--显示工具条-->
<table width="98%" align="center" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td><a href="Bulletin.jsp"><img src="../images/all.gif" height="22" border="0"></a>
    <a href="BulletinSearch.jsp"><img src="../images/query.gif" alt="查询内容"   width="79" height="22" border="0"></a>
    </td>
    <td width="108" height="30" align="center" background="../images/title_bg.gif">
      <script language=JavaScript>
document.write("<span class=\"title\">"+document.title+"</span>");
</script>
    </td>
  </tr>
</table>
<table width="98%" background="../images/line.gif" border="0" cellspacing="0" cellpadding="0" height="12" align="center">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<!--显示工具条结束-->
<!--显示分页-->
<%@ include file="../inc/page1.jsp" %>
<!--显示分页结束-->
<!--显示内容-->
  <table width="98%" cellspacing="1" cellpadding="5"  height="25" align="center" border="0" class="table_bg">
    <tr class="title_bg">
      <td width="11%" align="center"> 公告编号</td>
      <td width="41%" align="center"> 公告标题</td>
      <td width="19%" align="center"> 录入时间</td>
      <td width="10%" align="center"> 录入人</td>
    </tr>
  <%
    if (pagecount > 0) {
    String bulletin_id, bulletin_title, input_time, input_person;
    for (int i=1;i<=pagesize;i++) {
      bulletin_id = rs.getString("bulletin_id");
      bulletin_title = rs.getString("bulletin_title");
      bulletin_title=stringset.toHtml(bulletin_title);
      input_time = rs.getString("input_time");
      input_person = rs.getString("input_person");
      if (rs.getRow()!=(rs.getRow()/2*2)) {
  %>
  <tr  class="tr_bg1">
  <%  }
      else {
  %>
  <tr  class="tr_bg2">
  <%  }
  %>
      <td width="11%" align="right"><%=bulletin_id%></td>
      <td width="41%" align="right"><a href="BulletinInfo.jsp?bulletin_id=<%=bulletin_id%>"><%=bulletin_title%></a></td>
      <td width="19%" align="center"><%=input_time.substring(0,10)%></td>
      <td width="10%" align="right"><%=input_person%></td>
    </tr>
  <%
      if (!rs.next())
        break;
    }
    }
  %>
  </table>

<!--显示内容结束-->
</form>
</body>
</html>
<%}%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -