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

📄 message_edit.jsp

📁 在系统开发过程中用到了javabean和jsp技术
💻 JSP
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString"%>
<%
oa.bean.SmsBean myBean = null;
try{
	myBean = new oa.bean.SmsBean();
	DealString ds = new DealString();
	//取得菜单类别
	String strType = ds.toString((String)request.getParameter("txt_type"));
	//职工编号
	String strPersonNo = ds.toString((String)request.getParameter("txt_personno"));
	//if(strPersonNo.equals(""))
	{
		strPersonNo = (String)session.getAttribute("zgbh");
	}
	//增删改类型
	String strEdit = ds.toString((String)request.getParameter("txt_edit"));

	//编号
	String strRCXH = ds.toString((String)request.getParameter("txt_rcxh"));
 	String id = "";
	String sender = "";
	String receiver = "";
	String receivername = "";
	String title = "";
	String content = "";
	String sendtime = "";
	String isread = "";
	String strReceiver = ds.toGBK((String)request.getParameter("txt_receiver"));
	if(strReceiver!=null&&!strReceiver.equals("")){
		String[] strReceivers =strReceiver.split(";");		
		for(int i=0; i < strReceivers.length; i++){
			  String[] str=strReceivers[i].split(",");
		//	  out.print(str[1]+",");
			  receiver += str[0] +",";
			  receivername += str[1] +",";
		}//end for
		receiver=receiver.substring(0,receiver.length()-1);
		receivername=receivername.substring(0,receivername.length()-1);
	}
	String t = "拟写短消息";
	String b = "发送";
	if(strEdit.equals("4"))//修改短消息
	{
		Hashtable hash = myBean.getOneData(strRCXH);
		id = (String)hash.get("ID");
		sender = (String)hash.get("SENDER");
		receiver = (String)hash.get("RECEIVER");
		receivername = (String)hash.get("RECEIVERname");
		title = (String)hash.get("TITLE");
		content = (String)hash.get("CONTENT");
		sendtime = (String)hash.get("SENDTIME");
		isread = (String)hash.get("ISREAD");

		t = "修改短消息";
		b = "重新" + b;
	}
%>
<br><br>

<TABLE WIDTH="100%" BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=center bgcolor="#ffffff">
  <col width="55%"><col width="45%">
  <TR CLASS=p9 valign=middle>
    <TD ALIGN=center BGCOLOR=#006600 nowrap height=25>
      <FONT COLOR=#ffffff ><%=t%></FONT>
    </TD>
  </TR>
</TABLE>
<input type="hidden" size="32" value="<%=receiver%>" name="txt_receiver" class=txtframe>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=3 ALIGN=center style="table-layout:fixed;word-break:break-all">
  <tr align=center height=22  bgcolor="#EBFFD0">
    <td width="20%" align=right>发送给:&nbsp;&nbsp;</td>
	<td width="80%" align=left>&nbsp;<input type="text" size="46" value="<%=receivername%>" readonly name="txt_receivername" class=txtframe>
	<%if(!strEdit.equals("4")){%>
	<input type="button" value="从组织机构" onmouseover="msover();" onmouseout="msout();" onclick="openWns('../organization/departBrower.jsp?','选择人员')">
	<input type="button" value="从群组"     onmouseover="msover();" onmouseout="msout();" onclick="openWns('../person/personGroupBrower.jsp?ZGBHs='+document.all.txt_receiver.value,'选择人员')">
	<%}%>
	</td>
	<td></td>
  </tr>
  <tr align=center height=22  bgcolor="#EBFFD0">
    <td align=right>消息标题:</td>
	<td align=left>&nbsp;<input type="text" maxlength=50 size="59" value="<%=title%>" name="txt_title" class=txtframe>(最大长度50)</td>
	<td align=left></td>
  </tr>

  <tr align=center  bgcolor="#EBFFD0">
    <td align=right>消息内容:</td>
	<td align=left>&nbsp;<textarea name="txt_content" cols="69" rows="15" maxlength=200 onchange="return temp();"><%=content%></textarea>
	<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(最大长度200字)</td>
	<td></td>
  </tr>
  <tr bgColor="#006600" height="22">
	<td colspan=3 align=center>
			<input type="button" value="<%=b%>" onmouseover="msover();" onmouseout="msout();" onclick="return toServlet1('rr')">
			&nbsp;			
			<input type="button" value="返回" onmouseover="msover();" onmouseout="msout();"onclick="javascript:history.back();">
		 </td>
	</tr>
</TABLE>


<script>
	function toServlet1(rcxh)
	{
		if(document.all.txt_content.value.length>200)
		{
			alert("超出最大范围!");
		}
		else if(document.all.txt_receivername.value=="")
		{	alert("fff");
			alert("发送人不能为空!"); 
		}
		else if(document.all.txt_title.value=="")
		{	
			alert("消息标题不能为空!"); 
		}
		else if(document.all.txt_content.value=="")
		{
			alert("消息内容不能为空!"); 
		}
		else
		{
			document.all.txt_type.value = "5"; //我的短消息
			//document.all.txt_edit.value = "2"; 
			//document.all.txt_rcxh.value = rcxh;
			document.all.form1.action="../../PerSvlt";
			document.all.form1.submit();
		}
	}

	function onButton_OK(oList){
	    var strNames="";
		var strValues="";
		for(var i=0;i<oList.length;i++){
			strNames+=oList.options[i].text;
			strNames+=",";
			strValues+=oList.options[i].value;
			strValues+=";";
		}
		document.all.txt_receiver.value = strValues;
		document.all.form1.submit();
	}

	function temp()
	{

		var leng = document.all.txt_content.value.length;
		if(leng>200)
		{
			alert("超出最大范围!");
			return false;
		}
		return true;
	}
	function openWns(url,name){
	var hWnd=window.open(url,name,'left=100,top=50,width=460,height=490');
	hWnd.focus();
}
</script>
<%}finally{
	if(myBean!=null)myBean.closeConn();
}%>

⌨️ 快捷键说明

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