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

📄 address_employe_modify.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page import="com.vnex.intranet.commoninfo.addresslist.value.*"%>
<%@ page import="com.vnex.intranet.commoninfo.addresslist.proxy.*"%>
<%@ page import="com.vnex.intranet.util.*"%>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<jsp:useBean id="addressListProxy" class="com.vnex.intranet.commoninfo.addresslist.proxy.AddressListProxyBean" scope="application" />

<%
  int employeId = 0;
  if(request.getParameter("employeIds")!=null && !request.getParameter("employeIds").equals(""))
    employeId = Integer.parseInt(request.getParameter("employeIds"));
  AddressListValueBean companyBean = (AddressListValueBean) session.getAttribute("companyBean");
  //session.removeAttribute("companyBean");
  AddressEmployeValueBean employeBean = companyBean.getEmploye(employeId);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<jsp:include page="/vnex/page/FORM_HEAD.jsp" />

</HEAD>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">

<script language="javascript" src="/vnex/validate.js" ></script>
<script language=JavaScript>
function isDigit (c)
{   
  return ((c >= "0") && (c <= "9"))
}
function isInteger (s)
{   
    var i;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        if (!isDigit(c)) return false;
    }
    return true;
}
function isValidChar(str)
{
  var i,j,strTemp;
  strTemp="<>/\\";
  for (i=0;i<str.length;i++)
  {
    j=strTemp.indexOf(str.charAt(i));	
    if (j!=-1)
    {
      return false;
    }
  }
  return true;
}
function isValidChar2(str)
{
  var i,j,strTemp;
  strTemp="\'";
  for (i=0;i<str.length;i++)
  {
    j=strTemp.indexOf(str.charAt(i));	
    if (j!=-1)
    {
      return false;
    }
  }
  return true;
}
function check()
{
  if (!stripWhitespace(document.myform.employeName.value) || document.myform.employeName.value=="" || document.myform.employeName.value.length>50)
		{
		  alert("职工姓名不能为空,并且少于50个字。");
		  document.myform.employeName.focus();
		  return false;
		}
		if (document.myform.employeDepartment.value.length>50)
		{
		  alert("部门应少于50个字。");
		  document.myform.employeDepartment.focus();
		  return false;
		}
		if (!isValidChar2(document.myform.employeDepartment.value))
		{
		  alert("部门不应该包含 \' (单引号)特殊字符。");
		  document.myform.employeDepartment.focus();
		  return false;
		}
		if (document.myform.employeDuty.value.length>50)
		{
		  alert("职务应少于50个字。");
		  document.myform.employeDuty.focus();
		  return false;
		}
		if (document.myform.employeExtension.value.length>10 || !isInteger(document.myform.employeExtension.value))
		{
		  alert("分机应是少于10位的数字。");
		  document.myform.employeExtension.focus();
		  return false;
		}
		if (document.myform.employePager.value.length>20)
		{
		  alert("呼机应少于20位。");
		  document.myform.employePager.focus();
		  return false;
		}
		if (document.myform.employeHandset.value.length>20)
		{
		  alert("手机应少于20位。");
		  document.myform.employeHandset.focus();
		  return false;
		}
		if (document.myform.employeOffice.value.length>50)
		{
		  alert("办公室应少于50个字。");
		  document.myform.employeOffice.focus();
		  return false;
		}
		if(document.myform.employeEmail.value.length!=0)
		{
    if (document.myform.employeEmail.value.length<6 || document.myform.employeEmail.value.indexOf('@', 0) == -1 || document.myform.employeEmail.value.indexOf('.', 0) == -1)
    {
      alert("Email格式不对。");
      document.myform.employeEmail.focus();
      return false;
    }
  }
  if(!isValidChar(myform.employeName.value) || !isValidChar(myform.employeDepartment.value) || !isValidChar(myform.employeDuty.value) 
     || !isValidChar(myform.employePager.value) || !isValidChar(myform.employeHandset.value) || !isValidChar(myform.employeOffice.value) || !isValidChar(myform.employeEmail.value))
  {
    alert("输入内容不能包括 < > / \\ 这些特殊字符。");
    return false;
  }
  return true;
}

function modifyEmploye()
{
	 if( !check() )
	 {
	   return false;
	 }
	 myform.action= "/mainctrl/commoninfo/addresslist/modifyAddressEmployeSuccess?back=ok";
  myform.submit();
}

function removeEmploye()
{
  if(!confirm("是否确定删除?"))
  {
    return false;
  }
	 myform.action= "/mainctrl/commoninfo/addresslist/removeAddressEmployeSuccess";
  myform.submit();
}
</script>
<script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
<script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
<DIV align=center>
  <form name="myform" method="post" action="">
    <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
    <TBODY> 
    <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
    <TR> 
        <TD colSpan=3 align="center"><br>
          <!--个人信息开始 -->
          <table width="600" border="1" cellspacing="1" bordercolor="#666666">
            <tr bgcolor="#fafafa">
              <td> 
                <table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#666666">
                  <tr>
                    <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href="/mainctrl/commoninfo/addresslist/getAddressList"><font color="#FFFFFF">外部通讯录</font></a>&gt;&gt;修改公司职员</font></td>
                  </tr>
                </table>
                <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
                  <tr bgcolor="#fafafa"> 
                    <td width="17%"> <font class="strong">&nbsp;姓名: </font> </td>
                    <td width="83%"> 
                      <input type="text" size="24" name="employeName" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployeName())%>">
                      &nbsp;*&nbsp;(注:带*为必填内容) </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td> <font class="strong">&nbsp;部门:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employeDepartment" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployeDepartment())%>">
                    </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td> <font class="strong">&nbsp;职务:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employeDuty" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployeDuty())%>">
                    </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td> <font  class="strong">&nbsp;分机:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employeExtension" class="file" value="<% if(employeBean.getEmployeExtension()!=0) out.println(employeBean.getEmployeExtension()); %>">
                    </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td> <font  class="strong">&nbsp;呼机:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employePager" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployePager())%>">
                    </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td> <font  class="strong">&nbsp;手机:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employeHandset" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployeHandset())%>">
                    </td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td> <font  class="strong">&nbsp;办公室:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employeOffice" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployeOffice())%>">
                    </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td> <font  class="strong">&nbsp;Email:</font> </td>
                    <td> 
                      <input type="text" size="24" name="employeEmail" maxlength="50" class="file" value="<%= FieldUtil.filterQuotTag(employeBean.getEmployeEmail())%>">
                    </td>
                  <input type="hidden" name="employeIds" value="<%= employeId%>">
                  <input type="hidden" name="companyId" value="<%= employeBean.getCompanyId()%>">
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td colspan="2" height="30"> 
                      <div align="center"> 
                        <input type="button" name="Submit" value="保存" class="text" onClick="return modifyEmploye()">
                        &nbsp;&nbsp;
                        <input type="button" name="Submit4" value="删除" class="text" onClick="return removeEmploye()">
                        &nbsp;&nbsp;
                        <input type="reset" name="Submit3" value="重置" class="text" >
                        &nbsp;&nbsp;
                        <input type="button" name="Submit2" value="放弃" class="text" onClick="history.back()">
                      </div>
<%
  out.println("<input type=hidden name=ssDepartment value=\""+request.getParameter("ssDepartment")+"\">");
  out.println("<input type=hidden name=ssEmployeName value=\""+request.getParameter("ssEmployeName")+"\">");
  out.println("<input type=hidden name=start value=\""+request.getParameter("start")+"\">");
%>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
          <br>
          <br>
          <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
       </TD>
    </TR>
    <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
    </TBODY> 
  </TABLE>
  <BR>
  <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
	</form></DIV>
</BODY></HTML>

⌨️ 快捷键说明

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