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
|
<? include('_init.php');
$id = intval($_SESSION['student_login']);
if(!$id){ $path = 'index.php'; @header("Location: {$path}"); echo "<script language='JavaScript'>window.location='{$path}'</script>"; exit(); }else{ $sql = "select * from student_main where id = ? and deleted = ? and status = ?"; $parameters = array($id,0,2); $row = bind_pdo($sql, $parameters, "selectone"); if(!$row['id']){ $path = 'index.php'; @header("Location: {$path}"); echo "<script language='JavaScript'>window.location='{$path}'</script>"; exit(); } } ?> <!DOCTYPE html> <html lang="en"> <head> <? include('_head.php')?> <link href="css/_sign.css" type="text/css" rel="stylesheet"> <script src='https://www.google.com/recaptcha/api.js?hl=en'></script> <script> function refreshcode(){ $('#LiCodeiframe').html('<iframe width="160" height="50" src="_verifyCode.php" frameborder="0" scrolling="no" marginwidth="0"></iframe>'); } var sms_process = true; function sendSMS(){ if(sms_process == true){ sms_process = false; $('.loading_icon').show(); $('#sms_box,#smstelError3').hide(); $.post('_ajax.php', { ajax: 'sendSMS', type: 'student' }, function(json) { var json = JSON.parse ( json ); //console.log(json); $('#sms_box').slideDown(1000); $('.loading_icon').hide(); sms_process = true; }); } } $(function(){ $('#confirmSMS').click( function(){ $('#smstelError3,#smstelError2,#smstelError').hide(); if(!$('input[name="sms_tel"]').val()){ $("#smstelError").show(); $('input[name="sms_tel"]').focus(); }else{ $('.loading_icon').show(); $.post('_ajax.php', { ajax: 'confirmSMSCode', type: 'student', code: $('input[name="sms_tel"]').val() }, function(json) { var json = JSON.parse ( json ); //console.log(json); $('.loading_icon').hide(); $('#sms_box').slideUp(1000); if(json.status == false){ $("#smstelError2").show(); }else{ $('#LiConnectSMS').val('<?=_lang("Verified")?>'); $('.loading_icon').hide(); } }); } } ); $('#submitBTN').click( function(){ var thisform = $('#LiForm'); $.post('_ajax.php', { async: false, ajax: 'checkverifyCode', verifyCode: $('input[name="verifyCode"]',thisform).val(), type: 'student' }, function(json) { var json = JSON.parse ( json ); var error = false; $('.error').hide(); if(!$('input[name="verifyCode"]',thisform).val()){ $("#verifyCodeError").show(); error = true; }else{ if(json.status == false){ $("#verifyCode2Error").show(); error = true; } } if(json.smsstatus == false){ $("#smstelError3").show(); error = true; } if($('input[name="is_provision"]:checked',thisform).val() != 1){ $("#provisionError").show(); error = true; } if(error == false){ //alert('a'); $('#LiForm').submit(); }else{ return false; } }); } ); }); </script> <script type="text/javascript" src="js/facebook.js"></script> </head>
<body>
<!-- Navigation --> <? include('_header.php');?> <div class="formSection"> <? $signupMenu='menu'?> <? include('_signupStudentMenu.php')?> <div class="TutorForm"> <form action="_process.php" method="post" enctype="multipart/form-data" id="LiForm"> <input type="hidden" name="action" value="signup_studentverification"/> <input type="hidden" name="facebook_id" value=""/> <!--<div class="VerifyHeading">將你的帳戶進行認證和與社交網絡聯繫 是最容易獲取學生信任的方法 !!!</div>--> <div class="SocialNetwork"> <div class="SocialSet"> <div class="SocialLeft"><div><img src="img/signup/Icon_Phone.png"><?=_lang("SMS Verification")?></div><div><font color="#0012ff" style="font-size:12px; font-weight:100;"><?=_lang("You can chat with tutor after SMS verification.")?></font></div></div> <div class="SocialRight"> <? if($row['isphoneverified'] == 1){?> <input type="button" value="<?=_lang("Verified")?>" class="SocialSend"> <? }else{?> <input type="button" value="<?=_lang("SMS Verification")?>" class="SocialSend" onClick="sendSMS()" id="LiConnectSMS"> <img src="img/loading_icon.gif" height="36" style="margin-left:5px; display:none;" class="loading_icon"/> <div id="sms_box" style="margin-top:5px; display:none;"> <input type="text" name="sms_tel" class="inputPrice" value="" style="width:100px; height:36px;" maxlength="6"/> <input type="button" value="認証" class="SocialSend" id="confirmSMS"> <div style="color:#F00; display:none;" class="error" id="smstelError"><?=_lang('Please enter verification code.')?></div> <div style="color:#F00; display:none;" class="error" id="smstelError2"> <?=_lang('Verification code is wrong.')?></div> </div> <? }?> <div style="color:#F00; display:none;" class="error" id="smstelError3"><?=_lang("Please verify mobile number.")?></div> </div> </div> <div class="SocialSet" style="margin-top:10px;"> <div class="SocialLeft"><div><img src="img/signup/Icon_Facebook.png"><?=_lang("Connect Facebook")?></div><div><font color="#0012ff" style="font-size:12px; font-weight:100;"><?=_lang("Tutor can know more about us through Facebook.")?></font></div></div> <div class="SocialRight"> <? if($row['facebook_id']){?> <input type="button" value="<?=_lang("Connected")?>" id="LiConnectFB" class="SocialSend"> <? }else{?> <input type="button" value="<?=_lang("Connect")?>" id="LiConnectFB" class="SocialSend" sname="<?=_lang("Connected")?>" onclick="statusChangeCallback()"> <img src="img/loading_icon.gif" height="36" style="margin-left:5px; display:none;" class="fb_loading_icon"/> <div style="color:#F00; display:none;" class="error" id="fbError"><?=_lang('This facebook account has been used.')?></div> <? }?> </div> </div> <!-- <div class="SocialSet"> <div class="SocialLeft"><img src="img/signup/Icon_GooglePlus.png">Google+</div> <div class="SocialRight"> <input type="button" value="CONNECT" class="SocialSend"> </div> </div> --> </div> <div class="HalfLeft"> <div class="BoxTitle"><font style="color:#ff0000;">*</font><?=_lang('VERIFICATION CODE')?></div> <div><table border="0" cellpadding="0" cellspacing="0"> <tr> <td id="LiCodeiframe"><iframe width="160" height="50" src="_verifyCode.php" frameborder="0" scrolling="no" marginwidth="0"></iframe></td> <td><img src="img/refresh_icon.png" alt="" height="50" style="cursor:pointer;" onClick="refreshcode()"/></td> </tr> </table></div> <div><input name="verifyCode" type="text" class="inputPrice" value="" maxlength="6" style="width:160px;"/></div> <div style="color:#F00; display:none;" class="error" id="verifyCodeError"> <?=_lang('Please enter verification code.')?> </div> <div style="color:#F00; display:none;" class="error" id="verifyCode2Error"> <?=_lang('Verification code is wrong.')?> </div> </div> <div class="InputDataIII"> <input type="checkbox" name="is_provision" value="1"> <?=html_entity_decode(_lang('Read and understand all of the above '))?> <a href="tnc.php" target="_blank"> <?=_lang('Terms of Service')?> </a> <div style="color:#F00; display:none;" class="error" id="provisionError"><?=_lang('Please click if you have read')?></div></div> <input type="button" value="<?=_lang('SUBMIT')?>" id="submitBTN" class="submitBTN"> </form> </div> </div> <? include('_footer.php')?> </body> </html>
|