notesdraft_opencommited.jsp
来自「java jsp教程」· JSP 代码 · 共 234 行
JSP
234 行
<!--\webapps\jsp\notesdraft_opencommited.jsp by zhangl-->
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import=" java.util.* "%>
<%@ page import="com.icss.cnpc.msgnote.vo.*"%>
<%@ page import="com.icss.j2ee.util.PageScrollUtil" %>
<%@ page import="com.icss.cnpc.msgnote.util.CommonUtil" %>
<%@ page import="com.icss.cnpc.msgnote.util.StringUtility" %>
<%@ page import="com.icss.cnpc.msgnote.util.DateUtility" %>
<%
//response.setHeader("Pragma", "No-cache");
//response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<%
// int PageNum = PageScrollUtil.getPageNum();
String contextpath = request.getContextPath();
NoteInfoVO vo = (NoteInfoVO)request.getAttribute("notevo");
List attlist = (List)request.getAttribute("attlist");
String userid = StringUtility.filterNullObject((String)request.getAttribute("userid"));
String arg_noteTitle = StringUtility.filterNullObject((String)request.getAttribute("arg_noteTitle"));
String arg_sendPerson = StringUtility.filterNullObject((String)request.getAttribute("arg_sendPerson"));
String arg_sendUnit = StringUtility.filterNullObject((String)request.getAttribute("arg_sendUnit"));
String arg_status = StringUtility.filterNullObject((String)request.getAttribute("arg_status"));
String arg_impdegree = StringUtility.filterNullObject((String)request.getAttribute("arg_impdegree"));
String pagenumber = StringUtility.filterNullObject((String)request.getAttribute("pagenumber"));
String right = StringUtility.filterNullObject((String)request.getAttribute("right"));
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=GBK">
<link rel="stylesheet" href="<%=contextpath%>/css/style.css" type="text/css">
<script language="JavaScript" src="<%=contextpath%>/include/common.js"></script>
<SCRIPT language=JavaScript>
function updatedraft(flag1,CurID)
{
NotesForm.operate.value=flag1;
NotesForm.ID.value=CurID;
document.NotesForm.action="<%=contextpath%>/servlet/NoteManageOperServlet";
document.NotesForm.submit();
}
function commmited(flag,CurID)
{
if(!_CheckForm()){
return false
}
var str2 = document.NotesForm.validDate.value;
if(Compare_Date("<%=DateUtility.getCurrentDate()%>",str2))
{
alert("有效期小于当前日期!");
return false;
}
NotesForm.ID.value=CurID;
NotesForm.operate.value=flag;
document.NotesForm.action="<%=contextpath%>/servlet/NoteSaveServlet";
document.NotesForm.submit();
}
function _CheckForm()
{
return !Is_Null(document.NotesForm.validDate,1,'请填写有效期!')
&& is_date(document.NotesForm.validDate,1,'请输入\'2005-06-01\'形式日期');
}
function _Add()
{
if(!_CheckForm()){
return false;
}
if (NotesForm.FullFileName.value==""){
document.NotesForm.action="/officeaffair/noteswriteservlet?HasFJFlag=0";
}
else{
document.NotesForm.action="/officeaffair/noteswriteservlet?HasFJFlag=1";
}
document.NotesForm.submit();
}
function _Reset()
{
document.NotesForm.Notes_Title.value="";
document.NotesForm.Notes_Body.value="";
document.NotesForm.Notes_Title.focus;
}
function _BackTo()
{
if(NotesForm.right.value == 3){
window.location = "<%=contextpath%>/servlet/NoteManageListServlet?noteTitle="+NotesForm.noteTitle.value+"&sendPerson="+NotesForm.sendPerson.value
+"&sendUnit="+NotesForm.sendUnit.value+"&status="+NotesForm.status.value+"&impdegree="+NotesForm.impdegree.value+"&_page_num="+NotesForm.pagenumber.value;}
if(NotesForm.right.value == 1){
window.location = "<%=contextpath%>/servlet/MyNoteInfoServlet?noteTitle="+NotesForm.noteTitle.value+"&sendPerson="+NotesForm.sendPerson.value
+"&sendUnit="+NotesForm.sendUnit.value+"&status="+NotesForm.status.value+"&impdegree="+NotesForm.impdegree.value+"&_page_num="+NotesForm.pagenumber.value;}
}
function openatt(flag,CurID)
{
NotesForm.operate.value=flag;
NotesForm.ID.value=CurID;
document.NotesForm.action="<%=contextpath%>/servlet/NoteManageOperServlet";
document.NotesForm.submit();
}
</SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<body bgcolor="#FFFFFF" text="#000000" background="<%=request.getContextPath()%>/images/grid.gif" leftmargin="0" topmargin="10">
<form name=NotesForm method="Post" enctype="multipart/form-data">
<input type="hidden" name="operate" value="">
<input type="hidden" name="savetype" value="">
<input type="hidden" name="ID" value="">
<input type="hidden" name="noteTitle" value="<%=arg_noteTitle%>">
<input type="hidden" name="sendPerson" value="<%=arg_sendPerson%>">
<input type="hidden" name="sendUnit" value="<%=arg_sendUnit%>">
<input type="hidden" name="status" value="<%=arg_status%>">
<input type="hidden" name="impdegree" value="<%=arg_impdegree%>">
<input name="pagenumber" type="hidden" value="<%=pagenumber%>">
<input name="right" type="hidden" value="<%=right%>">
<%
String noteId = StringUtility.filterNullObject(vo.getNoteId());
String noteTitle = StringUtility.filterNullObject(vo.getNoteTitle());
String sendUnitId = StringUtility.filterNullObject(vo.getSendUnitId());
String sendUnit = StringUtility.filterNullObject(vo.getSendUnit());
String sendPersonid = StringUtility.filterNullObject(vo.getSendPersonid());
String sendPerson=StringUtility.filterNullObject(vo.getSendPerson());
String status = StringUtility.filterNullObject(vo.getStatus());
String validDate=StringUtility.filterNullObject(vo.getValidDate());
String sendTime=StringUtility.filterNullObject(vo.getSendTime());
// String attacthNum=vo.getAttachNum()+"";
String impdegree=StringUtility.filterNullObject(vo.getImpdegree());
String noteBody = StringUtility.filterNullObject(vo.getNoteBody());
String ext1 = StringUtility.filterNullObject(vo.getExt1());
String sendOrgName=StringUtility.filterNullObject(vo.getSendOrgName());
%>
<table width="500" border="0" align="center" cellpadding="2" cellspacing="1" bordercolordark="#DFDFFF" bordercolorlight="#003366" bgcolor="#6699CC">
<tr>
<td height="24" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="4"<%}else{%>colspan="2"<%}%> align="center" background="<%=contextpath%>/images/bg-07.jpg" bgcolor="#A6D0F2">公告内容</td>
</tr>
<tr bgcolor="EEF4FF">
<td width="22%" align="right"><div align="center">标题</div></td>
<td <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="left">
<div align="left">
<%=noteTitle%>
</div>
</td>
</tr>
<tr bgcolor="EEF4FF" >
<td height="28" bgcolor="EEF4FF" width="22%">
<div align="center">重要程度</div></td>
<td align="center" valign="middle" bgcolor="EEF4FF" width="33%" height="28">
<div align="left">
<%if(impdegree.equals("0")){%>
一般 <%}%>
<%if(impdegree.equals("1")){%>
紧急
<%}%>
</div></td>
<%if(CommonUtil.Is1tN().equals("1")){%>
<td width="22%"><div align="center">发布范围</div></td>
<td align="center" valign="middle" bgcolor="EEF4FF" width="23%">
<div align="left"><%=sendOrgName%></td>
<%}%>
</tr>
<tr bgcolor="EEF4FF" >
<td height="28" bgcolor="EEF4FF"><div align="center">有效期</div></td>
<td height="28" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="left" valign="middle" bgcolor="EEF4FF">
<%=validDate%>
</td>
</tr>
<tr bgcolor="EEF4FF" >
<td valign="middle" align="center">内 容</td>
<td height="227" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="center" valign="top" bgcolor="EEF4FF">
<div align="left">
<font size="4"><%=StringUtility.showHTMLStr(noteBody)%></font>
</div>
</td>
</tr>
<%
int num = 0;
for(int j = 0; j < attlist.size(); j++)
{
NoteAttechVO a = (NoteAttechVO)attlist.get(j);
String fileId = StringUtility.filterNullObject(a.getFileId());
String fileName = StringUtility.filterNullObject(a.getFileName());
num++;
%>
<tr bgcolor="EEF4FF" >
<td height="27" align="center" valign="middle" bgcolor="EEF4FF"><div align="center">附件<%=num%></div></td>
<td height="27" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="center" valign="bottom" bgcolor="EEF4FF">
<div align="center">
<a href="javascript:openatt('openatt','<%=fileId%>')">
<%if(fileName.equals("")){%>无标题<%}else{%><%=fileName%><%}%>
</a>
</div></td>
</tr>
<%
}
%>
</table>
<br><br>
<center>
<%if(status.equals("0")){%>
<img style="CURSOR: hand" onClick='commmited("commmited","<%=noteId%>")' src="<%=contextpath%>/images/save.gif" border=0>
<%}%>
<img style="CURSOR: hand" onClick=javascript:_BackTo() src="<%=contextpath%>/images/return.gif" border=0>
</center>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?