Пример #1
0
function zbs_ShowUserPayments($login)
{
    $usConfig = zbs_LoadConfig();
    if ($usConfig['PAYMENTS_ENABLED']) {
        $allpayments = zbs_CashGetUserPayments($login);
        $cells = la_TableCell(__('Date'));
        $cells .= la_TableCell(__('Payment'));
        $cells .= la_TableCell(__('Balance'));
        $rows = la_TableRow($cells, 'row1');
        if (!empty($allpayments)) {
            foreach ($allpayments as $io => $eachpayment) {
                if ($usConfig['PAYMENTSTIMEHIDE']) {
                    $timestamp = strtotime($eachpayment['date']);
                    $cleanDate = date("Y-m-d", $timestamp);
                    $dateCells = $cleanDate;
                } else {
                    $dateCells = $eachpayment['date'];
                }
                $cells = la_TableCell($dateCells);
                $cells .= la_TableCell($eachpayment['summ']);
                $cells .= la_TableCell($eachpayment['balance']);
                $rows .= la_TableRow($cells, 'row2');
            }
        }
        $result = la_TableBody($rows, '100%', 0);
        show_window(__('Last payments'), $result);
    } else {
        $result = __('This module is disabled');
        show_window(__('Sorry'), $result);
    }
}
Пример #2
0
function show_window($title, $data)
{
    global $ContentContainer;
    $cells = la_TableCell(la_tag('h2') . @$title . la_tag('h2', true));
    $rows = la_TableRow($cells);
    $cells = la_TableCell(@$data);
    $rows .= la_TableRow($cells);
    $window_content = la_TableBody($rows, '100%', 0);
    $ContentContainer = $ContentContainer . $window_content;
}
Пример #3
0
 /**
  * 
  * @param type $availableServices
  * @param type $login
  * @return type
  */
 function ShowAllOrderedServices($availableServices, $login)
 {
     $skinPath = zbs_GetCurrentSkinPath();
     $imagesPath = $skinPath . 'images/';
     $allSheduled = GetAllSheduled($availableServices, $login);
     $allActivated = GetAllActivated($availableServices, $login);
     $cells = la_TableCell(__('Service name'));
     $cells .= la_TableCell(__('Status'));
     $rows = la_TableRow($cells, 'row1');
     if (!empty($availableServices)) {
         foreach ($availableServices as $eachService) {
             $each = explode(":", $eachService);
             $name = $each[0];
             $tagid = $each[1];
             if (!empty($allSheduled)) {
                 foreach ($allSheduled as $eachSheduled) {
                     if ($eachSheduled['param'] == $tagid) {
                         $cells = la_TableCell($name);
                         $action = '';
                         if ($eachSheduled['action'] == 'tagadd') {
                             $action = __('activated');
                         }
                         if ($eachSheduled['action'] == 'tagdel') {
                             $action = __('deactivated');
                         }
                         $cells .= la_TableCell(__('Sheduled') . ' ' . __($action) . ' ' . la_JSAlert('?module=adservice&delete_shedule=' . $eachSheduled['param'], la_img($imagesPath . 'delete.gif'), __('You realy want to abort service activation') . '?'));
                         $rows .= la_TableRow($cells, 'row3');
                     }
                 }
             }
             if (!empty($allActivated)) {
                 foreach ($allActivated as $eachActivated) {
                     if ($eachActivated['tagid'] == $tagid) {
                         $cells = la_TableCell($name);
                         $cells .= la_TableCell(__('Active') . la_JSAlert('?module=adservice&delete_service=' . $eachActivated['tagid'], la_img($imagesPath . 'delete.gif'), __('You realy want to deactivate service') . '?'));
                         $rows .= la_TableRow($cells, 'row3');
                     }
                 }
             }
         }
     }
     $table = la_TableBody($rows, '100%', 0, '');
     return $table;
 }
Пример #4
0
/**
 * Renders new/unread announcements notification
 * 
 * @return void
 */
function zbs_AnnouncementsNotice()
{
    $result = '';
    if (zbs_AnnouncementsAvailable()) {
        $cells = la_TableCell(la_Link('?module=announcements', la_img('iconz/alert.gif'), true, ''));
        $cells .= la_TableCell(la_Link('?module=announcements', __('Some announcements are available'), true, ''));
        $rows = la_TableRow($cells);
        $result .= la_TableBody($rows, '70%', 0, '');
        show_window('', $result);
    }
}
Пример #5
0
 /**
  * Renders previously generated user documents 
  * 
  * @return string
  */
 public function renderUserDocuments()
 {
     $cells = la_TableCell(__('ID'));
     $cells .= la_TableCell(__('Date'));
     $cells .= la_TableCell(__('Document name'));
     $rows = la_TableRow($cells, 'row1');
     if (!empty($this->userDocuments)) {
         foreach ($this->userDocuments as $io => $each) {
             $cells = la_TableCell($each['id']);
             $cells .= la_TableCell($each['date']);
             @($templateName = $this->templates[$each['templateid']]['name']);
             $downloadLink = la_Link('?module=zdocs&documentdownload=' . $each['id'], $templateName, false, '');
             $cells .= la_TableCell($downloadLink);
             $rows .= la_TableRow($cells, 'row3');
         }
     }
     $result = la_TableBody($rows, '100%', '0', '');
     return $result;
 }
Пример #6
0
/**
 * Returns table with tariff change pricing
 * 
 * @param array $tc_tariffsallowed
 * @param string $us_currency
 * @param string $user_tariff
 * @param float $tc_priceup
 * @param float $tc_pricedown
 * @param float $tc_pricesimilar
 * @return string
 */
function zbs_TariffGetShowPrices($tc_tariffsallowed, $us_currency, $user_tariff, $tc_priceup, $tc_pricedown, $tc_pricesimilar)
{
    $allprices = zbs_TariffGetAllPrices();
    $allcosts = zbs_TariffGetChangePrice($tc_tariffsallowed, $user_tariff, $tc_priceup, $tc_pricedown, $tc_pricesimilar);
    $cells = la_TableCell(__('Tariff'));
    $cells .= la_TableCell(__('Monthly fee'));
    $cells .= la_TableCell(__('Cost of change'));
    $rows = la_TableRow($cells, 'row1');
    if (!empty($tc_tariffsallowed)) {
        foreach ($tc_tariffsallowed as $eachtariff) {
            $cells = la_TableCell(__($eachtariff));
            $cells .= la_TableCell(@$allprices[$eachtariff] . ' ' . $us_currency);
            $cells .= la_TableCell(@$allcosts[$eachtariff] . ' ' . $us_currency);
            $rows .= la_TableRow($cells, 'row2');
        }
    }
    $result = la_TableBody($rows, '100%', 0);
    return $result;
}
Пример #7
0
 function zbs_CatvShowPayments($catv_payments)
 {
     $monthnames = zbs_months_array_wz();
     if (!empty($catv_payments)) {
         $cells = la_TableCell(__('Date'));
         $cells .= la_TableCell(__('Cash'));
         $cells .= la_TableCell(__('Month'));
         $cells .= la_TableCell(__('Year'));
         $rows = la_TableRow($cells, 'row1');
         foreach ($catv_payments as $io => $each) {
             $cells = la_TableCell($each['date']);
             $cells .= la_TableCell($each['summ']);
             $cells .= la_TableCell(__($monthnames[$each['from_month']]));
             $cells .= la_TableCell($each['from_year']);
             $rows .= la_TableRow($cells, 'row3');
         }
         $result = la_TableBody($rows, '100%', '0', '');
         show_window(__('CaTV payments'), $result);
     } else {
         show_window(__('Sorry'), __('No payments to display'));
     }
 }
Пример #8
0
 /**
  * Returns list of available direct messages
  * 
  * @global string $user_login
  * @return string
  */
 function zbs_MessagesShowMy()
 {
     global $user_login;
     $allmymessages = zbs_MessagesGetAllMy($user_login);
     $cells = la_TableCell(__('Date'));
     $cells .= la_TableCell(__('Message'));
     $rows = la_TableRow($cells, 'row1');
     if (!empty($allmymessages)) {
         foreach ($allmymessages as $io => $eachmessage) {
             $cells = la_TableCell($eachmessage['date']);
             $cells .= la_TableCell($eachmessage['text']);
             $rows .= la_TableRow($cells, 'row2');
         }
     }
     $result = la_TableBody($rows, '100%', 0);
     return $result;
 }
Пример #9
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;
 }
Пример #10
0
 /**
  * Renders list of previous user payments
  * 
  * @param int $userid
  * 
  * @return string
  */
 public function renderUserPayments($userid)
 {
     $userid = vf($userid, 3);
     $result = '';
     $query = "SELECT * from `ukv_payments` WHERE `visible`='1' AND `userid`='" . $userid . "' ORDER BY `id` DESC;";
     $all = simple_queryall($query);
     if (!empty($all)) {
         $cells = la_TableCell(__('Date'));
         $cells .= la_TableCell(__('Payment'));
         $cells .= la_TableCell(__('Balance'));
         $rows = la_TableRow($cells, 'row1');
         foreach ($all as $io => $each) {
             $cells = la_TableCell($each['date']);
             $cells .= la_TableCell($each['summ']);
             $cells .= la_TableCell($each['balance']);
             $rows .= la_TableRow($cells, 'row3');
         }
         $result = la_TableBody($rows, '100%', '0');
     } else {
         $result = __('No payments to display');
     }
     return $result;
 }
Пример #11
0
<?php

$user_ip = zbs_UserDetectIp('debug');
$user_login = zbs_UserGetLoginByIp($user_ip);
$us_config = zbs_LoadConfig();
if ($us_config['ZL_ENABLED']) {
    $zl_options = $us_config['ZL_OPTIONS'];
    if (!empty($zl_options)) {
        $zl_options = explode(',', $zl_options);
        $rows = '';
        if (!empty($zl_options)) {
            foreach ($zl_options as $eachlink) {
                $ldata = explode('|', $eachlink);
                $icon = $ldata[0];
                $url = $ldata[1];
                $title = $ldata[2];
                $cells = la_TableCell(la_Link($url, la_img($icon)));
                $cells .= la_TableCell(la_tag('h3') . la_Link($url, $title) . la_tag('h3', true));
                $rows .= la_TableRow($cells);
            }
        }
        $result = la_TableBody($rows, '', 0);
        show_window(__('Downloads'), $result);
    }
} else {
    show_window(__('Sorry'), __('Unfortunately downloads are now disabled'));
}
Пример #12
0
 /**
  * Renders list of available subscribtions
  * 
  * @return string
  */
 public function renderSubscribtions()
 {
     $result = '';
     $iconsPath = zbs_GetCurrentSkinPath($this->usConfig) . 'iconz/';
     if (!empty($this->allSubscribers)) {
         $cells = la_TableCell(__('Date'));
         $cells .= la_TableCell(__('Tariff'));
         $cells .= la_TableCell(__('Active'));
         $cells .= la_TableCell(__('Primary'));
         $cells .= la_TableCell(__('Free period'));
         $rows = la_TableRow($cells, 'row1');
         foreach ($this->allSubscribers as $io => $each) {
             if ($each['login'] == $this->userLogin) {
                 $freePeriodFlag = $each['freeperiod'] ? la_img($iconsPath . 'anread.gif') : la_img($iconsPath . 'anunread.gif');
                 $primaryFlag = $each['primary'] ? la_img($iconsPath . 'anread.gif') : la_img($iconsPath . 'anunread.gif');
                 $activeFlag = $each['active'] ? la_img($iconsPath . 'anread.gif') : la_img($iconsPath . 'anunread.gif');
                 $cells = la_TableCell($each['actdate']);
                 $cells .= la_TableCell(@$this->allTariffs[$each['tariffid']]['name']);
                 $cells .= la_TableCell($activeFlag);
                 $cells .= la_TableCell($primaryFlag);
                 $cells .= la_TableCell($freePeriodFlag);
                 $rows .= la_TableRow($cells, 'row2');
             }
         }
         $result = la_TableBody($rows, '100%', 0);
         $result .= la_tag('br');
         $result .= __('To view the purchased subscription register or log in to Megogo.net, by clicking the button below');
     }
     return $result;
 }