Пример #1
0
         $res = lang('forex_activation_not_valid');
         logCreate('Regis status not valid data:' . print_r($dataRegis, 1), 'error');
     } else {
         $this->forex->activationUpdateUser($data['userid'], 2);
         $this->forex->activationUpdate($data['id'], 1);
         //===echo "Update activation<br/>";
     }
 }
 if (!isset($res)) {
     $url = $this->forex->forexUrl('activation');
     $param = array();
     $param['email'] = $dataRegis['email'];
     $param['activecode'] = $activecode;
     $url .= "?" . http_build_query($param);
     //===echo $url."<br>";
     $result = _runApi($url);
     //===echo print_r($result,1)."<br>";
     if (!isset($res) && (int) $result == 25) {
         logCreate('not valid code url:' . $url, 'error');
         logCreate('url:' . $url . '|respon:' . $result, 'error');
         $res = lang('forex_activation_not_valid');
     }
     if (!isset($res) && (int) $result == 99) {
         logCreate('Account had been actived url:' . $url, 'error');
         logCreate('url:' . $url . '|respon:' . $result, 'error');
         $res = lang('forex_activation_account_active');
     }
     if (!isset($res) && (int) $result == 1) {
         $this->forex->accountCreate($data['userid']);
         $res = lang('forex_done');
     }
Пример #2
0
 public function data()
 {
     $url = $this->config->item('api_url');
     $this->load->helper('api');
     $respon = array('html' => print_r($_REQUEST, 1));
     $type = $this->input->post('type', 'unknown');
     $message = 'unknown data type';
     if ($type == 'request') {
         $respon['title'] = 'NEW LIVE ACCOUNT (CREATED)';
         $param['data'] = $this->convertData();
         $stat = $this->forex->saveData($param['data'], $message);
         //======SAVE TO DATABASE
         /*
         $param['module']='liveuser';
         $param['task']='create';
         logCreate( 'param:'.print_r($param,1));
         $param['app_code']='9912310';
         $result=_runApi($url, $param);
         $this->param['result']=$result;
         logCreate( 'param:'.print_r($result,1));
         //$respon['result']=$result;
         //$respon['html']=$this->load->view($this->param['folder'].'liveTable_view',$this->param,true);
         */
         if ($stat !== false) {
             $respon['html'] = "<h3>berhasil</h3> Silakan Menunggu Konfirmasi dari Email anda";
             $ok = 1;
             $url = $this->config->item('api_url');
             $param['app_code'] = $this->config->item('app_code')[0];
             $param['module'] = 'forex';
             $param['task'] = 'register';
             $result = _runApi($url, $param);
         }
     }
     if (!isset($ok)) {
         $this->errorMessage('266', $message);
     }
     $this->succesMessage($respon);
 }