Пример #1
0
 function display($cachable = false, $urlparams = false)
 {
     //$view = JRequest::getCmd('view', 'lic');
     //$layout = JRequest::getCmd('layout', 'main');
     //$id      = JRequest::getInt('id');
     $mName = 'lic';
     if ($model = $this->getModel($mName)) {
     } else {
         echo "Ошибка!!! Нет модели.";
     }
     $row = $model->getDataOfLic();
     //print_r($row);
     if (empty($row)) {
         $this->lic = -1;
         echo '<h2>Внимание!!! Ошибка. Пользователь не обнаружен в базе лицевых счетов.</h2>';
     } else {
         foreach ($row as $rows) {
         }
         if ($rows->lic == 1) {
             $this->lic = 1;
         } else {
             $this->lic = 0;
         }
     }
     //echo $this->lic;
     JRequest::setVar('lic', $this->lic);
     // задаем вид по умолчанию для компонента если в адресной строке не будет передан view
     //$this->default_view = 'tsj';
     // получаем текущий вид и передаем ему управление
     parent::display($cachable, $urlparams);
 }
 public function display($cachable = false, $url_params = false)
 {
     $user =& JFactory::getUser();
     $view = JRequest::getVar("view");
     if ($view == 'advancedopenportal') {
         JRequest::setVar("view", "listcases");
         $view = "listcases";
     }
     if (SugarCasesConnection::isValidPortalUser($user) && !SugarCasesConnection::isUserBlocked($user)) {
         parent::display($cachable, $url_params);
     } else {
         if (!$user->id) {
             $msg = JText::_('COM_ADVANCEDOPENPORTAL_LOGIN_REQUIRED');
         } elseif (SugarCasesConnection::isUserBlocked($user)) {
             $msg = JText::_('COM_ADVANCEDOPENPORTAL_PORTAL_USER_BLOCKED');
         } else {
             $msg = JText::_('COM_ADVANCEDOPENPORTAL_NO_PORTAL_ACCOUNT');
         }
         if ($view != 'listcases') {
             JFactory::getApplication()->redirect(JURI::base(), $msg, 'error');
         } else {
             JFactory::getApplication()->enqueueMessage($msg, 'error');
             parent::display($cachable, $url_params);
         }
     }
 }
Пример #3
0
 /**
  * display task
  *
  * @param bool  $cachable
  * @param array $urlparams
  *
  * @throws Exception
  * @return void
  */
 function display($cachable = false, $urlparams = [])
 {
     // set default view if not set
     $input = JFactory::getApplication()->input;
     // call parent behavior
     parent::display($cachable);
 }
Пример #4
0
 /**
  * Typical view method for MVC based architecture
  *
  * This function is provide as a default implementation, in most cases
  * you will need to override it in your own controllers.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JControllerLegacy  A JControllerLegacy object to support chaining.
  */
 public function display($cachable = false, $urlparams = array())
 {
     $input = JFactory::getApplication()->input;
     $input->set('view', $input->get('view', 'dashboard'));
     $input->set('task', $input->get('task', 'display'));
     return parent::display($cachable, $urlparams);
 }
Пример #5
0
 function add()
 {
     $swt = JRequest::getVar('swt', '');
     JRequest::setVar('view', 'swtturnierinfo');
     JRequest::setVar('swt', $swt);
     parent::display();
 }
Пример #6
0
 /**
  * display the edit form
  * @return void
  */
 function edit()
 {
     JRequest::setVar('view', 'wall_detail');
     JRequest::setVar('layout', 'form');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
 function showExtras()
 {
     //$log = Logger::getInstance(JPATH_COMPONENT."/logs/site-log-".date("d-m-Y").'.log',1);
     //$log->LogDebug("showExtras");
     //add room if does not exist
     $reservedItems = JRequest::getVar("reservedItems");
     $hotelId = JRequest::getVar("hotelId");
     UserDataService::updateRooms($hotelId, $reservedItems);
     $userData = UserDataService::getUserData();
     $userData->hotelId = $hotelId;
     $appSetting = JHotelUtil::getApplicationSettings();
     if (!isset($userData->currency)) {
         $hotel = HotelService::getHotel($hotelId);
         UserDataService::setCurrency($hotel->hotel_currency, $hotel->currency_symbol);
     }
     //dump($userData->reservedItems);
     //dump($userData->hotelId);
     //$log->LogDebug(serialize($userData->reservedItems));
     $model = $this->getModel("ExtraOptions");
     $extraOptions = $model->getExtraOptions();
     if (count($extraOptions) > 0 && PROFESSIONAL_VERSION == 1 && $appSetting->is_enable_extra_options) {
         //dump("show extra view");
         JRequest::setVar("view", "extraoptions");
         parent::display();
     } else {
         if (count($userData->reservedItems) < $userData->rooms) {
             $this->setRedirect(JRoute::_('index.php?option=com_jhotelreservation&task=hotel.showHotel&hotel_id=' . $userData->hotelId . "&reservedItems=" . $reservedItems, false));
         } else {
             $this->setRedirect(JRoute::_('index.php?option=com_jhotelreservation&view=guestDetails&reservedItems=' . $reservedItems, false));
         }
     }
     //exit;
     //$log->LogDebug(serialize($userData->reservedItems));
     //$log->LogDebug("End showExtras");
 }
 public function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     $id = $app->input->getInt('id');
     $layout = $app->input->get('layout', 'default');
     $view = $app->input->get('view', $this->default_view);
     // _setUIX
     $this->_setUIX($view, $layout);
     if (!($view == 'box' || $view == 'form' || $view == 'list')) {
         require_once JPATH_COMPONENT . '/helpers/helper_admin.php';
         require_once JPATH_COMPONENT . '/helpers/helper_folder.php';
         if (!($layout == 'edit' || $layout == 'edit2')) {
             if (!(JCck::on() && $view == $this->default_view)) {
                 Helper_Admin::addSubmenu($this->default_view, $view);
             }
         }
         if ($view == 'template' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.template', $id) || $view == 'type' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.type', $id) || $view == 'field' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.field', $id) || $view == 'search' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.search', $id) || $view == 'folder' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.folder', $id) || $view == 'site' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.site', $id) || $view == 'version' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.version', $id)) {
             // $this->setError( JText::sprintf( 'JLIB_APPLICATION_ERROR_UNHELD_ID', $id ) );
             // $this->setMessage( $this->getError(), 'error' );
             // $this->setRedirect( JRoute::_( CCK_LINK.'&view='.$view.'s', false ) );
             // return false;
         }
     }
     parent::display();
     return $this;
 }
Пример #9
0
 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     $cachable = true;
     $safeurlparams = array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD');
     parent::display($cachable, $safeurlparams);
     return $this;
 }
Пример #10
0
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/djimageslider.php';
     DJImageSliderHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
     parent::display();
     return $this;
 }
Пример #11
0
 function next()
 {
     $model = $this->getModel('swtturniererg');
     if ($model->store()) {
         $rfirst = JRequest::getVar('rfirst');
         $rlast = JRequest::getVar('rlast');
         $rrange = JRequest::getVar('rrange');
         $rcount = JRequest::getVar('rcount');
         $this->_message = JText::_('SWT_STORE_SUCCESS');
         if ($rlast == $rcount) {
             JRequest::setVar('view', 'swt');
             JFactory::getApplication()->enqueueMessage(JText::_('SWT_STORE_SUCCESS'), 'message');
             parent::display();
         } else {
             JRequest::setVar('rfirst', $rlast + 1);
             JRequest::setVar('view', 'swtturniererg');
             parent::display();
         }
         /*		JRequest::setVar('view', 'swt');
         			JFactory::getApplication()->enqueueMessage( JText::_( 'SWT_STORE_SUCCESS' ),'message' );
         			parent::display (); */
     } else {
         JRequest::setVar('view', 'swtturniererg');
         JFactory::getApplication()->enqueueMessage(JFactory::getDBO()->getErrorMsg(), 'error');
         parent::display();
     }
 }
Пример #12
0
 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   boolean  $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  TemplatesController  This object to support chaining.
  *
  * @since   1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     $view = $this->input->get('view', 'styles');
     $layout = $this->input->get('layout', 'default');
     $id = $this->input->getInt('id');
     $document = JFactory::getDocument();
     // For JSON requests
     if ($document->getType() == 'json') {
         $view = new TemplatesViewStyle();
         // Get/Create the model
         if ($model = new TemplatesModelStyle()) {
             $model->addTablePath(JPATH_ADMINISTRATOR . '/components/com_templates/tables');
             // Push the model into the view (as default)
             $view->setModel($model, true);
         }
         $view->document = $document;
         return $view->display();
     }
     // Check for edit form.
     if ($view == 'style' && $layout == 'edit' && !$this->checkEditId('com_templates.edit.style', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_templates&view=styles', false));
         return false;
     }
     return parent::display();
 }
Пример #13
0
 public function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     $app->input->set('view', $app->input->get('view', 'dashboard'));
     $view = $app->input->get('view', 'dashboard');
     $layout = $app->input->get('layout', 'default');
     $id = $app->input->getInt('id', 0);
     switch ($view) {
         case 'category':
         case 'document':
             $redirect = 'listcats';
             break;
         case 'dashboard':
             $redirect = 'dashboard';
             break;
         default:
             $redirect = $view . 's';
             break;
     }
     if ($view && $layout == 'edit' && !$this->checkEditId('com_judownload.edit.' . $view, $id)) {
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_judownload&view=' . $redirect, false));
         return false;
     }
     parent::display($cachable, $urlparams);
     return $this;
 }
Пример #14
0
 /**
  * Method to display a view.
  *
  * @param   boolean       $cachable  If true, the view output will be cached
  * @param   array|boolean $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}
  *
  * @return  JController    This object to support chaining.
  *
  * @since   1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     $view = $this->input->get('view', 'modules');
     $layout = $this->input->get('layout', 'default');
     $id = $this->input->getInt('id');
     $document = JFactory::getDocument();
     // For JSON requests
     if ($document->getType() == 'json') {
         $view = new ModulesViewModule();
         // Get/Create the model
         if ($model = new ModulesModelModule()) {
             // Checkin table entry
             if (!$model->checkout($id)) {
                 JFactory::getApplication()->enqueueMessage(JText::_('JLIB_APPLICATION_ERROR_CHECKIN_USER_MISMATCH'), 'error');
                 return false;
             }
             // Push the model into the view (as default)
             $view->setModel($model, true);
         }
         $view->document = $document;
         return $view->display();
     }
     require_once JPATH_COMPONENT . '/helpers/modules.php';
     // Load the submenu.
     ModulesHelper::addSubmenu($this->input->get('view', 'modules'));
     return parent::display();
 }
Пример #15
0
 function modal()
 {
     JRequest::setVar('layout', 'modal');
     JRequest::setVar('view', 'events');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
Пример #16
0
 function edit()
 {
     JRequest::setVar('layout', 'form');
     JRequest::setVar('view', 'countries');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
Пример #17
0
 /**
  * {@inheritdoc}
  *
  * @param   boolean $cachable  If Joomla should cache the response
  * @param   array   $urlParams URL parameters
  *
  * @return JController
  */
 public function display($cachable = false, $urlParams = array())
 {
     $input = $this->input;
     $view = $input->getCmd('view', 'dashboard');
     $app = JFactory::getApplication();
     if (NenoSettings::get('installation_completed') != 1 && $view != 'installation' && $view != 'debug' && $app->isAdmin()) {
         if ($view != 'dashboard') {
             $app->enqueueMessage(JText::_('COM_NENO_INSTALLATION_ERROR'), 'error');
         }
         $app->redirect('index.php?option=com_neno&view=installation');
     }
     $input->set('view', $view);
     // Ensure that a working language is set for some views
     $viewsThatRequireWorkingLanguage = array('groupselements', 'editor', 'strings');
     $showLanguagesDropDown = false;
     if (in_array($view, $viewsThatRequireWorkingLanguage)) {
         // Get working language
         $workingLanguage = NenoHelper::getWorkingLanguage();
         $languages = JFactory::getLanguage()->getKnownLanguages();
         $showLanguagesDropDown = true;
         if (empty($workingLanguage) || !in_array($workingLanguage, array_keys($languages))) {
             $url = JRoute::_('index.php?option=com_neno&view=setworkinglang&next=' . $view, false);
             $this->setRedirect($url);
             $this->redirect();
         }
     }
     NenoHelperBackend::setAdminTitle($showLanguagesDropDown);
     parent::display($cachable, $urlParams);
     return $this;
 }
Пример #18
0
 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached.
  * @param   boolean  $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  This object to support chaining.
  *
  * @since   1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     $cachable = true;
     /**
      * Set the default view name and format from the Request.
      * Note we are using a_id to avoid collisions with the router and the return page.
      * Frontend is a bit messier than the backend.
      */
     $id = $this->input->getInt('a_id');
     $vName = $this->input->getCmd('view', 'categories');
     $this->input->set('view', $vName);
     $user = JFactory::getUser();
     if ($user->get('id') || $this->input->getMethod() == 'POST' && ($vName == 'category' && $this->input->get('layout') != 'blog' || $vName == 'archive')) {
         $cachable = false;
     }
     $safeurlparams = array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT');
     // Check for edit form.
     if ($vName == 'form' && !$this->checkEditId('com_content.edit.article', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         return JError::raiseError(403, JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
     }
     if ($vName == 'article' && $cachable) {
         // Get/Create the model
         if ($model = $this->getModel($vName)) {
             $model->hit();
         }
     }
     parent::display($cachable, $safeurlparams);
     return $this;
 }
Пример #19
0
 /**
  * display task
  *
  * @return void
  */
 function display($cachable = false, $urlparams = array())
 {
     // set default view if not set
     JRequest::setVar('view', JRequest::getCmd('view', 'websockets'));
     // call parent behavior
     parent::display($cachable, $urlparams);
 }
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/djmediatools.php';
     DJMediatoolsHelper::addSubmenu($view = JRequest::getCmd('view', 'cpanel'));
     parent::display();
     return $this;
 }
Пример #21
0
 public function save()
 {
     $task = JRequest::getVar('task', null, 'POST');
     $view = JRequest::getVar('view', '');
     $model = $this->getModel('tudien', 'DmttcnModel');
     if ($model->storeData()) {
         $msg = 'Xử lý thành công!';
     } else {
         $msg = 'Xử lý lỗi.';
     }
     if ($task == 'savenew') {
         $link = 'index.php?option=com_dmttcn&controller=' . $view . '&task=edit';
         $this->setRedirect($link, $msg);
     } else {
         if ($task == 'save') {
             $link = 'index.php?option=com_dmttcn&controller=' . $view;
             $this->setRedirect($link, $msg);
         } else {
             $post = JRequest::get('post');
             JRequest::setVar('post', $post);
             JRequest::setVar('view', $view);
             JRequest::setVar('layout', 'edit');
             parent::display();
         }
     }
 }
Пример #22
0
 /**
  * display task
  *
  * @return void
  */
 function display($cachable = false, $urlparams = false)
 {
     // set default view if not set
     $view = $this->input->getCmd('view', '###SITE_DEFAULT_VIEW###');
     $isEdit = $this->checkEditView($view);
     $layout = $this->input->get('layout', null, 'WORD');
     $id = $this->input->getInt('id');
     $cachable = true;
     // Check for edit form.
     if ($isEdit) {
         if ($layout == 'edit' && !$this->checkEditId('com_componentbuilder.edit.' . $view, $id)) {
             // Somehow the person just went to the form - we don't allow that.
             $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
             $this->setMessage($this->getError(), 'error');
             // check if item was opend from other then its own list view
             $ref = $this->input->getCmd('ref', 0);
             $refid = $this->input->getInt('refid', 0);
             // set redirect
             if ($refid > 0 && ComponentbuilderHelper::checkString($ref)) {
                 // redirect to item of ref
                 $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
             } elseif (ComponentbuilderHelper::checkString($ref)) {
                 // redirect to ref
                 $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=' . (string) $ref, false));
             } else {
                 // normal redirect back to the list default site view
                 $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=###SITE_DEFAULT_VIEW###', false));
             }
             return false;
         }
     }
     return parent::display($cachable, $urlparams);
 }
Пример #23
0
 function display($cachable = false, $urlparams = array())
 {
     // set default view if not set
     JRequest::setVar("view", JFactory::getApplication()->input->get("view", "Dashboard"));
     // call parent behavior
     parent::display($cachable, $urlparams);
 }
Пример #24
0
 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController  A JController object to support chaining.
  *
  * @since	2.0
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Get the document object.
     $document = JFactory::getDocument();
     // Get the input class
     $input = JFactory::getApplication()->input;
     // Set the default view name and format from the Request.
     $vName = $input->get('view', 'default', 'cmd');
     $vFormat = $document->getType();
     $lName = $input->get('layout', 'default', 'cmd');
     $id = $input->get('id', null, 'cmd');
     if ($vName == 'default') {
         $input->set('view', 'settings');
         $input->set('layout', 'base');
         $lName = $input->get('layout', 'default', 'cmd');
         $vName = 'settings';
     }
     // Check for edit form.
     if ($vName == 'item' && $lName == 'edit' && !$this->checkEditId('com_shconfig.edit.item', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_shconfig&view=items', false));
         return false;
     }
     // Add the submenu
     ShconfigHelper::addSubmenu($vName, $lName);
     parent::display($cachable, $urlparams);
     return $this;
 }
Пример #25
0
 function display($cachable = false, $urlparams = false)
 {
     switch (JRequest::getVar('task')) {
         case 'login':
             $this->LoginJUser();
             break;
         case 'create':
             $this->create_user();
             break;
         case 'create_proceed':
             $this->create_proceed();
             break;
         case 'logout':
             $this->logout();
             break;
         case 'switch':
             $this->distroy_fb_session();
             break;
         default:
             break;
     }
     switch (JRequest::getVar('view')) {
         default:
             JRequest::setVar('view', 'fbconnct');
     }
     parent::display();
 }
 public function display($cachable = false, $urlparams = false)
 {
     // Load the submenu.
     $this->addSubmenu($this->input->getWord('option', 'com_checkin'));
     parent::display();
     return $this;
 }
Пример #27
0
 public function display($cachable = false, $urlparams = array())
 {
     $viewName = $this->input->getCmd('view', 'dashboard');
     $this->input->set("view", $viewName);
     parent::display();
     return $this;
 }
Пример #28
0
 /**
  * Display the view
  *
  * @param   bool   $cachable   If true, the view output will be cached
  * @param   array  $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  void
  */
 public function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     $this->default_view = 'home';
     require_once JPATH_COMPONENT . '/helpers/fabrik.php';
     parent::display();
 }
Пример #29
0
 public function display($cachable = false, $urlparams = false)
 {
     JRequest::setVar('view', JRequest::getCmd('view', 'Orphans'));
     if (isset($_POST['_orphanaction']) && $_POST['_orphanaction'] == "zipIt") {
         $file = tempnam("tmp", "zip");
         $zip = new ZipArchive();
         $zip->open($file, ZipArchive::OVERWRITE);
         foreach ($_POST['tozip'] as $_file) {
             $zip->addFile(JPATH_ROOT . "/" . $_file, $_file);
         }
         $zip->close();
         header('Content-Type: application/zip');
         header('Content-Length: ' . filesize($file));
         header('Content-Disposition: attachment; filename="orphans.zip"');
         readfile($file);
         unlink($file);
         die;
     } else {
         if (isset($_POST['_orphanaction']) && $_POST['_orphanaction'] == "delete" && isset($_POST['_confirmAction'])) {
             foreach ($_POST['tozip'] as $_file) {
                 unlink(JPATH_ROOT . "/" . $_file);
             }
         }
     }
     // call parent behavior
     parent::display($cachable);
 }
Пример #30
0
 /**
  * display task
  *
  * @return void
  */
 function display($cachable = false, $urlparams = false)
 {
     // set default view if not set
     $view = $this->input->getCmd('view', 'Costbenefitprojection');
     $data = $this->getViewRelation($view);
     $layout = $this->input->get('layout', null, 'WORD');
     $id = $this->input->getInt('id');
     // Check for edit form.
     if (CostbenefitprojectionHelper::checkArray($data)) {
         if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_costbenefitprojection.edit.' . $data['view'], $id)) {
             // Somehow the person just went to the form - we don't allow that.
             $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
             $this->setMessage($this->getError(), 'error');
             // check if item was opend from other then its own list view
             $ref = $this->input->getCmd('ref', 0);
             $refid = $this->input->getInt('refid', 0);
             // set redirect
             if ($refid > 0 && CostbenefitprojectionHelper::checkString($ref)) {
                 // redirect to item of ref
                 $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
             } elseif (CostbenefitprojectionHelper::checkString($ref)) {
                 // redirect to ref
                 $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=' . (string) $ref, false));
             } else {
                 // normal redirect back to the list view
                 $this->setRedirect(JRoute::_('index.php?option=com_costbenefitprojection&view=' . $data['views'], false));
             }
             return false;
         }
     }
     return parent::display($cachable, $urlparams);
 }