wanglizhong
2025-05-05 2876dd05c0528ec665791a0844f643f566f7c31b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?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>