<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="gbase.db.*"%>
<%@ include file="../checkLogin.jsp" %>
<%
	
	String message="操作失败";
	String url="myuser.jsp";
	String user_id=request.getParameter("user_id")==null?"":request.getParameter("user_id");
	String user_name=request.getParameter("user_name")==null?"":request.getParameter("user_name");
        String password=request.getParameter("password")==null?"":request.getParameter("password");
        String telno=request.getParameter("telno")==null?"":request.getParameter("telno");
        String address=request.getParameter("address")==null?"":request.getParameter("address");
        String dept_id=request.getParameter("dept_id")==null?"0":request.getParameter("dept_id");
        String bir_add=request.getParameter("bir_add")==null?"0":request.getParameter("bir_add");
        String duty=request.getParameter("duty")==null?"0":request.getParameter("duty");
        String sql = "update web_user set user_name='"+user_name+"',telno='"+telno+"',address='"+address+"',password='"+password+"',duty='"+duty+"',bir_add='"+bir_add+"' where user_id='"+user_id+"'";
      //out.println(sql);
      DBOperation theDBOperation = new DBOperation();
      try {
        int i=theDBOperation.executeSql(sql);
        
        if(i>0)
         { message = "操作成功!";
         
         }
        else
          message = "操作失败!";
      }
      catch (Exception ex) {
        message = "操作失败!";
      }
	
%>
<script language="javascript">
	function process ( message,url){
		alert(message);
		self.location = url;
	}
</script>
<html>
	<head>
		<title></title>
	</head>
	<body onload="javascript: process('<%=message%>','<%=url%>');">
	</body>
</html>