<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>天生创想OA 手机版V2.0</title>
	<link rel="stylesheet" href="themes/jquery/css/themes/default/jquery.mobile-1.4.0.min.css">
	<link rel="stylesheet" href="themes/css/list.css">
	<link rel="stylesheet" href="themes/css/ui-box.css">
	<script src="themes/jquery/js/jquery.js"></script>
	<script src="themes/jquery/js/jquery.mobile-1.4.0.min.js"></script>
</head>
<body class="um-vp c-wh" ontouchstart>
	<div data-role="page" data-quicklinks="true" class="ub ub-ver ">
      <div data-role="header" id="header" data-position="fixed" data-fullscreen="true" data-tap-toggle="false" >
		<div class="uh c-org c-m1 t-wh ub">
		    <div class="umw4" onClick="javascript:window.location='index.php?ac=list&fileurl=user'">
                <!--插入按钮控件-->
				<div class="btn btn-l btn-a ub ub-ac " >       
					<div class="ulim">返回</div>       
				</div>
            </div>
	        <h1 class="ut ub-f1 ulev0 ut-s tx-c">我的资料</h1>
		</div>
	    </div>
		<!-- /header -->

	    <div data-role="content">
			<div style="padding:50px 16px 10px 13px;" >
			<label for="text-basic" id="pwd_note"></label>
			<form action="#" method="get">
				<label for="text-basic">原始密码:</label><input id="oldpassword" name="oldpassword" value="" type="password">
				<label for="text-basic">新的密码:</label><input id="password" name="password" value="" type="password">
				<label for="text-basic">确认密码:</label><input id="ppassword" name="ppassword" value="" type="password">
				 <div class="ui-block-a"><a href="javascript:;" onClick="pwd_add();" class="ui-btn ui-shadow ui-corner-all ui-btn-b ui-mini">确认修改密码</a></div>
				</form>
			</div>
	    </div><!-- /content -->

	    <div data-role="footer" data-position="fixed" data-tap-toggle="false">
				 <div class="ub c-bla c-m12 tab-b t-wh">
				 	
				 	<div class="ub-f1 ub ub-ver" onClick="javascript:window.location='index.php'">
						<div class="ub-f1 ub-img5 tp-home"></div>
						<div class="uinn ulev-2 tx-c">桌面</div>
					</div>
					
					<div class="ub-f1 ub ub-ver"  onClick="javascript:window.location='index.php?ac=list&fileurl=news'">
						<div class="ub-f1 ub-img5 tp-menu"></div>
						<div class="uinn ulev-2 tx-c">信息</div>
					</div>
					<div class="ub-f1 ub ub-ver" onClick="javascript:window.location='index.php?ac=list&fileurl=sms'">
						<div class="ub-f1 ub-img5 tp-talk"></div>
						<div class="uinn ulev-2 tx-c">微消息</div>
					</div>
					<div class="ub-f1 ub ub-ver tab-act" onClick="javascript:window.location='index.php?ac=list&fileurl=user'">
						<div class="ub-f1 ub-img5 tp-infoon"></div>
						<div class="uinn ulev-2 tx-c">我</div>
					</div>
				 </div>
	    </div><!-- /footer -->
	</div><!-- /page -->
<script type="text/javascript"> 
	function pwd_add(){
		if(document.getElementById('oldpassword').value==""){
			alert("旧密码不能为空！");
			return (false);
		}
		if(document.getElementById('password').value==""){
			alert("请输入新的密码！");
			return (false);
		}
		if(document.getElementById('ppassword').value==""){
			alert("请确认新的密码！");
			return (false);
		}
		if(document.getElementById('password').value!=document.getElementById('ppassword').value){
			alert("两次输入的密码不一致，请重新输入！");
			return (false);
		}
		var pwd = document.getElementById('password').value;
		var oldpwd = document.getElementById('oldpassword').value;
		jQuery.ajax({
			  type: 'GET',
			  url: 'user.php?do=pwd&ats=add&oldpwd='+oldpwd+'&pwd='+pwd,
			  success: function(data){
			  	//alert(data);
			    $('#pwd_note').html(data);
				document.getElementById('oldpassword').value='';
				document.getElementById('password').value='';
				document.getElementById('ppassword').value='';
			  }
		   });
	}
</script> 
</body>
</html>
