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
 
 | 
<?php     require_once('webadmin/basic_info.php');
      $id = (int)$_SESSION["id"];
      $campaign = get_campaign($id);     check_campaign_date($campaign);
      if(isset($_SESSION["telephone"])){         $tel = (int)$_SESSION["telephone"];     }else{         if(!isset($_POST["telephone"]) || empty($_POST["telephone"])){             echo "<script>alert('Please enter your mobile number.\\n請輸入你的手提電話號碼。'); history.back(); </script>";             exit;         }else{             if((int)$_POST["telephone"] != $_POST["telephone"]) {                 echo "<script>alert('Please enter correct mobile number.\\n請輸入正確的手提電話號碼。'); history.back(); </script>";                 exit;             }         }
          $tel = (int)$_POST["telephone"];     }
 
      //send sms     $url      = $site_info["skytree_api_hostname"].'api/vip/requestSMSVerification?tel='.$tel;     $result = call_curl($url, NULL, 0);
      $result_array = json_decode($result, true);
      if($result_array["error"] == "0"){         if(isset($_SESSION["telephone"])){             echo "<script>location.href='registration_step1_verify.php?resend=1'; </script>";         }else{             $_SESSION["telephone"] = $tel;
              echo "<script>alert('A verification sms message will send to your phone soon. Please wait a moment and activate your account later.\\n你將會收到認證的短訊,請稍等並進行認證。'); location.href='registration_step1_verify.php'; </script>";         }
      }else{         if($result_array["errMsg"] == "vipAccountAlreadyExists"){             echo "<script>alert('This mobile phone has been used by someone. Please use another mobile phone to register account.\\n你所輸入的流動電話號碼已被登記。'); history.back(); </script>";         }else{             echo "<script>alert('The verification sms message cannot send out. Please try again.\\n認證短訊未能送出,請重新嘗試。'); history.back(); </script>";         }     }
  
 |