예제 #1
2
 /**
  * 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)
 {
     require_once JPATH_COMPONENT . '/helpers/users.php';
     // Load the submenu.
     UsersHelper::addSubmenu(JRequest::getCmd('view', 'users'));
     $view = JRequest::getCmd('view', 'users');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     if (!$this->canView($view)) {
         JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         return;
     }
     // Check for edit form.
     if ($view == 'user' && $layout == 'edit' && !$this->checkEditId('com_users.edit.user', $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_users&view=users', false));
         return false;
     } elseif ($view == 'group' && $layout == 'edit' && !$this->checkEditId('com_users.edit.group', $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_users&view=groups', false));
         return false;
     } elseif ($view == 'level' && $layout == 'edit' && !$this->checkEditId('com_users.edit.level', $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_users&view=levels', false));
         return false;
     }
     return parent::display();
 }
 function remove()
 {
     $cid = JRequest::getVar('cid', array(), 'default', 'array');
     $id = JRequest::getInt('id');
     if (empty($id)) {
         if (!empty($cid) && is_array($cid)) {
             foreach ($cid as $id) {
                 $result = $this->_remove($id);
                 if (!$result) {
                     $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), JText::_('FILTER_ERROR_INVALIDID'), 'error');
                     $this->redirect();
                     return;
                 }
             }
         } else {
             $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), JText::_('FILTER_ERROR_INVALIDID'), 'error');
             $this->redirect();
             return;
         }
     } else {
         $result = $this->_remove($id);
         if (!$result) {
             $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), $this->getError(), 'error');
             $this->redirect();
             return;
         }
     }
     $this->setRedirect(JURI::base() . 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=' . JRequest::getCmd('tpl'), JText::_('FILTER_MSG_DELETED'));
     parent::display();
 }
예제 #3
1
 /**
  * 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)
 {
     require_once JPATH_COMPONENT . '/helpers/menus.php';
     // Load the submenu.
     MenusHelper::addSubmenu(JRequest::getCmd('view'));
     $view = JRequest::getCmd('view', 'menus');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     // Check for edit form.
     if ($view == 'menu' && $layout == 'edit' && !$this->checkEditId('com_menus.edit.menu', $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_menus&view=menus', false));
         return false;
     } elseif ($view == 'item' && $layout == 'edit' && !$this->checkEditId('com_menus.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_menus&view=items', false));
         return false;
     }
     parent::display();
     return $this;
 }
예제 #4
0
 function display($cachable = false, $urlparams = false)
 {
     // set default view if not set
     JRequest::setVar('view', JRequest::getCmd('view', 'dashboard'));
     // call parent behavior
     parent::display($cachable);
 }
 public function edit()
 {
     JRequest::setVar('view', 'attributeprices_detail');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
예제 #6
0
 public function iframe()
 {
     AEPlatform::getInstance()->load_configuration(AEPlatform::getInstance()->get_active_profile());
     parent::display();
     flush();
     JFactory::getApplication()->close();
 }
예제 #7
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)
 {
     require_once JPATH_COMPONENT . '/helpers/search.php';
     // Load the submenu.
     SearchHelper::addSubmenu(JRequest::getCmd('view', 'searches'));
     parent::display();
 }
예제 #8
0
 /**
  * Display the view
  */
 function display($cachable = false)
 {
     if (!JRequest::getCmd('view')) {
         JRequest::setVar('view', 'hotelguide');
     }
     parent::display($cachable);
 }
예제 #9
0
 /**
  * display the edit form
  * @return void
  */
 function edit()
 {
     JRequest::setVar('view', 'company');
     JRequest::setVar('layout', 'form');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
예제 #10
0
파일: media.php 프로젝트: sangkasi/joomla
 function display()
 {
     $view = JRequest::getCmd('view');
     $theme = JRequest::getVar('theme');
     switch ($view) {
         case 'imageslist':
             if (!empty($theme)) {
                 JRequest::setVar('layout', 'showcase');
             } else {
                 JRequest::setVar('layout', 'default');
             }
             JRequest::setVar('view', 'mediaimageslist');
             JRequest::setVar('model', 'mediaimageslist');
             break;
         default:
             if (!empty($theme)) {
                 JRequest::setVar('layout', 'showcase');
             } else {
                 JRequest::setVar('layout', 'default');
             }
             JRequest::setVar('view', 'media');
             JRequest::setVar('model', 'media');
             break;
     }
     parent::display();
 }
예제 #11
0
파일: controller.php 프로젝트: rhotog/myApi
	function display() {
        // Make sure we have a default view
        if( !JRequest::getVar( 'view' )) {
		    JRequest::setVar('view', 'myapi' );
        }
		parent::display();
	}
예제 #12
0
 /**
  * This method controlles the display methods
  */
 function display()
 {
     global $mainframe;
     switch ($this->getTask()) {
         case 'jucene_about':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'jucene_about');
             JRequest::setVar('view', 'jucene');
             break;
         case 'index':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'jucene_index');
             JRequest::setVar('view', 'jucene');
             $this->index();
             break;
         case 'continue':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'jucene_continue');
             JRequest::setVar('view', 'jucene');
             JRequest::setVar('edit', true);
             break;
         default:
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'default');
             JRequest::setVar('view', 'jucene');
             JRequest::setVar('edit', true);
             break;
     }
     parent::display();
 }
예제 #13
0
파일: controller.php 프로젝트: grlf/eyedock
 function display()
 {
     switch ($this->getTask()) {
         case 'add':
             JRequest::setVar('hidemainmenu', 1);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'company');
             JRequest::setVar('edit', false);
             break;
         case 'edit':
             JRequest::setVar('hidemainmenu', 1);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'company');
             JRequest::setVar('edit', true);
             break;
         case 'report':
             JRequest::setVar('hidemainmenu', 1);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'report');
             JRequest::setVar('edit', false);
             break;
     }
     //Set the default view, just in case
     $view = JRequest::getCmd('view');
     if (empty($view)) {
         JRequest::setVar('view', 'companies');
     }
     parent::display();
 }
예제 #14
0
 function edit()
 {
     JRequest::setVar('view', 'bookmark');
     JRequest::setVar('layout', 'edit');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
 /**
  * Method to display the view
  *
  * @access	public
  */
 function display()
 {
     if (JRequest::getCmd('view') == '') {
         JRequest::setVar('view', 'main');
     }
     parent::display();
 }
예제 #16
0
 public function preview()
 {
     JRequest::setVar('view', 'stockroom_detail');
     JRequest::setVar('layout', 'default_product');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
예제 #17
0
 function dealCouponMgmt()
 {
     $this->checkAccess();
     JRequest::setVar('view', 'merchant');
     JRequest::setVar('task', 'dealCouponMgmt');
     parent::display();
 }
예제 #18
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();
 }
예제 #19
0
 public function display($cachable = false, $urlparams = false)
 {
     // Load the submenu.
     $this->addSubmenu(JRequest::getWord('option', 'com_checkin'));
     parent::display();
     return $this;
 }
예제 #20
0
 function display()
 {
     switch (JRequest::getVar('view')) {
         case "testimonials":
             JRequest::setVar('view', 'eztestimonials');
             break;
         case "edit":
             JRequest::setVar('view', 'editbox');
             break;
         default:
             JRequest::setVar('view', 'eztestimonials');
     }
     switch (JRequest::getVar('task')) {
         case "remove":
             AdminTestimonController::delete();
             break;
         case "unpublish":
             AdminTestimonController::unpublish();
             break;
         case "publish":
             AdminTestimonController::publish();
             break;
         case "save":
             AdminTestimonController::saveEdit();
             break;
     }
     parent::display();
 }
예제 #21
0
파일: flex.php 프로젝트: sangkasi/joomla
 function display()
 {
     $layout = JRequest::getVar('layout');
     JRequest::setVar('layout', $layout);
     JRequest::setVar('view', 'flex');
     parent::display();
 }
예제 #22
0
 function display()
 {
     if (!JRequest::getCmd('view')) {
         JRequest::setVar('view', 'animals');
     }
     parent::display();
 }
예제 #23
0
 function edit()
 {
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     JRequest::setVar('view', 'careerleveledit');
     parent::display();
 }
예제 #24
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' => 'INT', 'limitstart' => 'INT', '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;
 }
예제 #25
0
 public function edit()
 {
     JRequest::setVar('view', 'giftcard_detail');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
예제 #26
0
 public function display()
 {
     // Only admin can use this function to invite guests
     $jxConfig = new JXConfig();
     $my = JXFactory::getUser();
     $mainframe = JFactory::getApplication();
     $accessHelper = new AccountAccessHelper();
     if (!$my->authorise('stream.setting.edit', $accessHelper)) {
         $mainframe->redirect(JURI::base(), JText::_('COM_ACCOUNT_ERRMSG_INVITATION_DENIED'), 'error');
     }
     if ($_POST) {
         jimport('joomla.utilities.xintegration');
         // Check if there is ad_integration posted and if the value is activedirectory
         // by comparing with xintegration library for supported integrations
         $adIntegration = JRequest::getString('ad_integration', '');
         if (!empty($adIntegration) && JXIntegration::isActiveDirectory($adIntegration)) {
             $integrationTbl = JTable::getInstance('integration', 'AccountTable');
             $integrationTbl->load(array('name' => $adIntegration));
             $integrationTbl->setParam('dc', JRequest::getString('ad_dc', ''));
             $integrationTbl->setParam('dm', JRequest::getString('ad_dm', ''));
             if (JRequest::getString('ad_pw', '') != '') {
                 $integrationTbl->setParam('pw', JRequest::getString('ad_pw', ''));
             }
             $integrationTbl->setParam('un', JRequest::getString('ad_un', ''));
             $integrationTbl->setParam('hi', JRequest::getString('ad_hi', ''));
             if (!$integrationTbl->store()) {
                 $mainframe->redirect(JRoute::_('index.php?option=com_account&view=integration'), $integrationTbl->getError(), 'error');
             }
             $mainframe->redirect(JRoute::_('index.php?option=com_account&view=integration'), JText::_('COM_ACCOUNT_ACTION_SAVE_INTEGRATION_SUCCESS!'));
         }
     }
     parent::display();
 }
예제 #27
0
 public function display($cachable = false, $urlparams = false)
 {
     if (JRequest::getCmd('option') != 'com_content' && JRequest::getCmd('view') != 'article') {
         JError::raiseError(403, 'Direct access to this component is unauthorized.');
     }
     return parent::display();
 }
예제 #28
0
 /**
  * Display task
  */
 public function display($cachable = false)
 {
     // Set default view if not set
     JRequest::setVar('view', JRequest::getCmd('view', 'SocialLogin'));
     // Call parent behavior
     parent::display($cachable);
 }
예제 #29
0
 function display()
 {
     if (!JRequest::getWord('view', null)) {
         JRequest::setVar('view', 'daily');
     }
     parent::display();
 }
예제 #30
0
 function clearCache()
 {
     JRequest::setVar('view', 'wordbridge');
     JRequest::setVar('layout', 'clear_cache');
     JRequest::setVar('format', 'raw');
     parent::display();
 }