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

📄 xt_user_update_form.jsp

📁 downloadsoftware.jsp downloadstyle.css download estdate.jsp download密码.txt downloadadmin
💻 JSP
字号:

<!--
  郑兴燕
  2005-1-3 14:08
  加入finally
-->
<%@ page contentType="text/html; charset=GBK"
 import="javax.naming.*,java.sql.*,java.util.*,javax.sql.DataSource,java.io.*" %>
<html>
<head>
<title>ZD-OA</title>
<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, must-revalidate">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT"><link rel="stylesheet" href="../../images/style.css" type="text/css">
</head>
<BODY text=black vLink=#333333 aLink=#336699 link=#000000 bgColor=#dddddd>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0 
valign="Top">
  <TBODY>
  <TR>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD width=25 background=../../images/topleft.gif height=45><IMG 
            height=45 src="../../images/blank.gif" width=25></TD>
          <TD vAlign=center align=left width="100%" 
          background=../../images/topback.gif>
            <TABLE cellSpacing=2 cellPadding=0 width="100%">
              <TBODY>
              <TR>
                <TD colSpan=2 height=2></TD></TR>
              <TR>
                <TD noWrap align=left 
background="">&nbsp;<B>修改个人信息</B></TD>
                <TD align=right><A 
                  onmouseover="window.status='显示帮助'; return true;" 
                  onclick="window.open('../user/help_index.cfm?ContentID=0','help','width=600,height=400');" 
                  onmouseout="window.status=''; return true;" 
                  href="#"><IMG 
                  height=16 alt=帮助 src="../../images/help2.gif" width=16 
                  border=0></A> </TD></TR>
              <TR>
                <TD noWrap align=left background="" 
              colSpan=2>&nbsp;</TD></TR></TBODY></TABLE></TD>
          <TD vAlign=top align=middle width=27 
          background=../../images/topright.gif height=45>
            <TABLE cellSpacing=0 cellPadding=0 background="" border=0>
              <TBODY>
              <TR>
                <TD><IMG height=6 src="../../images/blank.gif" width=27 
                  border=0></TD></TR>
              <TR>
                <TD align=middle>&nbsp; 
      </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD width=15 background=../../images/left.gif><IMG 
            src="../../images/blank.gif" width=15></TD>
          <TD class=content>&nbsp;</TD>
          <TD class=content vAlign=top align=middle width="100%">
<% 

    String username=(String)session.getValue("originalusername");

    Connection connection=null;
	Statement statement=null;
	String u1=null,u2=null,u3=null,u4=null,u5=null,u6=null,juese=null,deptid=null,zw=null;
try{
     String dataSourceName="zdsoft";
     Context initialContext=null;
     Hashtable env=new Hashtable();
     initialContext=new javax.naming.InitialContext(env);
     DataSource dataSource=(DataSource)initialContext.lookup(dataSourceName);
     connection=dataSource.getConnection();
    statement=connection.createStatement();
    String sqls= "SELECT xt_user.userid as userid,xt_user.usercopy as usercopy,xt_user.passwd as passwd,xt_user.gwpassword as gwpassword,nvl(xt_user.lxcall,' ') as lxcall,xt_user.memo as memo,xt_user.zwwork as zwwork,xt_type.name as typename,xt_dept.name as deptname FROM xt_user,xt_type,xt_dept WHERE xt_user.typeid=xt_type.typeid and xt_user.deptid=xt_dept.deptid and xt_user.userid='"+username+"'";
    ResultSet columns=statement.executeQuery(sqls);
   
  while(columns.next()){
   u1=columns.getString("userid");   //用户登录名,不允许修改
   if(u1==null)u1="";
   u2=columns.getString("usercopy"); //用户别名
   if(u2==null)u2="";
   u3=columns.getString("passwd");   //密码
   if(u3==null)u3="";
   u4=columns.getString("gwpassword"); //公文处理密码
   if(u4==null)u4="";
   u5=columns.getString("lxcall");     //联系方式
   if(u5==null)u5="";
   u6=columns.getString("memo");       //备注
   if(u6==null) u6="";
   juese=columns.getString("typename");  //角色名
   if(juese==null)juese="";
   deptid=columns.getString("deptname"); //部门
   if(deptid==null)deptid="";
   zw=columns.getString("zwwork");     //职务
   if(zw==null)zw="";
  }
   
  }
  catch(SQLException e)
	  {out.println("连接数据库失败");}
  finally
	  {
     statement.close();
     connection.close();
	  
      }
%>
  
		  <table id=t1 width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
  <!--  <td align="center" class="borderon"><B>信息修改框<B></td> -->
  </tr>
</table> 
		  <div  style="position:relative; width:100%; z-index:1; left: 0px; top: 0px; overflow: auto">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <form name="form1" method="get" action="xt_user_update.jsp">
      <tr> 
    
      <tr> 
        <td width="20%">用户登录名</td>
              <td width="80%"> <input type="text" name="namedl" class="Contrast" value="<%=u1%>" size="16" readonly> 
        </td>
      </tr>
      <tr> 
        <td width="20%">角色</td>
        <td width="80%"> <input type="text" name="juese" value="<%=juese%>" class="Contrast" size="16" readonly> 
        </td>
      </tr>
      <tr> 
        <td width="20%">部门</td>
        <td width="80%"> <input type="text" name="deptid" value="<%=deptid%>" class="Contrast" size="16" readonly> 
        </td>
      </tr>
      <tr>
        <td width="20%">职务</td>
        <td width="80%"> <input type="text" name="zw" value="<%=zw%>" class="Contrast" size="16" readonly> 
        </td>
      </tr>
      <tr> 
        <td width="20%">用户别名</td>
        <td width="80%"> <input type="text" name="usercopy" value="<%=u2%>" class="input" size="16"> 
        </td>
      </tr>
      <tr> 
        <td width="20%">现使用密码</td>
        <td width="80%"> <input type="password" name="passwordNow" value="<%=u3%>" class="input" size="16"> 
        </td>
      </tr>
      <tr> 
        <td width="20%">新登录密码</td>
        <td width="80%"> <input type="password" name="passwd1" value="<%=u3%>" class="input" size="16"> 
        </td>
      </tr>
      <tr> 
        <td width="20%">核对新密码</td>
        <td width="80%"> <input type="password" name="passwd2" value="<%=u3%>" class="input" size="16"> 
        </td>
      </tr>
      <tr> 
        <td width="20%">公文处理密码</td>
        <td width="80%"> <input type="password" name="gwmm" value="<%=u4%>" class="input" size="16"> 
        </td>
      </tr>
      <tr> 
        <td width="20%">联系方式</td>
        <td width="80%"> <input type="text" name="lxfs" value="<%=u5%>" class="input" size="16"> 
        </td>
      </tr>
      <tr> 
        <td width="20%">备 注</td>
        <td width="80%"> <textarea name="beizhu" value="<%=u6%>" class="input" rows="5" cols="40"><%=u6%></textarea>
        </td>
      </tr>
    
      <tr align="center"> 
        <td colspan="2"> <input class=Button type="submit" name="Submit" value=" 提交 " class="button1" onclick="return sub()" selected > 
          <input class=Button type="reset" name="Submit2" value=" 重写 " class="button1"> </td>
      </tr>
    </form>
    
     <script language="javascript" type="text/javascript">
function sub()
{

  var temp1=document.form1.passwd1.value;
  var temp2=document.form1.passwd2.value;
  var temp3=document.form1.passwordNow.value;
  var temp4=document.form1.usercopy.value;
 
  if(temp1!=temp2)	

	{
		window.alert("输入的两次新密码不一致!");
		
		return false;
	}
		if(document.form1.passwd1.value.length<6)
	{
		window.alert("密码不能小于六位数!");
	  document.form1.passwd1.focus(); 
		return false;
	}
	if(document.form1.passwd1.value.length>12)
	{
		window.alert("密码不能大于12位数!");
		
		return false;
	}
	if(document.form1.usercopy.value.length>8)
	{
		window.alert("用户别名不能大于8位!");
		
		return false;
	}

	
	
	
}
</script>
  </table>
</div>

              <TABLE width="100%">
              <TBODY>
              <TR>
                <TD height=4></TD></TR></TBODY></TABLE></TD>
          <TD class=content>&nbsp;</TD>
          <TD width=15 background=../../images/right.gif><IMG 
            src="../../images/blank.gif" width=15></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD width=25 background=../../images/bottomleft.gif height=25><IMG 
            height=25 src="../../images/blank.gif" width=25></TD>
          <TD width="100%" background=../../images/bottomback.gif 
            height=10><IMG height=25 src="../../images/blank.gif" width=10></TD>
          <TD width=27 background=../../images/bottomright.gif height=25><IMG 
            height=25 src="../../images/blank.gif" 
    width=27></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</body>
</html>

⌨️ 快捷键说明

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