msgforword.jsp
来自「java jsp教程」· JSP 代码 · 共 270 行
JSP
270 行
<!--\webapps\jsp\msgforword.jsp by wuwf-->
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page import="com.icss.cnpc.msgnote.vo.*"%>
<%@ page import="com.icss.cnpc.msgnote.vo.TmsgbodyVO"%>
<%@ page import="com.icss.cnpc.msgnote.util.*"%>
<%@ page import="com.icss.resourceone.sdk.configuration.ConfigManager"%>
<%@ page import="com.icss.resourceone.sdk.configuration.Parameter"%>
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<%
TmsgbodyVO msgbodyVO = (TmsgbodyVO)request.getAttribute("list");
List filelist = (List)request.getAttribute("filelist");
String title = msgbodyVO.getMsgTitle() +"[转发]";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=GBK">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/style.css" type="text/css">
<script language="JavaScript" src="<%=request.getContextPath()%>/include/common.js"></script>
<script language="JavaScript">
function opernNewWind(){
document.MsgForm.action="<%=request.getContextPath()%>/Msg_SelectOrg.jsp";
document.MsgForm.submit();
}
function _CheckForm()
{
if(document.MsgForm.receiverName.value==""){
alert("请选择接收人!");
return false;
}
if(document.MsgForm.msg_title.value==""){
alert("请填写消息标题!");
return false;
document.MsgForm.msg_title.focus;
}
if(document.MsgForm.msg_body.value==""){
alert("请填写消息内容!");
document.MsgForm.msg_body.focus;
return false
}
return true
}
function _save()
{
if(!_CheckForm()){
return false
}
var sform = document.MsgForm;
var filesnum=0;
for(var ii=0;ii<sform.length;ii++){
if(sform.elements[ii].type == "file")
filesnum++;
}
document.MsgForm.filesnumber.value = filesnum;
document.MsgForm.operate.value = "save";
document.MsgForm.action="<%=request.getContextPath()%>/servlet/MsgAddServlet";
document.MsgForm.submit();
}
function _forword()
{
if(!_CheckForm()){
return false
}
var sform = document.MsgForm;
var filesnum=0;
for(var ii=0;ii<sform.length;ii++){
if(sform.elements[ii].type == "file")
filesnum++;
}
document.MsgForm.filesnumber.value = filesnum;
document.MsgForm.action="<%=request.getContextPath()%>/servlet/MsgForwordOperateServlet";
document.MsgForm.submit();
}
function _Reset()
{
document.MsgForm.msg_title.value="";
document.MsgForm.msg_body.value="";
document.MsgForm.msg_title.focus;
}
function _BackTo()
{
history.back();
}
function oper()
{
// window.open("fetchaddress.htm","","toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=440,height=150,top=100,left=200");
// var url= "/cgi-bin/addressbook?uid=zhlzsl&ace=list&fid=1120280418";
window.open("fetchaddress.htm","adda","width=440,height=400,top=100,left=100,location=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");
}
var xyz = 0;
var files = new Array();
function add_file()
{
if(files.length > 9){
alert("附件最多不超过10个!");
return false;
}
var _index = files.length;
var str = "<p><input type=\"file\" name=\"uploadfile_" + xyz + "\">";
files[files.length] = str;
var tmp = "";
for(var i=0; i<files.length; i++)
{
tmp += files[i];
}
ADIV.innerHTML = tmp;
}
function delFile()
{
var str = "";
var tmp = new Array(files.length - 1);
for(var i=0; i<tmp.length; i++)
{
tmp[i] = files[i];
str += tmp[i];
}
files = tmp;
ADIV.innerHTML = str;
}
function _getAddrBook(){
var a = new Object();
a.titleDesc = "从地址簿选择";
a.receiverCode = document.MsgForm.receiverCode.value;
a.receiverName = document.MsgForm.receiverName.value;
var b = showModalDialog("<%=request.getContextPath()%>/servlet/ShowAddrBookServlet",a,"dialogWidth:800px;dialogHeight:600px;status:0;");
if (b != null)
{
document.MsgForm.receiverCode.value = b.receiverCode;
document.MsgForm.receiverName.value = b.receiverName;
}
}
function _return(){
var showmsgid = document.MsgForm.msgid.value;
var showflag = "receivebox";
window.location="<%=request.getContextPath()%>/servlet/MsgShowServlet?showmsgid="+showmsgid+"&showflag=receivebox";
//document.MsgForm.submit();
//window.history.back();
//window.history.go(-1);
}
function _download(id)
{
var fileid = id;
document.MsgForm.fileid.value=id;
window.top.leftFrame.location="<%=request.getContextPath()%>/servlet/MsgDownloadServlet?fileid="+fileid;
//document.MsgForm.submit();
}
</script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/style.css" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: medium}
.style2 {color: #FFFFFF}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="<%=request.getContextPath()%>/images/grid.gif" leftmargin="0" topmargin="10">
<form Name="MsgForm" method="Post" enctype="multipart/form-data">
<input type="hidden" name="repersonid" value="<%=msgbodyVO.getMsgSenderid()%>">
<input type="hidden" name="filesnumber" value="">
<input type="hidden" name="fileid" >
<input type="hidden" name="isback" value="isback" >
<input type="hidden" name="receiverCode" value="">
<input type="hidden" name="showflag" value="receivebox">
<input type="hidden" name="msgid" value="<%=msgbodyVO.getMsgId()%>">
<input type="hidden" name="showmsgid" value="<%=msgbodyVO.getMsgId()%>">
<input type="hidden" name="reperson" value="<%=msgbodyVO.getMsgSendername()%>">
<br>
<table width="590" border="0" align="center" cellpadding="2" cellspacing="1" bordercolorlight="#003366" bordercolordark="#DFDFFF" bgcolor="#426199">
<tr>
<td height="24" align="center" bgcolor="#A6D0F2" colspan="2">输入您的通知内容</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="EEF4FF">
<td width="22%" height="25" align="right">接收单位/个人</td>
<td align="left" width="78%" ><input type="text" name="receiverName" value="" size="50" readonly >
<img src="<%=request.getContextPath()%>/images/select.gif" style="cursor: hand" onClick="_getAddrBook()">
</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="EEF4FF" onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';">
<td width="22%" height="25" align="right">标题</td>
<td align="left" valign="top" bordercolor="#FFFFFF">
<input name="msg_title" type="text" class="txt1" size="50" value="<%=CommonUtil.formathtm(title)%>" maxlength="64"
>
*</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="EEF4FF" onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';">
<td width="22%" height="25" bordercolor="EEF4FF" bgcolor="EEF4FF">
<div align="right">重要程度</div> </td>
<td align="left" valign="top" bordercolor="#FFFFFF">
<select name="impselect" class="slect1">
<option value="1" <%if(msgbodyVO.getImpdegree().equalsIgnoreCase("1")){%>selected<%}%>>一般</option>
<option value="5" <%if(msgbodyVO.getImpdegree().equalsIgnoreCase("5")){%>selected<%}%>>紧急</option>
</select>
</td>
</tr>
<tr bordercolor="#FFFFFF" bgcolor="EEF4FF" onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';">
<td width="22%" height="176" bordercolor="EEF4FF" bgcolor="EEF4FF">
<p align="right" class="style1">内</p>
<p align="right" class="style1">容</p></td>
<td align="left" valign="top" bordercolor="#FFFFFF" height="176">
<h6><textarea name="msg_body" cols="55" rows="12" wrap="PHYSICAL" class="txt2" value="" maxlength = "999"><%=msgbodyVO.getMsgBody()%></textarea></h6>
</td>
</tr>
<%int j=1;
for(Iterator i = filelist.iterator();i.hasNext();){
TattachNoBlobVO vo = (TattachNoBlobVO)i.next();
%>
<tr bordercolor="#FFFFFF" bgcolor="EEF4FF" onMouseOver="this.bgColor='#EBEBEB';" onMouseOut="this.bgColor='#EEF4FF';">
<td width="16%" height="31" align="center" valign="middle" bordercolor="EEF4FF" bgcolor="EEF4FF">附件<%=j%></td>
<td width="16%" height="31" align="left" valign="middle" bordercolor="EEF4FF" bgcolor="EEF4FF"><a href="#" onclick="javascript:_download('<%=vo.getAttachmentno()%>')"><%=vo.getAttachmentname()%></a></td>
<%
j++;}%>
</tr>
</table>
<br>
<center>
<img style="CURSOR: hand" onClick="javascript:_forword()" src="../images/zhuanfa.gif" border=0>
<img style="CURSOR: hand" onclick="window.history.go(-1)" src="../images/return.gif" border=0>
</center>
<p> </p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?