當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Registration::returnTariffsData方法代碼示例

本文整理匯總了PHP中Registration::returnTariffsData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Registration::returnTariffsData方法的具體用法?PHP Registration::returnTariffsData怎麽用?PHP Registration::returnTariffsData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Registration的用法示例。


在下文中一共展示了Registration::returnTariffsData方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 function process($parameters)
 {
     $registration = new Registration();
     if (!$registration->checkIfAdmin($_SESSION['id_user'])) {
         $this->redirect('error');
     }
     //catch registration (button is pressed)
     if (isset($_POST['sent'])) {
         $data = $registration->sanitize(["email" => $_POST['email'], "tariff" => $_POST['tariff'], "firstname" => $_POST['firstname'], "surname" => $_POST['surname'], "telephone" => $_POST['telephone'], 'address' => $_POST['address'], "startDate" => $_POST['startDate'], "ic" => $_POST['ic'], "p" => $registration->getRandomHash()]);
         $this->data = $data;
         //for autofilling from previous page
         $result = $registration->validateData($data);
         if ($result['s'] == 'success') {
             $fakturoid = new FakturoidWrapper();
             $newCustomer = $fakturoid->createCustomer($data);
             if ($newCustomer == false) {
                 $result = ['s' => 'error', 'cs' => 'Bohužel se nepovedlo uložit data do Faktuoidu; zkus to prosím za pár minut', 'en' => 'Sorry, we didn\'n safe your data into Fakturoid; try it again after a couple of minutes please'];
             } else {
                 //add fakturoid_id into data structure
                 $data['fakturoid_id'] = $newCustomer->id;
                 $result = $registration->registerUser($data, $this->language);
             }
         }
         //change success message for admin
         if ($result['s'] == 'success') {
             $result = ['s' => 'success', 'cs' => 'Nový uživatel je úspěšně zaregistrován', 'en' => 'New member is successfully registred'];
         }
         $this->messages[] = $result;
     }
     $this->header['title'] = ['cs' => 'Registrace nového uživatele', 'en' => 'Registration of new user'];
     $this->data['tariffs'] = $registration->returnTariffsData($this->language);
     $this->view = 'forceRegistration';
 }
開發者ID:ParalelniPolis,項目名稱:TMS2,代碼行數:33,代碼來源:ForceRegistrationController.php

示例2: process

 function process($parameters)
 {
     $registration = new Registration();
     if ($registration->checkLogin()) {
         $this->redirect('error');
     }
     //catch registration (button is pressed)
     if (isset($_POST['sent'])) {
         $data = $registration->sanitize(['email' => $_POST['email'], 'tariff' => $_POST['tariff'], 'firstname' => $_POST['firstname'], 'surname' => $_POST['surname'], 'telephone' => $_POST['telephone'], 'address' => $_POST['address'], 'startDate' => $_POST['startDate'], 'ic' => $_POST['ic'], 'p' => $_POST['p']]);
         $this->data = $data;
         //for autofilling from previous page
         $result = $registration->validateData($data);
         if ($result['s'] == 'success') {
             $result = $registration->registerUser($data, $this->language);
         }
         $this->messages[] = $result;
         //if register success, show registration form no more
         if ($result['s'] == 'success') {
             $this->redirect('');
         }
     }
     $this->header['title'] = ['cs' => 'Registrace nového uživatele', 'en' => 'Registration of new user'];
     $this->data['tariffs'] = $registration->returnTariffsData($this->language);
     $this->view = 'registration';
 }
開發者ID:vane00ssa,項目名稱:TMS2,代碼行數:25,代碼來源:RegistrationController.php

示例3: process

 function process($parameters)
 {
     $registration = new Registration();
     if ($registration->checkLogin()) {
         $this->redirect('error');
     }
     //catch registration (button is pressed)
     if (isset($_POST['sent'])) {
         $data = $registration->sanitize(['email' => $_POST['email'], 'tariff' => $_POST['tariff'], 'firstname' => $_POST['firstname'], 'surname' => $_POST['surname'], 'telephone' => $_POST['telephone'], 'address' => $_POST['address'], 'startDate' => $_POST['startDate'], 'ic' => $_POST['ic'], 'p' => $_POST['p']]);
         $this->data = $data;
         //for autofilling from previous page
         $result = $registration->validateData($data);
         if ($result['s'] == 'success') {
             $fakturoid = new FakturoidWrapper();
             $newCustomer = $fakturoid->createCustomer($data);
             if ($newCustomer == false) {
                 $result = ['s' => 'error', 'cs' => 'Bohužel se nepovedlo uložit data do Faktuoidu; zkus to prosím za pár minut', 'en' => 'Sorry, we didn\'n safe your data into Fakturoid; try it again after a couple of minutes please'];
             } else {
                 //add fakturoid_id into data structure
                 $data['fakturoid_id'] = $newCustomer->id;
                 $result = $registration->registerUser($data, $this->language);
             }
         }
         $this->messages[] = $result;
         //if register success, show registration form no more
         if ($result['s'] == 'success') {
             $this->redirect('');
         }
     }
     $this->header['title'] = ['cs' => 'Registrace nového uživatele', 'en' => 'New user registration'];
     $this->data['tariffs'] = $registration->returnTariffsData($this->language);
     $this->view = 'registration';
 }
開發者ID:ParalelniPolis,項目名稱:TMS2,代碼行數:33,代碼來源:RegistrationController.php

示例4: process

 function process($parameters)
 {
     $registration = new Registration();
     if (!$registration->checkIfAdmin($_SESSION['id_user'])) {
         $this->redirect('error');
     }
     //catch registration (button is pressed)
     if (isset($_POST['sent'])) {
         $data = $registration->sanitize(["email" => $_POST['email'], "tariff" => $_POST['tariff'], "firstname" => $_POST['firstname'], "surname" => $_POST['surname'], "telephone" => $_POST['telephone'], "startDate" => $_POST['startDate'], "ic" => $_POST['ic'], "p" => $registration->getRandomHash()]);
         $this->data = $data;
         //for autofilling from previous page
         $result = $registration->validateData($data);
         if ($result['s'] == 'success') {
             $result = $registration->registerUser($data, $this->language);
         }
         $this->messages[] = $result;
     }
     $this->header['title'] = ['cs' => 'Registrace nového uživatele', 'en' => 'Registration of new user'];
     $this->data['tariffs'] = $registration->returnTariffsData($this->language);
     $this->view = 'forceRegistration';
 }
開發者ID:vane00ssa,項目名稱:TMS2,代碼行數:21,代碼來源:ForceRegistrationController.php


注:本文中的Registration::returnTariffsData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。