static function get($app = false, $data = false) { if (!$app) { return false; } $apps = App::getAppList(); if (!array_key_exists($app, $apps)) { return false; } $app_dir = $apps[$app] . DS . APP_CONFIG_DIR . DS; if (!file_exists($app_dir . 'rights.php')) { return false; } $rights = (include $app_dir . 'rights.php'); return self::createTemplate($rights, true, $app, $data); }
public function uploadAction() { $this->model->load('Category'); $category = new Category(); $this->model->load('App'); $app = new App(); $data = array('title' => 'index', 'current_cat' => '', 'apps' => $app->getAppList(), 'topApps' => $app->getAppsDownloadest(), 'categories' => $category->getCatList()); $this->loadView('upload', $data); }
function __construct($app) { $this->app = $app; $list = App::getAppList(); $this->dir = $list[$this->app] . DS . APP_LOCALE . DS; }