public function __construct(Application $app)
 {
     parent::__construct($app, __CLASS__);
     $this->logoHost = $this->baseHost . \Config::getSafe('portal_url', '/stalker_portal/') . "misc/logos";
     $this->logoDir = str_replace('/admin', '', $this->baseDir) . "/misc/logos";
     $this->app['error_local'] = array();
     $this->app['baseHost'] = $this->baseHost;
 }
 public function __construct(Application $app)
 {
     parent::__construct($app, __CLASS__);
     $this->formEvent = array(array("id" => "send_msg", "title" => $this->setlocalization('Sending a message')), array("id" => "reboot", "title" => $this->setlocalization('Reboot')), array("id" => "reload_portal", "title" => $this->setlocalization('Restart the portal')), array("id" => "update_channels", "title" => $this->setlocalization('Update channel list')), array("id" => "play_channel", "title" => $this->setlocalization('Playback channel')), array("id" => "play_radio_channel", "title" => $this->setlocalization('Playback radio channel')), array("id" => "mount_all_storages", "title" => $this->setlocalization('Mount all storages')), array("id" => "cut_off", "title" => $this->setlocalization('Turn off')), array("id" => "update_image", "title" => $this->setlocalization('Image update')));
     $this->hiddenEvent = array(array("id" => "update_epg", "title" => $this->setlocalization('EPG update')), array("id" => "update_subscription", "title" => $this->setlocalization('Subscribe update')), array("id" => "update_modules", "title" => $this->setlocalization('Modules update')), array("id" => "cut_on", "title" => $this->setlocalization('Turn on')), array("id" => "show_menu", "title" => $this->setlocalization('Show menu')), array("id" => "additional_services_status", "title" => $this->setlocalization('Status additional service')));
     $this->sendedStatus = array(array("id" => 1, "title" => $this->setlocalization('Not delivered')), array("id" => 2, "title" => $this->setlocalization('Delivered')));
     $this->receivingStatus = array(array("id" => 1, "title" => $this->setlocalization('Not received')), array("id" => 2, "title" => $this->setlocalization('Received')));
     $this->scheduleType = array(array("id" => 1, "title" => $this->setlocalization('One-time event')), array("id" => 2, "title" => $this->setlocalization('For a period')));
     $this->scheduleState = array(array("id" => 2, "title" => $this->setlocalization('Scheduled')), array("id" => 1, "title" => $this->setlocalization('Stopped')));
     $this->repeatingInterval = array(array("id" => 1, "title" => $this->setlocalization('Year')), array("id" => 2, "title" => $this->setlocalization('Month')), array("id" => 3, "title" => $this->setlocalization('Week')), array("id" => 4, "title" => $this->setlocalization('Day')));
     $this->monthNames = array(array("id" => 1, "title" => $this->setlocalization('January')), array("id" => 2, "title" => $this->setlocalization('February')), array("id" => 3, "title" => $this->setlocalization('March')), array("id" => 4, "title" => $this->setlocalization('April')), array("id" => 5, "title" => $this->setlocalization('May')), array("id" => 6, "title" => $this->setlocalization('June')), array("id" => 7, "title" => $this->setlocalization('July')), array("id" => 8, "title" => $this->setlocalization('August')), array("id" => 9, "title" => $this->setlocalization('September')), array("id" => 10, "title" => $this->setlocalization('October')), array("id" => 11, "title" => $this->setlocalization('November')), array("id" => 12, "title" => $this->setlocalization('December')));
     $this->dayNames = array(array("id" => 1, "title" => $this->setlocalization('Mon')), array("id" => 2, "title" => $this->setlocalization('Tue')), array("id" => 3, "title" => $this->setlocalization('Wed')), array("id" => 4, "title" => $this->setlocalization('Thu')), array("id" => 5, "title" => $this->setlocalization('Fri')), array("id" => 6, "title" => $this->setlocalization('Sat')), array("id" => 7, "title" => $this->setlocalization('Sun')));
     $this->app['defTTL'] = array('send_msg' => 7 * 24 * 3600, 'send_msg_with_video' => 7 * 24 * 3600, 'other' => \Config::get('watchdog_timeout') * 2);
 }
 private function getConfigOptionalyFormField($field_name, $config_option)
 {
     $return_opt = array('name' => $field_name, 'type' => 'hidden', 'option' => array());
     if (\Config::getSafe($config_option, false)) {
         $return_opt['type'] = 'checkbox';
         $return_opt['option'] = array('required' => false);
     }
     return $return_opt;
 }
 private function getLogoUriById($id = FALSE, $row = FALSE, $resolution = 320)
 {
     $channel = $row === FALSE ? $this->db->getChannelById($id) : $row;
     if (empty($channel['logo'])) {
         return "";
     }
     return \Config::get('portal_url') . 'misc/logos/' . $resolution . '/' . $channel['logo'];
 }
 private function get_option_services()
 {
     $option_services = \Config::getSafe('option_services', array());
     $result = array_map(function ($item) {
         return array('id' => $item, 'name' => $item);
     }, $option_services);
     return $result;
 }
 private function getUsersListDropdownAttribute()
 {
     $attribute = array(array('name' => 'mac', 'title' => 'MAC', 'checked' => TRUE), array('name' => 'ip', 'title' => 'IP', 'checked' => TRUE), array('name' => 'login', 'title' => $this->setLocalization('Login'), 'checked' => TRUE), array('name' => 'ls', 'title' => $this->setLocalization('Account'), 'checked' => TRUE), array('name' => 'fname', 'title' => $this->setLocalization('Name'), 'checked' => TRUE), array('name' => 'now_playing_type', 'title' => $this->setLocalization('Type'), 'checked' => FALSE), array('name' => 'now_playing_content', 'title' => $this->setLocalization('Media'), 'checked' => FALSE), array('name' => 'last_change_status', 'title' => $this->setLocalization('Last modified'), 'checked' => TRUE), array('name' => 'state', 'title' => $this->setLocalization('State'), 'checked' => TRUE), array('name' => 'status', 'title' => $this->setLocalization('Status'), 'checked' => TRUE));
     if (empty($this->app['reseller'])) {
         $attribute[] = array('name' => 'reseller_name', 'title' => $this->setLocalization('Reseller'), 'checked' => TRUE);
     }
     if (\Config::getSafe('enable_internal_billing', 'false')) {
         $attribute[] = array('name' => 'expire_billing_date', 'title' => $this->setLocalization('Expire billing date'), 'checked' => TRUE);
     }
     $attribute[] = array('name' => 'operations', 'title' => $this->setLocalization('Operations'), 'checked' => TRUE);
     return $attribute;
 }
Example #7
0
<?php

/**
 * View controller
 * 
 * @category Random
 * @package  Todo.LisT
 * @author   Paolo Profetto <*****@*****.**>
 * @license  Free http://www.free.com
 * @link     www.none.com
 */
// var_dump($ini_array);
// error_reporting(-1);
// ini_set('display_errors', 'On');
require '../vendor/autoload.php';
// require '../module/settings.php';
session_start();
use Controller\PageRouter;
use Controller\Config;
Config::setEnv();
new PageRouter($_GET);
 protected function getCoverFolder($id)
 {
     $dir_name = ceil($id / 100);
     $dir_path = realpath(PROJECT_PATH . '/../' . \Config::getSafe('screenshots_path', 'screenshots/')) . '/' . $dir_name;
     if (!is_dir($dir_path)) {
         umask(0);
         if (!mkdir($dir_path, 0777)) {
             return -1;
         } else {
             return $dir_path;
         }
     } else {
         return $dir_path;
     }
 }