<!DOCTYPE html>
<!--[if IE 8 ]><html dir="ltr" lang="zh-TW" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="ltr" lang="zh-TW" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="ltr" lang="zh-TW">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<title>管理後臺</title>
<meta name="robots" content="noindex, nofollow" />
<link href="less/page.less" rel="stylesheet/less">
<link href="css/main.css" rel="stylesheet">
<link href="css/page.css" rel="stylesheet">
<script src="/jquery/jquery-1.10.js"></script>
<script>
	if('<?# alertMsg ?>' != ''){
		alert('<?# alertMsg ?>');
		if('<?# goBack ?>' == 'Y') history.back();
	}
	if('<?# locationHref ?>' != '') location.href = '<?# locationHref ?>';
</script>
</head>
<body>
	<?# sidePage ?>
	<div class="pos_rel" id="content">
		<?# header ?>
		<div class="row mt_10 mb_5 h3 page_title">修改密碼</div>
		<form id="form1" name="form1">
			<div class="card">
				<div class="pos_rel bg_g_100 tabs_warp" id="tabs_warp">
					<div class="tabs_list">
						<a class="tabs_item" href="index.php">控制台</a>
						<a class="tabs_item" data-action="true" href="javascript:void(0);">修改密碼</a>
					</div>
				</div>
				<div class="card_body form_box">
                    <div class="col_12 d_flex form_list"><label>原始密碼</label><input type="password" id="password" name="password" /></div>
                    <div class="col_12 d_flex form_list"><label>新密碼</label><input type="password" id="newpassword" name="newpassword" /></div>
                    <div class="col_12 d_flex form_list"><label>重新輸入新密碼</label><input type="password" id="repassword" name="repassword" /></div>
				</div>
			</div>
            <div class="row mt_5 d_flex start_box">
				<a class="mr_2 btn btn_info" id="btnOK" href="javascript:void(0);">送出</a>
                <a class="mr_2 btn btn_g_300" id="btnReset" href="javascript:void(0);">重置</a>
			</div>
		</form>
		<?# footer ?>
	</div>
</body>
</html>
<script>
	$(function(){
		$('#btnOK').click(function(){
			if($('#password').val() == ''){
				alert('請輸入原始密碼!');
				$('#password').focus();
				return false;
			}
			if($('#newpassword').val() == ''){
				alert('請輸入新密碼!');
				$('#newpassword').focus();
				return false;
			}
			if($('#newpassword').val() != $('#repassword').val()){
				alert('兩次輸入的新密碼不同!');
				$('#newpassword').val('');
				$('#repassword').val('');
				$('#newpassword').focus();
				return false;
			}
			$('#form1').submit();
		});
		$('#btnReset').click(function(){
			$('#form1')[0].reset();
		});
	});
</script>