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

📄 modifyuserstep1.jsp

📁 设备管理系统 包括设备管理
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="../incoming/Common.jsp"%>
<%@ include file="../Check.jsp"%>
<%
	Integer pwdlenmax,pwdlenmin,pwdfrminnum,pwdfrminapha,pwdfrminspchar;

 	SysConfig sysconfig = SysConfig.FindByName("PwdLenMax");
	pwdlenmax = Integer.valueOf(sysconfig.getSCValue());
	

 	sysconfig = SysConfig.FindByName("PwdLenMin");
	pwdlenmin = Integer.valueOf(sysconfig.getSCValue());
	
 	sysconfig = SysConfig.FindByName("PwdFRMinNum");
	pwdfrminnum = Integer.valueOf(sysconfig.getSCValue());
	
 	sysconfig = SysConfig.FindByName("PwdFRMinApha");
	pwdfrminapha = Integer.valueOf(sysconfig.getSCValue());
	
 	sysconfig = SysConfig.FindByName("PwdFRMinSpChar");
	pwdfrminspchar = Integer.valueOf(sysconfig.getSCValue());
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<title><%=title%></title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../css/calendar-win2k-1.css" type="text/css" media="screen">
<script type="text/javascript" src="../js/calendar.js"></script>
<script type="text/javascript" src="../js/calendar-en.js"></script>
<script type="text/javascript" src="../js/calendar-setup.js"></script>
<script language="javascript">
function compareDate(DateOne,DateTwo)
{
	var OneMonth = DateOne.substring(5,DateOne.lastIndexOf ("-"));
	var OneDay = DateOne.substring(DateOne.length,DateOne.lastIndexOf ("-")+1);
	var OneYear = DateOne.substring(0,DateOne.indexOf ("-"));
	
	var TwoMonth = DateTwo.substring(5,DateTwo.lastIndexOf ("-"));
	var TwoDay = DateTwo.substring(DateTwo.length,DateTwo.lastIndexOf ("-")+1);
	var TwoYear = DateTwo.substring(0,DateTwo.indexOf ("-"));
	
	if (Date.parse(OneMonth+"/"+OneDay+"/"+OneYear) >
	Date.parse(TwoMonth+"/"+TwoDay+"/"+TwoYear))
	{
	return true;
	}
	else
	{
	return false;
	}
}

function check_input(theForm)
{
 if (compareDate(theForm.effectivedate.value,theForm.expirydate.value))
  {
    alert("生效日期应在过期日期之前.");
    theForm.expirydate.focus();
    return (false);
  }

  if (theForm.fullname.value == "")
  {
    alert("请输入姓名.");
    theForm.fullname.focus();
    return (false);
  }
  
  if (theForm.deptname.value == "")
  {
    alert("请输入所属部门.");
    theForm.deptname.focus();
    return (false);
  }

}
</script>
</head>
<body>
<%@ include file="UserHeader.jsp"%>
<%
		String username = new String(request.getParameter("username").getBytes("ISO8859_1"),"GBK");
		User user = User .FindByName(username);
	%>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="100" valign="top" background="../images/in_left_bg.gif"><%@ include file="SetupLeft.jsp"%></td>
    <td width="800" align="center" valign="top">
	<form name="form1" method="post" action="ModifyUserStep2.jsp" onsubmit="return check_input(this)">
	<p align="center" class="title2">修改系统用户</p>
    <table width="553" height="227" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC">
      <tr>
        <td width="145" height="33"><div align="right">用户名:</div></td>
        <td width="390"><input name="username" type="text"  class="data" id="username2" value="<%=user.getUserName()%>" size="25" maxlength="16" readonly="true">
      *</td>
      </tr>
      <tr>
        <td height="29"><div align="right">生效日期: </div></td>
        <td><input type="text"  class="data" name="effectivedate" size="20" value="<%=user.getEffectiveDate()%>" id="effectivedate"  readonly="true">
            <input name="effd" type="button" id="effd" value="…">
      *</td>
      </tr> 
      <tr>
        <td height="29"><div align="right">过期日期: </div></td>
        <td><input type="text"  class="data" name="expirydate" size="20" value="<%=user.getExpiryDate()%>" id="expirydate"  readonly="true">
            <input name="epyd" type="button" id="epyd" value="…">
      *</td>
      </tr>
      <tr>
        <td height="33"><div align="right">姓名: </div></td>
        <td height="33"><input name="fullname" type="text"  class="data" id="username" value="<%=user.getFullName()%>" size="20" maxlength="10" >
      * </td>
      </tr>
      <tr>
        <td height="33"><div align="right">所属部门: </div></td>
        <td height="33"><input name="deptname" type="text"  class="data" id="deptname" value="<%=user.getDeptName()%>" size="30" maxlength="20" >
      * </td>
      </tr>
      <tr>
        <td height="68" colspan="2"><div align="center">
            <input type="submit" name="Submit" value="修改">
            <input type="reset" name="Submit2" value="取消">
        </div></td>
      </tr>
    </table>
	</form></td>
  </tr>
</table>
<%@ include file="UserFooter.jsp"%>	
<script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "effectivedate",         // ID of the input field
      ifFormat    : "%Y-%m-%d",    // the date format
      button      : "effd"       // ID of the button
    }
  );
  Calendar.setup(
    {
      inputField  : "expirydate",         // ID of the input field
      ifFormat    : "%Y-%m-%d",    // the date format
      button      : "epyd"       // ID of the button
    }
  );
</script>
</body>
</html>

⌨️ 快捷键说明

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