Example #1
0
 /** 
  *	@brief	Méthode init qui recupere la liste de resultats
  *	@details	Affiche la liste de contenus
  *
  */
 public function init()
 {
     $id = request::get('id');
     $module = $this->getModule();
     $list = new List_Frameview();
     $views = users::getProfile();
     if (isset($views['view'][$module]['list']['filter'])) {
         $list->setFilter($views['view'][$module]['list']['filter']);
     }
     CoreController::share($this, $list);
     $listContent = $list->renderSTR();
     $this->assign('listContent', $listContent);
 }
Example #2
0
 /**
  *	Surcharge de l'init
  *	
  *	Recupere le module et genere une liste de prévisuatisation
  *	
  */
 public function init()
 {
     $list = new List_View();
     $modules = $this->getModule();
     CoreController::share($this, $list);
     $list->setFilter($this->filter);
     $list->setNbr($list->nbr);
     $listContent = $list->renderSTR();
     $this->assign('total', $list->total);
     $this->assign('start', 0);
     $this->assign('list', $listContent);
     $this->assign('mainmodule', ucfirst($modules));
 }
Example #3
0
 public function init()
 {
     $module = $this->getModule();
     $list = new List_Frameview();
     $views = users::getProfile();
     $list->setFilter($views['view'][$module]['dashlet']['filter']);
     $list->setNbr(3);
     CoreController::share($this, $list);
     $listContent = $list->renderSTR();
     $total = $list->getTotal();
     $this->assign('listContent', $listContent);
     $this->assign('module', $module);
     $this->assign('total', $total);
 }
Example #4
0
 /**
  * @brief		Methode d'initialisation du frameview
  * @details		Méthode qui gere l'ensemble de la pagination
  * @return	null
  */
 public function init()
 {
     $list = new List_View();
     $modules = $this->getModule();
     CoreController::share($this, $list);
     $commande = request::get('commande');
     $start = request::get('start');
     // Si le filtre n'est pas set alors je recupere celui dans l'url
     if (!$this->filter) {
         $filter = request::get('filter');
         $this->setFilter($filter);
     }
     $list->setFilter($this->filter);
     if ($this->nbr) {
         $list->setNbr($this->nbr);
     }
     if ($start == "") {
         $start = 0;
     }
     $prevStart = $start - $list->nbr;
     $nextStart = $start + $list->nbr;
     $list->setStart($start);
     $listContent = $list->renderSTR();
     if ($list->total < $list->nbr) {
         $nextStart = $start;
     }
     if ($start + $list->nbr > $list->total) {
         $nextStart = $start;
     }
     if ($start - $list->nbr < 0) {
         $prevStart = $start;
     }
     $this->setTotal($list->total);
     $this->assign('total', $list->total);
     $this->assign('start', $start);
     $this->assign('nextStart', $nextStart);
     $this->assign('prevStart', $prevStart);
     $this->assign('list', $listContent);
     $this->assign('mainmodule', ucfirst($modules));
 }
Example #5
0
 /**
  *	@brief methode appelé quand l'utilisateur est connectée
  */
 public function whenConnected()
 {
     if ($this->action != "") {
         $moduleName = ucfirst($this->module);
         $actionName = ucfirst($this->action);
         $customName = 'Modules_' . $moduleName . '_' . $actionName;
         $coreName = 'Module_' . $actionName;
         if (CoreController::controllerExists($customName)) {
             $ctrName = $customName;
         } elseif (CoreController::controllerExists($coreName)) {
             $ctrName = $coreName;
         }
         $obj = new $ctrName();
         CoreController::share($this, $obj);
         $this->assign('right', $obj->renderSTR());
     }
     $allModules = ModuleManager::getAllModules();
     $this->assign('topLinks', $allModules);
     $obj = new Sidebar_View();
     $obj->setModulesList($allModules);
     $this->assign('left', $obj->renderSTR());
     $this->assign('sidebar', true);
 }
Example #6
0
<?php

// DO NOT FORGET: "LESS IS MORE"
session_start();
require_once "./api.php";
$main = new Main();
$ctr = new Controller();
$ctr->setAction(request::get("action"));
$ctr->setModule(request::get("controller"));
$ctr->setFormat(request::get("format"));
CoreController::share($ctr, $main);
$main->assign('content', $ctr);
$main->render();