| 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
 | <?phprequire_once('webadmin/basic_info.php');
 
 $id = (int)$_SESSION["id"];
 
 $campaign = get_campaign($id);
 check_campaign_date($campaign);
 
 if(!isset($_SESSION["telephone"]) || empty($_SESSION["telephone"])){
 echo "<script>alert('Please enter your mobile number.\\n請輸入你的手提電話號碼。'); history.back(); </script>";
 exit;
 }else{
 if((int)$_SESSION["telephone"] != $_SESSION["telephone"]) {
 echo "<script>alert('Please enter correct mobile number.\\n請輸入正確的手提電話號碼。'); history.back(); </script>";
 exit;
 }
 }
 
 if(empty($_POST["code"])){
 echo "<script>alert('Please enter sms verification code.\\n請輸入認證碼。'); history.back(); </script>";
 exit;
 }
 
 $tel = $_SESSION["telephone"];
 $code = $_POST["code"];
 
 //send sms
 $url      = $site_info["skytree_api_hostname"].'api/vip/verifyTel?tel='.$tel.'&code='.$code;
 $result = call_curl($url, NULL, 0);
 $result_array = json_decode($result, true);
 
 if($result_array["error"] == "0"){
 $_SESSION["account_verified"] = 1;
 
 echo "<script>alert('Your phone number is verified. Please continue and complete the registration process.\\n你的流動電話號碼已成功認證。請繼續註冊流程。'); window.location.href='registration_step2.php'; </script>";
 }else{
 echo "<script>alert('Wrong verification code. Please enter again.\\n認證錯誤,請再嘗試。'); history.back(); </script>";
 }
 
 |