<?php
	session_start();
	require_once("../Wx.Config.php");	//只加载一次
	//判断是否登录系统		
	if($_SESSION["main_viplogined"]!="1" |$_SESSION["main_vipno"]=="")
	{
		//没有登录开始启动登录
		header('location:login.php?stext=');
		exit;
	}
	header("Content-type:text/html;charset=gb2312");
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="gb2312">	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=0">
	<meta name="apple-touch-fullscreen" content="1">

	<title>微信会员</title>

	<link rel="stylesheet" href="css/mycss.css"> 
	<script src="jsp4/jquery.js"></script>
	
	<!--<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">-->
	<!--<script src="jsp4/jquery.mobile-1.4.3.min.js"></script>-->
	<script src="jsp5/jquery.mobile-1.4.5.min.js"></script>
	<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">
	
</head>

<script>	
	//隐藏维信右上角菜单
	function onBridgeReady(){
		WeixinJSBridge.call('hideOptionMenu');
	}

	if (typeof WeixinJSBridge == "undefined")
	{
		if( document.addEventListener )
		{
			document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
		}
		else if (document.attachEvent)
		{
			document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
			document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
		}
	}
	else
	{
		onBridgeReady();
	}
</script>


<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="pswdpage1">
    <header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;">
        <table width="100%" height="52" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo WxMainConfig::colHeadBkColor;?>">
		   	<tr>
				<td height="52" width="20"></td>
				<td height="52" align="center" valign="middle">
	                <span style="color:<?php echo WxMainConfig::colHeadTextColor;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:19px;text-shadow:none;">修改密码</span>
               	</td>
				<td height="52" width="20"></td>
		  	</tr>
		</table>
	</header>
	
	<article data-role="none">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr>
				<td height="5" width="15"></td>
				<td height="5" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
	
			<tr>
				<td height="30" width="15"></td>
				<td height="30" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="70"><span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">旧密码</span></td>
							<td>
								<div style="float:left;width:100%;">
									<input ui-mini id="mytext1" name="mytext1" value="" type="password" placeholder='请输入旧密码' autocomplete="off" data-clear-btn="true" data-mini="true"/>
								</div>	
							</td>
						</tr>
					</table>
				</td>
				<td height="30" width="15"></td>
			</tr>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="5" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
			
			<tr>
				<td height="1" width="15"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15"></td>
			</tr>
			
			<tr>
				<td height="6" width="15"></td>
				<td height="6" align="left"></td>
				<td height="6" width="15"></td>
			</tr>
			
			<tr>
				<td height="30" width="15"></td>
				<td height="30" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="70"><span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">新密码</span></td>
							<td>
								<div style="float:left;width:100%;">
									<input id="mytext2" name="mytext2" value="" type="password" placeholder='6-18位字母和数字' autocomplete="off" data-clear-btn="true" data-mini="true"/>
								</div>	
							</td>
						</tr>
					</table>
				</td>
				<td height="30" width="15"></td>
			</tr>
						
			<tr>
				<td height="30" width="15"></td>
				<td height="30" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="70"><span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">确认密码</span></td>
							<td>
								<div style="float:left;width:100%;">
									<input id="mytext3" name="mytext3" value="" type="password" placeholder='请重复一遍新密码' autocomplete="off" data-clear-btn="true" data-mini="true"/>
								</div>	
							</td>
						</tr>
					</table>
				</td>
				<td height="30" width="15"></td>
			</tr>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="5" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
			
			<tr>
				<td height="1" width="15"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15"></td>
			</tr>
										
			<tr>
				<td height="12" width="15"></td>
				<td height="12" align="left"></td>
				<td height="12" width="15"></td>
			</tr>
			
            
            <tr>
				<td height="8" width="15"></td>
				<td height="8" align="center">
                	<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="50%" align="center">
                            	<div data-rel="back" onClick="bmtReturnBK()" style="border-radius:5px;width:80%; height:38px; background-color:#D7AA28;">
                                   	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                                       	<tr><td width="100%" height="100%" align="center">
                                        	<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">返 回</span>                            	
                                    	</td></tr>
                               		</table>
                             	</div>
                            </td>
							<td width="50%" align="center">
                            	<div data-rel="back" onClick="bmtSaveModify()" style="border-radius:5px;width:80%; height:38px; background-color:<?php echo WxMainConfig::colHeadBkColor;?>;">
                                   	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                                       	<tr><td width="100%" height="100%" align="center">
                                        	<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">提交修改</span>                            	
                                    	</td></tr>
                               		</table>
                             	</div>
							</td>
						</tr>
					</table>
                
				</td>
				<td height="8" width="15"></td>
			</tr>
           
			
		</table>
		
        <script type="text/javascript">
			function bmtSaveModify()
			{
				var strtemp1 = $("#mytext1").val();
					var strtemp2 = $("#mytext2").val();
					var strtemp3 = $("#mytext3").val();
					
					var intNextFlag=0;
					
					var stroldpswd='<?php echo $_SESSION["main_vippswd"];?>';
					
					strtemp1=strtemp1.trim();
					strtemp2=strtemp2.trim();
					strtemp3=strtemp3.trim();
					stroldpswd=stroldpswd.trim();
					
					
					if(strtemp2==strtemp3)
					{
						if(strtemp1==stroldpswd)
						{
							intNextFlag=0;
						}
						else
						{
							intNextFlag=1;
							alert("旧密码不正确！");
						}
					}
					else
					{
						intNextFlag=1;
						alert("您输入的新密码不一致！");
					}
					
					if(intNextFlag==0)
					{
						//开始提交修改
						window.location.href="vipsave.php?selid=3&temp=" + strtemp2;
					}
			};
			
			
			function bmtReturnBK()
			{
				window.location="vipmain.php";	
			};
			
		</script>
		
		<script>
		//禁止页面上下滑动,整个页面都不能滑动了
		document.addEventListener('touchmove', function(e) {
			e.preventDefault();
		});
	</script>

			
	<script>
		//禁止页面上下滑动,整个页面都不能滑动了
		document.addEventListener('touchmove', function(e) {
			e.preventDefault();
		});
	</script>
	</article>
</section>

</body>
	
</html>