コード例 #1
0
ファイル: view.html.php プロジェクト: smhnaji/sdnet
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() !== 'modal') {
         SibdietHelper::addSubmenu('profiles');
     }
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->permissions = SibdietHelper::getUserPermissions();
     if ($this->getLayout() !== 'modal') {
         // Calculate profile refer No.
         foreach ($this->items as $item) {
             $item->referNo = SibdietHelper::getReferNo($item->id);
         }
         $this->addToolbar();
         $this->sidebar = JHtmlSidebar::render();
     }
     if (in_array('profiles', $this->permissions) || $this->getLayout() == 'modal') {
         parent::display($tpl);
     }
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: smhnaji/sdnet
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     SibdietHelper::addSubmenu('requestschecks');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->permissions = SibdietHelper::getUserPermissions();
     // Calculate profile refer No.
     foreach ($this->items as $item) {
         $item->referNo = SibdietHelper::getReferNo($item->profiles_id);
         // Convert the payment field to an array.
         $registry = new JRegistry();
         $registry->loadString($item->payment);
         $item->payment = $registry->toArray();
     }
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     if (in_array('requestschecks', $this->permissions)) {
         parent::display($tpl);
     }
 }