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

📄 xt_user_update.jsp

📁 downloadsoftware.jsp downloadstyle.css download estdate.jsp download密码.txt downloadadmin
💻 JSP
字号:
<%@ 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=null;
    username=(String)session.getValue("originalusername");
   
Connection connection=null;
Statement statement=null;
String password="";
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();
}catch(SQLException e){out.println("连接数据库失败");}
  
  statement=connection.createStatement();
  ResultSet columns=statement.executeQuery(
  "SELECT * FROM xt_user WHERE userid='"+username+"'");

  
  String usercopy=request.getParameter("usercopy");//用户名
  String passwd=request.getParameter("passwordNow");  //登录密码
  String gwpassword=request.getParameter("gwmm"); // 公文处理密码
  String lxcall=request.getParameter("lxfs");  //  联系方式
  String memo=request.getParameter("beizhu"); //   备注
  String passwd1=request.getParameter("passwd1");
  String passwd2=request.getParameter("passwd2");
  while(columns.next()){ password=columns.getString("passwd"); }
  
  if(!password.equals(passwd)) { 
  
     out.println("您输入的旧密码不正确,请重新核对!"); 
      %>
     
     <a href='xt_user_update_form.jsp'> [返回] </a>
     
     <% }
     
     else {
  
  if(passwd1.equals(passwd2))
  {
    
    
  
String sql="UPDATE xt_user  SET usercopy='"+usercopy+"',passwd='"+passwd1+"',gwpassword='"+gwpassword+"',lxcall='"+lxcall+"',memo='"+memo+"'";
try{
  statement.executeUpdate(sql+"WHERE userid='"+username+"'"); //等待修改
}catch(SQLException e){e.printStackTrace();out.println("数据没有");}
 finally
	  {
	  statement.close();
      connection.close();
	  }

out.println("修改成功!");  %>

 <a href='xt_user_update_form.jsp'> [返回] </a>
 <%
   
  }
 
  else {out.println("两次输入的密码不一致,没有成功!");  %> <a href='xt_user_update_form.jsp'> [返回]</a>   <% } %>


<% } 
    
%>
              <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 + -