Пример #1
0
 /**
  * Display the view
  *
  * @return  string  The rendered view.
  *
  * @since   3.2
  *
  */
 public function render()
 {
     $form = null;
     $component = null;
     try {
         $form = $this->model->getForm();
         $component = $this->model->getComponent();
         $user = JFactory::getUser();
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
         return false;
     }
     // Bind the form to the data.
     if ($form && $component->params) {
         $form->bind($component->params);
     }
     $this->form =& $form;
     $this->component =& $component;
     $this->components = ConfigHelperConfig::getComponentsWithConfig();
     ConfigHelperConfig::loadLanguageForComponents($this->components);
     $this->userIsSuperAdmin = $user->authorise('core.admin');
     $this->currentComponent = JFactory::getApplication()->input->get('component');
     $this->return = JFactory::getApplication()->input->get('return', '', 'base64');
     $this->addToolbar();
     JFactory::getApplication()->input->set('hidemainmenu', true);
     return parent::render();
 }
Пример #2
0
 /**
  * Method to display the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.2
  */
 public function render()
 {
     $form = null;
     $data = null;
     try {
         // Load Form and Data
         $form = $this->model->getForm();
         $data = $this->model->getData();
         $user = JFactory::getUser();
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
         return false;
     }
     // Bind data
     if ($form && $data) {
         $form->bind($data);
     }
     // Get the params for com_users.
     $usersParams = JComponentHelper::getParams('com_users');
     // Get the params for com_media.
     $mediaParams = JComponentHelper::getParams('com_media');
     // Load settings for the FTP layer.
     $ftp = JClientHelper::setCredentialsFromRequest('ftp');
     $this->form =& $form;
     $this->data =& $data;
     $this->ftp =& $ftp;
     $this->usersParams =& $usersParams;
     $this->mediaParams =& $mediaParams;
     $this->components = ConfigHelperConfig::getComponentsWithConfig();
     ConfigHelperConfig::loadLanguageForComponents($this->components);
     $this->userIsSuperAdmin = $user->authorise('core.admin');
     $this->addToolbar();
     return parent::render();
 }
Пример #3
0
 /**
  * Display the view
  *
  * @return  string  The rendered view.
  *
  * @since   3.2
  *
  */
 public function render()
 {
     $form = null;
     $component = null;
     try {
         $form = $this->model->getForm();
         $component = $this->model->getComponent();
         $user = JFactory::getUser();
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
         return false;
     }
     // Bind the form to the data.
     if ($form && $component->params) {
         $form->bind($component->params);
     }
     $this->fieldsets = $form->getFieldsets();
     // Don't show permissions fieldset if not authorised.
     if (!$user->authorise('core.admin', $component->option) && isset($this->fieldsets['permissions'])) {
         unset($this->fieldsets['permissions']);
     }
     $this->form =& $form;
     $this->component =& $component;
     $this->components = ConfigHelperConfig::getComponentsWithConfig();
     ConfigHelperConfig::loadLanguageForComponents($this->components);
     $this->userIsSuperAdmin = $user->authorise('core.admin');
     $this->currentComponent = JFactory::getApplication()->input->get('component');
     $this->return = JFactory::getApplication()->input->get('return', '', 'base64');
     $this->addToolbar();
     return parent::render();
 }
Пример #4
0
 /**
  * Method to display the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.2
  */
 public function render()
 {
     $form = null;
     $data = null;
     try {
         // Load Form and Data
         $form = $this->model->getForm();
         $data = $this->model->getData();
         $user = JFactory::getUser();
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
         return false;
     }
     // Bind data
     if ($form && $data) {
         $form->bind($data);
     }
     $this->form =& $form;
     $this->data =& $data;
     $this->components = ConfigHelperConfig::getComponentsWithConfig();
     ConfigHelperConfig::loadLanguageForComponents($this->components);
     $this->userIsSuperAdmin = $user->authorise('core.admin');
     $this->addToolbar();
     return parent::render();
 }
Пример #5
0
 /**
  * Method to display the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.2
  */
 public function render()
 {
     $form = null;
     $data = null;
     try {
         // Load Form and Data
         $form = $this->model->getForm();
         $data = $this->model->getData();
         $user = JFactory::getUser();
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
         return false;
     }
     // Bind data
     if ($form && $data) {
         $form->bind($data);
     }
     // Get the params for com_users.
     $usersParams = JComponentHelper::getParams('com_users');
     // Get the params for com_media.
     $mediaParams = JComponentHelper::getParams('com_media');
     // Load settings for the FTP layer.
     $ftp = JClientHelper::setCredentialsFromRequest('ftp');
     $this->form =& $form;
     $this->data =& $data;
     $this->ftp =& $ftp;
     $this->usersParams =& $usersParams;
     $this->mediaParams =& $mediaParams;
     $this->components = ConfigHelperConfig::getComponentsWithConfig();
     ConfigHelperConfig::loadLanguageForComponents($this->components);
     $this->userIsSuperAdmin = $user->authorise('core.admin');
     // Add strings for translations in Javascript.
     JText::script('COM_CONFIG_SENDMAIL_JS_ERROR_CONNECTION_ABORT');
     JText::script('COM_CONFIG_SENDMAIL_JS_ERROR_NO_CONTENT');
     JText::script('COM_CONFIG_SENDMAIL_JS_ERROR_OTHER');
     JText::script('COM_CONFIG_SENDMAIL_JS_ERROR_PARSE');
     JText::script('COM_CONFIG_SENDMAIL_JS_ERROR_TIMEOUT');
     $this->addToolbar();
     return parent::render();
 }
Пример #6
0
$document->addStyleSheet('modules/mod_menu_adv/css/custom.css');
$document->addScript('modules/mod_menu_adv/js/custom.js');
$shownew = (bool) $params->get('shownew', 1);
$showhelp = $params->get('showhelp', 1);
$user = JFactory::getUser();
$lang = JFactory::getLanguage();
/*
 * Site Submenu
 */
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_SYSTEM'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_CONTROL_PANEL'), 'index.php', 'class:cpanel'));
if ($user->authorise('core.admin')) {
    $menu->addSeparator();
    $menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_CONFIGURATION'), 'index.php?option=com_config', 'class:config'), true);
    $components = ConfigHelperConfig::getComponentsWithConfig();
    ConfigHelperConfig::loadLanguageForComponents($components);
    foreach ($components as $component) {
        $menu->addChild(new JMenuNode(JText::_($component), 'index.php?option=com_config&view=component&component=' . $component));
    }
    $menu->getParent();
}
if ($user->authorise('core.manage', 'com_checkin')) {
    $menu->addSeparator();
    $menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_GLOBAL_CHECKIN'), 'index.php?option=com_checkin', 'class:checkin'));
}
if ($user->authorise('core.manage', 'com_cache')) {
    $menu->addSeparator();
    $menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_CLEAR_CACHE'), 'index.php?option=com_cache', 'class:clear'));
    $menu->addChild(new JMenuNode(JText::_('MOD_MENU_ADV_PURGE_EXPIRED_CACHE'), 'index.php?option=com_cache&view=purge', 'class:purge'));
}
if ($user->authorise('core.admin')) {