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

📄 noticemore.jsp

📁 辅助办公系统,具有发布公告、站内邮箱、日程安排、日志查看等功能
💻 JSP
字号:
<%@page contentType="text/html;charset=gb2312" language="java"
	import="com.x3408.office.Constants,com.x3408.database.CNProvider,java.sql.ResultSet,java.sql.Statement,com.x3408.employees.UserInfo,
	com.x3408.employees.UserADO,java.sql.Connection,java.sql.PreparedStatement,com.x3408.mail.MailADO,com.x3408.notice.NoticeADO,com.x3408.download.DownLoadADO"%>
<%
	Connection conn = null;
	Statement stmt = null;
	Statement stmt1 = null;
	ResultSet rs = null;
	ResultSet rt = null;
	String link = null;
	conn = CNProvider.getConnection();
	if (conn == null)
		out.print("connect error");
	stmt = conn.createStatement();
	rs = stmt
			.executeQuery("select * from Notice order by noticeID desc");
	stmt1 = conn.createStatement();
	rt = stmt1.executeQuery("select count(*) from Notice");
	int intPageSize = 10;
	int intRowCount;
	int intPageCount;
	int intPage;
	int i, j;
	String strPage;
	rt.next();//指向下一条记录
	intRowCount = rt.getInt(1);
	strPage = request.getParameter("page");
	if (strPage == null) {
		intPage = 1;
	} else {
		intPage = Integer.parseInt(strPage);
		if (intPage < 1)
			intPage = 1;
	}
	intPageCount = (intRowCount + intPageSize - 1) / intPageSize;
	if (intPage > intPageCount)
		intPage = intPageCount;
%>
<html>
	<head>
		<%
			String employeeID=(String)session.getAttribute("employeeID");
			UserInfo userInfo = UserADO.userQuery(employeeID);
			String msg=(String)request.getAttribute("msg");
			if(!(msg==null||"".equals(msg))){
		%>
				<script language=javascript>
					alert("<%=msg%>");
				</script>
		<%
			}
		 %>
		<title>X3408辅助办公系统</title>
	</head>
	<body background="NoticeImages/main.jpg" topmargin="0" leftmargin="0"
		rightmargin="0" bottommargin="0">
		<jsp:include page="<%=Constants.S_INDEXHEADER_JSP%>" />
		<table width="778" border="0" align="center" cellpadding="0"
			cellspacing="0" class="tb1">
			<tr>
								<td width="180" height="200" valign="top" class="blb">
			<table width="100%" border="0" cellspacing="1" cellpadding="0" >
				<tr>
					<td height="20" align="center" class="blm">
						用户信息
					</td>
				</tr>
				<tr>
					<td align="center" valign="top">
						<Marquee direction=up onmouseover=this.stop()
							onmouseout=this.start() scrollamount=1 scrollDelay=4 width=180
							Height=60>
							<table border=0>
								<tr>
									<td>
										<%=userInfo.getName() %>
										欢迎你来到X3408工作室
									</td>
								</tr>
							</table>
						</Marquee>
				<tr>
					<td align="center" valign="middle">
						<a href=<%=Constants.C_LOGIN_JAVA %>?action=exit>[点击这里退出]</a>
					</td>
				</tr>
			</table>
			<%if(userInfo.getAdmin()){%>
			<table width="100%" border="0" cellspacing="1" cellpadding="0">
				<tr class="blm">
					<td width="100%" height="20" align="center" valign="middle">
						管理功能
					</td>
				</tr>
				<tr>
					<td height="23" align="center" valign="middle">
						<A href=/OfficeSystem/Passed/Admin/FTPManage/UpLoad.jsp>上 传 文 件</A>
					</td>
				</tr>
				<tr>
					<td height="20" align="center" valign="middle">
						<A href="<%=Constants.C_NOTICEADD_JSP %>">添 加 公 告</A>
					</td>
				</tr>
			</table>
			<%}else{%>
			<table width="100%" border="0" cellspacing="1" cellpadding="0">
				<tr class="blm">
					<td width="100%" height="20" align="center" valign="middle">
						用户功能
					</td>
				</tr>
				<tr>
					<td height="23" align="center" valign="middle">
						<A href="<%=Constants.C_MAIL_JSP%>">新 邮 件(<%=MailADO.newMailCount(employeeID)%>)</A>
					</td>
				</tr>
				<tr>
					<td height="20" align="center" valign="middle">
						<A href="<%=Constants.C_NOTICE_JAVA%>?action=allNoticeQuery">新 公 告(<%=NoticeADO.newNoticeCount()%>)</A>
					</td>
				</tr>
				<tr>
					<td height="20" align="center" valign="middle">
						<A href="<%=Constants.C_DOWNLOAD_JAVA%>?action=allFileQuery">新 下 载(<%=DownLoadADO.newFileCount()%>)</A>
					</td>
				</tr>
				<tr>
					<td height="20" align="center" valign="middle">
						<A href=/OfficeSystem/Passed/User/Help/Help.jsp>使 用&nbsp;帮 助</A>
					</td>
				</tr>
			</table>
			<%} %>
			<table  width="100%" border="0" cellspacing="1"
				cellpadding="0" bgcolor="#ffffff">
				<FORM name=form1 action="" method=post>
				<TR>
					<TD height=5 bgcolor="#ffffff"></TD>
				</TR>
				<TR>
					<TD align=middle height=20 bgcolor="#ffffff">
						<SELECT class=selectColor onchange=ok(menu1) name=menu1>
							<OPTION selected>
								------校内链接------
							</OPTION>
							<OPTION value=http://www.jxnu.edu.cn>
								&nbsp;※&nbsp;江西师范大学
							</OPTION>
							<OPTION value=http://jwc.jxnu.edu.cn />
								&nbsp;※&nbsp;江西师范大学教务处
							</OPTION>
							<OPTION value=http://www.jxnu.edu.cn/xgw/souye.asp>
								&nbsp;※&nbsp;江西师范大学学工处
							</OPTION>
							<OPTION value=http://210.35.164.11/index.asp>
								&nbsp;※&nbsp;江西师范大学图书馆
							</OPTION>
						</SELECT>
					</TD>
				</TR>
				<TR>
					<TD height=10 bgcolor="#ffffff"></TD>
				</TR>
				<TR>
					<TD align=middle height=20 bgcolor="#ffffff">
						<SELECT class=selectColor onchange=ok(menu2) name=menu2>
							<OPTION selected>
								------校外链接------
							</OPTION>
							<OPTION value=http://www.jxgj.com>
								&nbsp;※&nbsp;江西高教网
							</OPTION>
							<OPTION value=http://www.jict.org>
								&nbsp;※&nbsp;江西省计算技术研究所
							</OPTION>
							<OPTION value=http://www.ceiaec.org>
								&nbsp;※&nbsp;信息产业部电子教育中心
							</OPTION>
							<OPTION value=http://www.51cmm.com>
								&nbsp;※&nbsp;软件工程专家网
							</OPTION>
							<OPTION value=http://www.csdn.net>
								&nbsp;※&nbsp;中国最大IT社区
							</OPTION>
							<OPTION value=http://sse.tongji.edu.cn>
								&nbsp;※&nbsp;同济大学软件学院
							</OPTION>
							<OPTION value=http://software.nju.edu.cn />
								&nbsp;※&nbsp;南京大学软件学院
							</OPTION>
							<OPTION value=http://www.ss.pku.edu.cn>
								&nbsp;※&nbsp;北京大学软件学院
							</OPTION>
							<OPTION value=http://www.thss.tsinghua.edu.cn>
								&nbsp;※&nbsp;清华大学软件学院
							</OPTION>
							<OPTION value=http://www.ios.ac.cn>
								&nbsp;※&nbsp;中科院软件研究所
							</OPTION>
							<OPTION value=http://www.buptsse.cn>
								&nbsp;※&nbsp;北京邮电大学软件学院
							</OPTION>
						</SELECT>
					</TD>
				</TR>
				<TR>
					<TD height=156 width="180">
						<IMG src="/OfficeSystem/Passed/User/CommonImages/scene.gif">
					</TD>
				</TR>
			</form>
			</table>
		</td>
				<td width="595" valign="top" background="NoticeImages/02.jpg">
					<table cellSpacing=0 cellPadding=0 width=595 border=0>
						<tr>
							<td colspan="7" background="NoticeImages/01.jpg">
								&nbsp;
							</td>
						</tr>
						<form action="NoticeMore.jsp" method="post" name="getPage">
						<tr>
							<TD align=right colspan="7" background="NoticeImages/01.jpg">
								<%=intPageCount%>
								页&nbsp;
								<a href="NoticeMore.jsp?page=1">首页</a>
								<a href="NoticeMore.jsp?page=<%=intPage - 1%>">上一页</a>
								<%
								if (intPage < intPageCount) {
								%>
								<a href="NoticeMore.jsp?page=<%=intPage + 1%>">下一页</a>
								<%
								}
								%>
								<a href="NoticeMore.jsp?page=<%=intPageCount%>">尾页</a>&nbsp;页次:
								<%=intPage%>
								/
								<%=intPageCount%>
								&nbsp;到第
								<input name="page" type="text" size="2" onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" >
								<input type="submit" name="jump" value="go" onclick="if(getPage.page.value==''){alert('请输入要查看的页数');return false;}">
								&nbsp;&nbsp;&nbsp;&nbsp;
							</td>
						</tr>
						</form>
						<tr>
							<td background="NoticeImages/01.jpg">
								&nbsp;
							</td>
							<td background="NoticeImages/01.jpg" align="center">
								发布时间
							</td>
							<td background="NoticeImages/01.jpg">
								标题
							</td>
							<td background="NoticeImages/01.jpg" align="center">
								发布人
							</td>
							<td background="NoticeImages/01.jpg">
								&nbsp;
							</td>
							<td background="NoticeImages/01.jpg">
								&nbsp;
							</td>
							<td background="NoticeImages/01.jpg">
								&nbsp;
							</td>
						</tr>
						<form action="<%=Constants.C_NOTICEMANAGE_JAVA%>" method="post" name="noticeUpdate">
							<input type="hidden" name="noticeID" value="">
							<input type="hidden" name="action" value="">
							<%
								j = 0;
								i = (intPage - 1) * intPageSize;
								while (j < i && rs.next())
									j++;
								j = 0;
								while (j < intPageSize && rs.next()) {
									link = "Notice?action=noticeQuery&noticeID="
									+ rs.getInt("noticeID");
							%>
						
						<tr>
							<TD width="20" height="30" align="right">
								<B><IMG height=9 src="../CommonImages/arrow1_1.gif" width=9
										border=0> </B>
							</TD>
							<td width="90" class=tb3>
								<%=rs.getDate("publishTime")%>
							</td>
							<td width="350" align="left" class=tb3>
								<a href="<%=link%>" target="blink"><%=rs.getString("caption")%>
								</a>
							</td>
							<td width="80" class=tb3>
								<center>
									<%=rs.getString("publisher")%>
								</center>
							</td>
							<%if("admin".equals(session.getAttribute("passed"))){%>
								<td>
									<INPUT
										onclick="noticeUpdate.noticeID.value='<%=rs.getString("noticeID")%>';noticeUpdate.action.value='noticeQuery';"
										type="submit" value=修改>
								</td>
								<td>
									<INPUT
										onclick="if(confirm('你确实要删除该公告吗?')){noticeUpdate.noticeID.value='<%=rs.getString("noticeID")%>';noticeUpdate.action.value='noticeDelete';}else return false;"
										type="submit"  value=删除>
								</td>
							<%}%>
						</tr>

						<%
							j++;
							}
						%>
						</form>
						<%
							rs.close();
							rt.close();
							stmt.close();
							stmt1.close();
							conn.close();
						%>
					</table>

				</td>
			</tr>
		</table>
		<jsp:include page="<%=Constants.S_INDEXFOOTER_JSP%>" />
	</body>
</html>

⌨️ 快捷键说明

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