Example #1
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;
}
Example #2
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;
 }
Example #3
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;
}
Example #4
0
 /**
  * Deleting user tag form
  * @return type for for tag delete
  */
 function zbs_ShowDisableReminderForm()
 {
     $inputs = la_tag('center');
     $inputs .= la_HiddenInput('deleteremind', '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(__('Don\'t remind me'));
     $inputs .= la_tag('center', true);
     $form = la_Form("", 'POST', $inputs, '');
     return $form;
 }
Example #5
0
                     //push cash fee anyway
                     zbs_PaymentLog($user_login, '-' . $freezeprice, $af_cahtypeid, "AFFEE");
                     billing_addcash($user_login, '-' . $freezeprice);
                     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'));
 }