Ejemplo n.º 1
0
/**
 * Returns payment card input form
 * 
 * @return string
 */
function zbs_PaycardsShowForm()
{
    $inputs = la_tag('br');
    $inputs .= __('Payment card number') . ' ';
    $inputs .= la_TextInput('paycard', '', '', false, 25);
    $inputs .= la_Submit(__('Use this card'));
    $inputs .= la_delimiter();
    $form = la_Form('', 'POST', $inputs, '');
    return $form;
}
Ejemplo n.º 2
0
/**
 * returns main self-credit module form
 * 
 * @return string
 */
function zbs_ShowCreditForm()
{
    $inputs = la_tag('center');
    $inputs .= la_HiddenInput('setcredit', 'true');
    $inputs .= la_CheckInput('agree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
    $inputs .= la_delimiter();
    $inputs .= la_Submit(__('Set me credit please'));
    $inputs .= la_tag('center', true);
    $form = la_Form("", 'POST', $inputs, '');
    return $form;
}
Ejemplo n.º 3
0
 /**
  * Forms and returns selector with available services
  * 
  * @param array $availableServices
  * @param string $login
  * @return string
  */
 function AdServicesSelector($availableServices, $login)
 {
     $selectData['-'] = '-';
     if (!empty($availableServices)) {
         $allSheduled = GetAllSheduled($availableServices, $login);
         $allActivated = GetAllActivated($availableServices, $login);
         foreach ($availableServices as $eachService) {
             $eq = false;
             $eachData = explode(":", $eachService);
             $serviceName = $eachData[0];
             $serviceTagID = $eachData[1];
             if (!empty($allSheduledl)) {
                 foreach ($allSheduled as $eachShedule) {
                     if ($eachShedule['param'] === $serviceTagID) {
                         $eq = true;
                     }
                 }
             }
             if (!empty($allActivated)) {
                 foreach ($allActivated as $eachActivated) {
                     if ($eachActivated['tagid'] === $serviceTagID) {
                         $eq = true;
                     }
                 }
             }
             if (!$eq) {
                 $selectData[$serviceTagID] = $serviceName;
             }
         }
     }
     $selector = la_Selector('tagid', $selectData, '', '', false);
     $selector .= la_delimiter();
     $selector .= la_CheckInput('agree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
     $selector .= la_delimiter();
     $selector .= la_Submit(__('Order'));
     $form = la_Form('', 'POST', $selector);
     return $form;
 }
Ejemplo n.º 4
0
/**
 * Renders user logout form (only for login auth)
 * 
 * @return void
 */
function zbs_LogoutForm()
{
    $inputs = la_HiddenInput('ulogout', 'true');
    $inputs .= la_Submit(__('Logout'));
    $form = la_Form('', 'POST', $inputs);
    show_window('', $form);
}
Ejemplo n.º 5
0
 /**
  * returns custom documents form fields
  * 
  * @return string
  */
 public function customDocumentFieldsForm()
 {
     $rawServices = $this->altcfg['DOCX_SERVICES'];
     $availServices = array();
     if (!empty($rawServices)) {
         $rawServices = explode(',', $rawServices);
         if (!empty($rawServices)) {
             foreach ($rawServices as $io => $each) {
                 $availServices[__($each)] = __($each);
             }
         }
     }
     $inputs = la_DatePickerPreset('customdate', date("Y-m-d"));
     $inputs .= la_tag('br');
     $inputs .= la_TextInput('customrealname', __('Real Name'), @$this->userData[$this->userLogin]['REALNAME'], true, '20');
     $inputs .= la_TextInput('customphone', __('Phone'), @$this->userData[$this->userLogin]['PHONE'], true, '10');
     $inputs .= la_Selector('customservice', $availServices, __('Service'), '', 'true');
     $inputs .= la_TextInput('customnotes', __('Notes'), '', true, '20');
     $inputs .= la_TextInput('customsum', __('Sum'), @$this->userData[$this->userLogin]['TARIFFPRICE'], true, '10');
     $inputs .= la_HiddenInput('customfields', 'true');
     $inputs .= la_Submit(__('Create'));
     $result = la_Form('', 'POST', $inputs, 'glamour');
     return $result;
 }
Ejemplo n.º 6
0
/**
 * Returns complete tariff moving form
 * 
 * @param string $login
 * @param array  $tc_tariffsallowed
 * @param float  $tc_priceup
 * @param float  $tc_pricedown
 * @param float  $tc_pricesimilar
 * @param string $us_currency
 * @return string
 */
function zbs_TariffChangeForm($login, $tc_tariffsallowed, $tc_priceup, $tc_pricedown, $tc_pricesimilar, $us_currency)
{
    global $us_config;
    $user_tariff = zbs_UserGetTariff($login);
    $alltariffs = zbs_TariffGetAllPrices();
    $form = '
        ' . __('Your current tariff is') . ': ' . __($user_tariff) . ' ' . __('with monthly fee') . ' ' . $alltariffs[$user_tariff] . ' ' . $us_currency . '<br>
        ' . __('The cost of switching to a lower rate monthly fee') . ': ' . $tc_pricedown . ' ' . $us_currency . '<br>
        ' . __('The cost of switching to a higher monthly fee tariff') . ': ' . $tc_priceup . ' ' . $us_currency . '<br>
        ' . __('The cost of the transition rate for the same monthly fee') . ': ' . $tc_pricesimilar . ' ' . $us_currency . '<br>
        ' . la_tag('br') . '
        ' . zbs_TariffGetShowPrices($tc_tariffsallowed, $us_currency, $user_tariff, $tc_priceup, $tc_pricedown, $tc_pricesimilar) . '
        ' . la_tag('br') . '
        ';
    $inputs = __('New tariff') . ' ' . zbs_TariffSelector($tc_tariffsallowed, $user_tariff) . la_delimiter();
    $inputs .= la_CheckInput('agree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
    $inputs .= la_delimiter();
    $nmChangeFlag = true;
    if (isset($us_config['TC_RIGHTNOW'])) {
        if ($us_config['TC_RIGHTNOW']) {
            $nmChangeFlag = false;
        }
    }
    $sumbitLabel = $nmChangeFlag ? __('I want this tariff next month') : __('I want this tariff right now');
    $inputs .= la_Submit($sumbitLabel);
    $form .= la_Form('', 'POST', $inputs, '');
    return $form;
}
Ejemplo n.º 7
0
    //extracting paysys description
    if (file_exists('config/opayz.ini')) {
        $opz_config = parse_ini_file('config/opayz.ini');
    } else {
        $opz_config = array();
    }
    $inputs = '';
    $forms = '';
    if (!empty($paysys)) {
        foreach ($paysys as $eachpaysys) {
            if (isset($opz_config[$eachpaysys])) {
                $paysys_desc = $opz_config[$eachpaysys];
            } else {
                $paysys_desc = '';
            }
            $inputs = la_tag('center', false);
            $inputs .= la_HiddenInput('customer_id', $payid);
            $inputs .= la_Submit(strtoupper($eachpaysys));
            $inputs .= la_tag('br');
            $inputs .= $paysys_desc;
            $inputs .= la_tag('center', true);
            $inputs .= la_tag('br');
            $forms .= la_Form($us_config['OPENPAYZ_URL'] . $eachpaysys . '/', 'GET', $inputs, '');
        }
        show_window('', $forms);
    } else {
        show_window(__('Sorry'), __('No available payment systems'));
    }
} else {
    show_window(__('Sorry'), __('Unfortunately online payments are disabled'));
}
Ejemplo n.º 8
0
 /**
  * 
  * @return type form for changin mobile
  */
 function zbs_ShowChangeMobileForm()
 {
     global $us_config;
     $inputs = la_tag('center');
     $inputs .= la_HiddenInput('changemobile', 'true');
     $inputs .= @$us_config['REMINDER_PREFIX'] . ' ';
     $inputs .= la_TextInput('mobile');
     $inputs .= la_delimiter();
     $inputs .= la_Submit(__('Change mobile'));
     $inputs .= la_tag('center', true);
     $form = la_Form("", 'POST', $inputs, '');
     return $form;
 }
Ejemplo n.º 9
0
 /**
  * Returns ticket reply form if ticket state is open
  * 
  * @param int $ticketid
  * @return string
  */
 function zbs_TicketReplyForm($ticketid)
 {
     $ticketid = vf($ticketid);
     $ticketdata = zbs_TicketGetData($ticketid);
     if ($ticketdata['status'] == 0) {
         $inputs = la_TextArea('replyticket', '', '', true, '60x10');
         $inputs .= la_Submit(__('Post'));
         $result = la_Form('', 'POST', $inputs, '');
     } else {
         $result = __('Closed');
     }
     return $result;
 }
Ejemplo n.º 10
0
 /**
  * returns signup service main form
  * 
  * @retun string
  */
 public function renderForm()
 {
     $inputs = '';
     $inputs .= la_HiddenInput('createrequest', 'true');
     //greeting text
     $inputs .= $this->optionGreetingText;
     //optional city selector
     if ($this->optionCityDisplay) {
         $inputs .= $this->cityInput();
         $inputs .= la_tag('br');
     }
     //street selector
     $inputs .= $this->streetInput();
     //build and apt inputs
     $baCells = la_TableCell($this->buildInput());
     $baCells .= la_TableCell($this->aptInput());
     $baRows = la_TableRow($baCells);
     $inputs .= la_TableBody($baRows, '', 0, '');
     //realname input
     $inputs .= $this->realnameInput();
     $inputs .= la_tag('br');
     //dirty magic here
     if ($this->optionSpamTraps) {
         $inputs .= $this->spambotsTrap();
     }
     //phone input
     $inputs .= $this->phoneInput();
     //email optional input
     if ($this->optionEmailDisplay) {
         $inputs .= $this->emailInput();
         $inputs .= la_tag('br');
     }
     //service combo selector
     if (!empty($this->services)) {
         $inputs .= $this->serviceInput();
         $inputs .= la_tag('br');
     }
     //optional tariffs selector
     if (!empty($this->tariffs)) {
         $inputs .= $this->tariffsInput();
         $inputs .= la_tag('br');
     }
     //notes text area
     $inputs .= $this->notesInput();
     $inputs .= la_tag('br');
     $inputs .= la_tag('small') . __('All fields marked with an asterisk (*) are required') . la_tag('small', true);
     $inputs .= la_tag('br');
     $inputs .= la_tag('br');
     $inputs .= la_Submit(__('Send signup request'));
     $result = la_tag('div', false, '', 'id="signup_form"');
     $result .= la_Form("", 'POST', $inputs, '');
     $result .= la_tag('div', true);
     return $result;
 }
Ejemplo n.º 11
0
                        rcms_redirect("index.php");
                    } else {
                        show_window(__('Error'), __('You must accept our policy'));
                    }
                } else {
                    //show some forms and notices
                    $af_message = __('Service "account freeze" will allow you to suspend the charge of the monthly fee during your long absence - such as holidays or vacations. The cost of this service is:') . ' ';
                    $af_message .= la_tag('b') . $freezeprice . ' ' . $af_currency . la_tag('b', true) . '. ';
                    $af_message .= __('Be aware that access to the network will be limited to immediately after you confirm your desire to freeze the account. To unfreeze the account you need to contact the nearest office.');
                    // terms of service
                    show_window(__('Account freezing'), $af_message);
                    //account freezing form
                    $inputs = la_CheckInput('afagree', __('I am sure that I am an adult and have read everything that is written above'), false, false);
                    $inputs .= la_HiddenInput('dofreeze', 'true');
                    $inputs .= la_delimiter();
                    $inputs .= la_Submit(__('I want to freeze my account right now'));
                    $af_form = la_Form('', 'POST', $inputs);
                    show_window('', $af_form);
                }
            } else {
                show_window('', __('Your account has been frozen'));
            }
        } else {
            show_window(__('Sorry'), __('Your account is now a negative amount'));
        }
    } else {
        show_window(__('Sorry'), __('Your tariff does not provide this service'));
    }
} else {
    show_window(__('Sorry'), __('Unfortunately account freeze is now disabled'));
}