<?php include "./inc/odbc.php"; ?>
|
<?php
|
$NEWPhone=empty($_REQUEST['NEWPhone'])!=false ? "0" : $_REQUEST['NEWPhone'];
|
//$openid="oAJ1cwegdmr12YVPyyM5hF1EhcOk";
|
include "./inc/OAuth2.php";
|
?>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>民航医疗快线</title>
|
<link rel="stylesheet" href="/css/webtyle.css">
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
<link rel="stylesheet" href="/css/bootstrap-theme.min.css">
|
<script src="/js/jquery-1.10.2.min.js"></script>
|
<script src="/js/bootstrap.min.js"></script>
|
<script src="/js/app.js?v=1.8"></script>
|
<link rel="stylesheet" href="/css/app.css?v=1.9">
|
<link rel="stylesheet" href="/css/app_2.css?v=2.0">
|
</head>
|
<body class="ds_body">
|
<div style="text-align:center;margin-top:20px"><img src="img/top.png" width="90%" height="" border="0" alt=""></div>
|
<hr style="text-align:center;width:100%"></hr>
|
<style>
|
header .headbrand {
|
margin-top: -4px;
|
position: absolute;
|
right: 10px;
|
top: 10px;
|
}
|
header {
|
padding: 1em 5%;
|
height: auto;
|
}
|
header .headico {
|
margin-top: 0;
|
display: inline-block;
|
vertical-align: top;
|
}
|
.info{
|
padding-left: 10px;padding-bottom: 5px;display: inline-block;vertical-align: top;width: 60%;
|
}
|
.rating-small .fa {
|
color: #ffcc33;
|
}
|
.sign{
|
color: #545454;clear: both;font-size: 14px;
|
}
|
#point_star span{
|
background-image: url("/img/start2_09.png");
|
}
|
#point_star .empty {
|
background-image: url("/img/start2_10.png");
|
}
|
.showlabel ul li img{
|
width: 13px;
|
height: 13px;
|
margin-left: 3px;
|
}
|
.imgs{text-align: left;margin: 10px 0;}
|
.imgs img{width: 60px;height: 60px;margin: 5px;}
|
@media screen and (max-width: 320px) {
|
.info{width: 50%;}
|
}
|
.label3 {
|
color: #fff;
|
background:transparent;
|
border: 1px solid #ffa732;
|
cursor: pointer;
|
color: #ffa732;
|
}
|
</style>
|
<div class="box">
|
<div class="myDiv_1">
|
<?php
|
$sql="select wxID,weixinOpenID,UserPhone,UserName,LoginTime,weixinState from weixinOpenIDToPhone where weixinState=1 and weixinOpenID='".$openid."' order by wxID";
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)!=0) {
|
while($rs = sqlsrv_fetch_array($data) ) {
|
$wxID = $rs['wxID'];
|
$weixinOpenID = $rs['weixinOpenID'];
|
$UserPhone = $rs['UserPhone'];
|
$UserName = $rs['UserName'];
|
$LoginTime = $rs['LoginTime'];
|
?>
|
<a href="#MySave.php?MySave=1&wxID=<?php echo $wxID;?>" class="aList aList10">
|
<p style="font-size: 18px;"><?php echo $UserName." ".$UserPhone;?></p>
|
|
<div class="clear"></div>
|
</a>
|
<?php
|
}
|
}else{
|
$NEWPhone="1";
|
}
|
}
|
?>
|
</div>
|
<div class="AddSiteDiv" style="text-align:center;">
|
<ul class="AddSiteUL"><p style="height:30px"></p>
|
<li >
|
<a onclick="JS_AddPhone()">
|
<span class="AddSiteSpan fl" style="font-size: 18px;">绑定新手机</span>
|
<span class="AddSiteSpan1 fr"></span>
|
<div class="clear"></div>
|
</a>
|
</li>
|
</ul>
|
</div>
|
</div>
|
|
<!--绑定新手机-->
|
<div class="div0321" id="AddPhone" style="display:none;">
|
<form method="post" action="MyPhoneSave.php">
|
<input name="MySave" type="hidden" value="1">
|
<?php
|
$yzma=rand(1000,9999);
|
|
?>
|
<img class="outXG fr" src="img/out.png" onclick="JS_ClosePhone()"/>
|
<div class="clear"></div>
|
<div class="modifyDiv0321" style="margin-top:2%;">
|
<input class="modifyDivText1 fl newphone0329" type="text" name="UserName" value="" placeholder="姓名" style="font-size: 18px;"/>
|
<div class="clear"></div>
|
</div><div class="modifyDiv0321" style="margin-top:2%;">
|
<input class="modifyDivText1 fl newphone0329" type="text" name="UserPhone" value="" placeholder="手机号码" style="font-size: 18px;"/>
|
<div class="clear"></div>
|
</div>
|
<div class="modifyDiv0321" style="margin-top:2%;">
|
<input class="modifyDivText1 modifyDivText1_1 fl" type="text" value="" name="yzma" placeholder="验证码" style="font-size: 18px;"/>
|
<span onclick="JS_Authorize()" id="button_send" class="ObtainC yzm fr" style="font-size: 19px;background: #9d1273;">获取验证码</span>
|
<div class="clear"></div>
|
</div>
|
|
<div style="height:60px;"></div>
|
<div class="addr-add">
|
<input style="display:block;width:100%; border-radius:200px;" class="btn-addr tj6" type="submit" value="确认绑定手机">
|
</div>
|
</form>
|
</div>
|
<script>
|
//单据类型显示下拉菜单
|
function JS_AddPhone(){
|
AddPhone.style.display="block";
|
}
|
function JS_ClosePhone(){
|
AddPhone.style.display="none";
|
}
|
$(function(){
|
|
var reg = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0]{1})|(15[0-3]{1})|(15[5-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
|
$(".tj6").click(function(){
|
var UserName = $.trim($('input[name="UserName"]').val());
|
var phone = $.trim($('input[name="UserPhone"]').val());
|
var yzma = $.trim($('input[name="yzma"]').val());
|
if(UserName == ""){
|
alert('请填写姓名!');
|
return false;
|
}
|
else if(phone == ""){
|
alert('请填写手机号码!');
|
return false;
|
}else if(phone.search(reg) < 0){
|
alert('请输入正确手机号!');
|
return false;
|
}else if(yzma == ""){
|
alert('请填写验证码!');
|
return false;
|
}else if(yzma != "<?php echo $yzma;?>"){
|
alert('验证码错误!');
|
return false;
|
}
|
});
|
})
|
function JS_Authorize() {
|
var reg = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0]{1})|(15[0-3]{1})|(15[5-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
button_send=$("#button_send").text();
|
if (button_send=="获取验证码")
|
{
|
|
var phone = $.trim($('input[name="UserPhone"]').val());
|
if(phone == ""){
|
alert('请填写手机号码!');
|
return false;
|
}else if(phone.search(reg) < 0){
|
alert('请输入正确手机号!');
|
return false;
|
}
|
$.ajax({
|
type:'post',
|
url:'/inc/send_SMS.asp?phone='+phone+'&yzma=<?php echo $yzma;?>',
|
success:function(data){
|
if(data == '1'){
|
$("#button_send").html('发送成功')
|
//alert("发送成功");
|
return false;
|
}else{
|
alert("提交失败,请重试!");
|
return false;
|
}
|
}
|
});
|
}
|
}
|
<?php
|
if ($NEWPhone=="1"){
|
echo "JS_AddPhone()";
|
}
|
?>
|
</script>
|
</body>
|
</html>
|