本文整理匯總了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';
}
示例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';
}
示例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';
}
示例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';
}