function zbs_AnnouncementsShow() { $query = "SELECT * from `zbsannouncements` WHERE `public`='1' ORDER by `id` DESC"; $all = simple_queryall($query); $result = ''; if (!empty($all)) { foreach ($all as $io => $each) { if (!isset($_COOKIE['zbsanread_' . $each['id']])) { $readControl = la_Link('?module=announcements&anmarkasread=' . $each['id'], la_img('iconz/anunread.gif', __('Mark as read'))) . ' '; } else { $readControl = la_Link('?module=announcements&anmarkasunread=' . $each['id'], la_img('iconz/anread.gif', __('Mark as unread'))) . ' '; } $result .= la_tag('h3', false, 'row1', '') . $readControl . $each['title'] . ' ' . la_tag('h3', true); $result .= la_delimiter(); if ($each['type'] == 'text') { $eachtext = strip_tags($each['text']); $result .= nl2br($eachtext); } if ($each['type'] == 'html') { $result .= $each['text']; } $result .= la_delimiter(); } } else { show_window(__('Sorry'), __('There are not any announcements.')); } show_window('', $result); }
/** * * @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; }
/** * 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); } }
/** * Returns available tickets list * * @global string $user_login * @return string */ function zbs_TicketsShowMy() { global $user_login; $allmytickets = zbs_TicketsGetAllMy($user_login); $cells = la_TableCell(__('ID')); $cells .= la_TableCell(__('Date')); $cells .= la_TableCell(__('Status')); $cells .= la_TableCell(__('Actions')); $rows = la_TableRow($cells, 'row1'); if (!empty($allmytickets)) { foreach ($allmytickets as $io => $eachticket) { if ($eachticket['status']) { $ticketstatus = la_img('iconz/anread.gif') . ' ' . __('Closed'); } else { $ticketstatus = la_img('iconz/anunread.gif') . ' ' . __('Open'); } $cells = la_TableCell($eachticket['id']); $cells .= la_TableCell($eachticket['date']); $cells .= la_TableCell($ticketstatus); $cells .= la_TableCell(la_Link('?module=ticketing&showticket=' . $eachticket['id'], __('View'))); $rows .= la_TableRow($cells, 'row2'); } } $result = la_TableBody($rows, '100%', 0); return $result; }
/** * sets ISP name and others propertys to external scope * * @return void */ public function setTemplateData() { global $templateData; $templateData['ISP_NAME'] = $this->optionIspName; $templateData['ISP_URL'] = $this->optionIspUrl; $templateData['ISP_LOGO'] = $this->optionIspLogo; if (!empty($this->optionIspName) and !empty($this->optionIspUrl) and !empty($this->optionIspLogo)) { $templateData['ISP_LINK'] = la_Link($this->optionIspUrl, la_img($this->optionIspLogo, $this->optionIspName), false); } else { $templateData['ISP_LINK'] = ''; } $templateData['SIDEBAR_TEXT'] = $this->optionSidebarText; $templateData['GREETING_TEXT'] = $this->optionGreetingText; }
<?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')); }
/** * 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; }
/** * Returns ticket with all replies * * @param int $ticketid * @return string */ function zbs_TicketShowWithReplies($ticketid) { global $us_config; $curSkinPath = zbs_GetCurrentSkinPath($us_config); $iconzPath = $curSkinPath . 'iconz/'; $ticketid = vf($ticketid, 3); $ticketdata = zbs_TicketGetData($ticketid); $ticketreplies = zbs_TicketGetReplies($ticketid); if (!empty($ticketdata)) { $ticketAva = la_img($iconzPath . 'userava.png'); $cells = la_TableCell(__('User')); $cells .= la_TableCell($ticketdata['date']); $rows = la_TableRow($cells, 'row1'); $cells = la_TableCell($ticketAva, '', '', 'valign="top"'); $cells .= la_TableCell(nl2br($ticketdata['text'])); $rows .= la_TableRow($cells, 'row2'); } if (!empty($ticketreplies)) { foreach ($ticketreplies as $io => $eachreply) { if ($eachreply['from'] == 'NULL') { $ticketAva = la_img($iconzPath . 'admava.png'); $ticketFrom = __('Support'); } else { $ticketAva = la_img($iconzPath . 'userava.png'); $ticketFrom = __('User'); } $cells = la_TableCell($ticketFrom); $cells .= la_TableCell($eachreply['date']); $rows .= la_TableRow($cells, 'row1'); $cells = la_TableCell($ticketAva, '', '', 'valign="top"'); $cells .= la_TableCell(nl2br($eachreply['text'])); $rows .= la_TableRow($cells, 'row3'); } } $result = la_TableBody($rows, '100%', 0); return $result; }