notesdraft_update.jsp
来自「java jsp教程」· JSP 代码 · 共 445 行 · 第 1/2 页
JSP
445 行
}
}
}
function del(flag1,CurID1,CurID2)
{
if(window.confirm("您确定要删除吗?"))
{
NotesForm.operate.value=flag1;
NotesForm.ID.value=CurID1;
NotesForm.delattid.value=CurID2;
window.location.href = "<%=contextpath%>/servlet/NoteManageOperServlet?operate=delatt&state=0&ID=<%=vo.getNoteId()%>&delattid="+NotesForm.delattid.value+"&pagenumber="+NotesForm.pagenumber.value+"&right=<%=right%>";
}
}
function openatt(flag,CurID)
{
NotesForm.operate.value=flag;
NotesForm.ID.value=CurID;
document.NotesForm.action="<%=contextpath%>/servlet/NoteManageOperServlet";
document.NotesForm.submit();
}
function alertUser()
{
if(<%=islarge%>==1)
{
alert("附件大小超出限制!");
}
}
function selectUnit() {
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/msgnote/noteRangeTree.jsp?rootorgid=<%=rootorgid%>&isAudit=<%=isAudit%>&isState=<%=isState%>";
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择发布范围","width="+wx+",height="+wy+",scrollbars=no,status=no"+wposition);
}
</SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<body bgcolor="#FFFFFF" text="#000000" background="<%=request.getContextPath()%>/images/grid.gif" leftmargin="0" topmargin="10" onLoad="javascript:alertUser()">
<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="<%=vo.getNoteId()%>">
<input type="hidden" name="attachnum" value="<%=number%>">
<input type="hidden" name="attnum" value="<%=attatchnum%>">
<input type="hidden" name="currentattnum" value="<%=curattnum%>">
<input type="hidden" name="filesnumber" value="">
<input type="hidden" name="delattid" value="">
<input type="hidden" name="deletenum" >
<input type="hidden" name="noteTitle1" value="<%=arg_noteTitle%>">
<input type="hidden" name="sendPerson1" value="<%=arg_sendPerson%>">
<input type="hidden" name="sendUnit1" value="<%=arg_sendUnit%>">
<input type="hidden" name="status1" value="<%=arg_status%>">
<input type="hidden" name="impdegree1" 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 sendOrgId=StringUtility.filterNullObject(vo.getSendOrgId());
String sendOrgName=StringUtility.filterNullObject(vo.getSendOrgName());
%>
<input name="orgid" type="hidden" value="<%=sendOrgId%>">
<table width="500" border="0" align="center"><tr bgcolor="#EEF4FF"><td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolordark="#DFDFFF" bordercolorlight="#003366" bgcolor="#6699CC"
>
<tr bgcolor="#a6d0f2" height="25">
<td <%if(CommonUtil.Is1tN().equals("1")){%>colspan="4"<%}else{%>colspan="2"<%}%> align="center">
公告内容
</td>
</tr>
<tr bgcolor="#EEF4FF">
<td align="center">标题</td>
<td <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="left"><div align="left">
<input name="noteTitle" type="text" size="45" <%if(!argnoteTitle.equals("")){%>value="<%=argnoteTitle%>"<%}else{%>value="<%=CommonUtil.formathtm(noteTitle)%>"<%}%> maxlength="50">
</div></td>
</tr>
<tr bgcolor="#EEF4FF">
<td width="22%"><div align="center">重要程度</div></td>
<td align="left" width="33%"><div align="left">
<%
String imp = "";
if(argimpdegree.equals(""))
{
if(impdegree.equals("0"))
imp = "0";
if(impdegree.equals("1"))
imp = "1";
}
else
{
if(argimpdegree.equals("0"))
imp = "0";
if(argimpdegree.equals("1"))
imp = "1";
}
%>
<select name="impdegree">
<option value="0" <%if(imp.equals("0")){%>selected<%}%>>一般</option>
<option value="1" <%if(imp.equals("1")){%>selected<%}%>>紧急</option>
</select>
</div></td>
<%if(CommonUtil.Is1tN().equals("1")){%>
<td width="22%"><div align="center">发布范围</div></td>
<td align="left" width="23%"><input type="text" name="orgname" id="orgname" readonly="" <%if(ext1 != null){%>value=<%=sendOrgName%><%}%>><img src="<%=request.getContextPath()%>/images/icon-15.gif" name="unit" width="22" height="15" class="bt1" style="cursor:hand;" onClick="selectUnit()"></td>
<%}%>
</tr>
<tr bgcolor="#EEF4FF">
<td><div align="center">有效期</div></td>
<td <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="left"><input name="validDate" type="text" size="10" <%if(!argdate.equals("")){%>value="<%=argdate%>"<%}else{%>value="<%=validDate%>"<%}%> readonly>
<img src="<%=contextpath%>/images/calendar.gif" onClick="popUpCalendarDlg('<%=request.getContextPath()%>',validDate);"
style="cursor:hand"></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"><div align="left">
<textarea name="noteBody" class="txt1" cols="40" rows="16" wrap="PHYSICAL"><%if(!argnoteBody.equals("")){%><%=argnoteBody%><%}else{%><%=noteBody%><%}%></textarea>
</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" valign="bottom"><div align="center">附件<%=num%></div></td>
<td height="27" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="center" valign="bottom">
<table width="100%" border="0">
<tr bgcolor="#EEF4FF">
<td align="center">
<a href="javascript:openatt('openatt','<%=fileId%>')">
<%if(fileName.equals("")){%>无标题<%}else{%><%=fileName%><%}%>
</a>
</td>
<td align="right">
<img src="<%=contextpath%>/images/delete.gif" style="cursor: hand" onclick="javascript:del('delete','<%=noteId%>','<%=fileId%>')">
</td>
</tr>
</table>
</tr>
<%
}
for(int j = 0; j < attatchnum; j++)
{
%>
<tr bgcolor="#EEF4FF" id="file<%=j%>" style="display:none">
<td height="27"><div align="center">附件</div></td>
<td height="27" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="3"<%}%> align="center">
<table border="0" width="100%">
<tr bgcolor="#EEF4FF">
<td id="fileTD<%=j%>"><input name="uploadfile<%=(curattnum+j)%>" type="file"></td>
<td align="right">
<img src="<%=contextpath%>/images/delete.gif" style="cursor: hand" onclick="javascript:delatt('file<%=j%>','<%=j%>')">
</td>
</tr>
</table>
</td>
</tr>
<%
}
%>
<tr bgcolor="#EEF4FF" id="display">
<td height="27" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="4"<%}else{%>colspan="2"<%}%>>
<div align="center">
<img src="<%=request.getContextPath()%>/images/buttons/attachmentadd.gif" style="cursor: hand" onClick="addatt(this)">
</div></td>
</tr>
<tr bgcolor="#EEF4FF" valign="bottom" id="display2" >
<td height="27" <%if(CommonUtil.Is1tN().equals("1")){%>colspan="4"<%}else{%>colspan="2"<%}%> align="center">
<font color="#0000FF">最多能添加<%=String.valueOf(CommonUtil.getAttachNum())%>个附件,每个附件最大为<%=attsize%>M</font>
</td>
</tr>
</table>
</td></tr></table>
<br>
<br>
<center>
<%if(right.equals("1")){%>
<img style="CURSOR: hand" onClick='updatedraft("updatedraft","<%=noteId%>")' src="<%=contextpath%>/images/save.gif" border=0>
<img style="CURSOR: hand" onClick='opencommit("opencommit","<%=noteId%>")' src="<%=contextpath%>/images/send.gif" border=0>
<%}else{%>
<img style="CURSOR: hand" onClick='opencommit("opencommit","<%=noteId%>")' src="<%=contextpath%>/images/send.gif" border=0>
<%}%>
<img style="CURSOR: hand" onClick=javascript:_BackTo() src="<%=contextpath%>/images/return.gif" border=0>
</center>
</form>
<script>
//fileChange();
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?