?? message_edit.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>發送給: </td>
<td width="80%" align=left> <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> <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> <textarea name="txt_content" cols="69" rows="15" maxlength=200 onchange="return temp();"><%=content%></textarea>
<br>
(最大長度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')">
<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 + -