/**
  * Configure the Linkbar.
  *
  * @param	string	The name of the active view.
  */
 public static function addSubmenu($vName)
 {
     Submenu::addEntry(Lang::txt('COM_LANGUAGES_SUBMENU_INSTALLED_SITE'), Route::url('index.php?option=com_languages&view=installed&client=0'), $vName == 'installed');
     Submenu::addEntry(Lang::txt('COM_LANGUAGES_SUBMENU_INSTALLED_ADMINISTRATOR'), Route::url('index.php?option=com_languages&view=installed&client=1'), $vName == 'installed');
     Submenu::addEntry(Lang::txt('COM_LANGUAGES_SUBMENU_CONTENT'), Route::url('index.php?option=com_languages&view=languages'), $vName == 'languages');
     Submenu::addEntry(Lang::txt('COM_LANGUAGES_SUBMENU_OVERRIDES'), Route::url('index.php?option=com_languages&view=overrides'), $vName == 'overrides');
 }
 /**
  * Configure the Linkbar.
  *
  * @param	string	The name of the active view.
  */
 public static function addSubmenu($vName)
 {
     Submenu::addEntry(Lang::txt('COM_NEWSFEEDS_SUBMENU_NEWSFEEDS'), Route::url('index.php?option=com_newsfeeds&view=newsfeeds'), $vName == 'newsfeeds');
     Submenu::addEntry(Lang::txt('COM_NEWSFEEDS_SUBMENU_CATEGORIES'), Route::url('index.php?option=com_categories&extension=com_newsfeeds'), $vName == 'categories');
     if ($vName == 'categories') {
         Toolbar::title(Lang::txt('COM_CATEGORIES_CATEGORIES_TITLE', Lang::txt('com_newsfeeds')), 'newsfeeds-categories');
     }
 }
Exemple #3
0
 /**
  * Atualiza um submenu
  * @param  [type] $submenu_id    id do submenu a ser atualizado
  * @param  string $submenu_icon  nome do novo icone, pode ser referente a glyphicons do bootstrap(http://getbootstrap.com/components/)
  * ou os icônes do font awesome (http://fortawesome.github.io/Font-Awesome/3.2.1/icons/)
  * @param  string $submenu_name  Nome do novo submenu
  * @param  string $submenu_href  Endereço que deve acessar
  * @param  int $submenu_order Ordem de exibição dos submenus
  * @return boolean                Verdadeiro caso sucesso ou falso caso ocorra algum erro
  */
 public function updateSubmenu($submenu_id, $submenu_icon, $submenu_name, $submenu_href, $submenu_order)
 {
     $submenu = Submenu::findFirstBySubmenu_id($submenu_id);
     $submenu->submenu_icon = $submenu_icon;
     $submenu->submenu_name = $submenu_name;
     $submenu->submenu_href = $submenu_href;
     $submenu->submenu_order = $submenu_order;
     $return = $submenu->save();
     return $return;
 }
Exemple #4
0
 /**
  * Configure the Linkbar.
  *
  * @param	string	$vName	The name of the active view.
  *
  * @return	void
  * @since	1.6
  */
 public static function addSubmenu($vName)
 {
     Submenu::addEntry(Lang::txt('JGLOBAL_ARTICLES'), Route::url('index.php?option=com_content&view=articles'), $vName == 'articles');
     Submenu::addEntry(Lang::txt('COM_CONTENT_SUBMENU_CATEGORIES'), Route::url('index.php?option=com_categories&extension=com_content'), $vName == 'categories');
     /*Submenu::addEntry(
     			Lang::txt('COM_CONTENT_SUBMENU_FEATURED'),
     			Route::url('index.php?option=com_content&view=featured'),
     			$vName == 'featured'
     		);*/
 }
Exemple #5
0
 /**
  * Get the items of the submenu and display them.
  *
  * @return  void
  */
 public function display()
 {
     if (!\App::isAdmin() || !class_exists('\\Submenu')) {
         return;
     }
     // Initialise variables.
     $list = \Submenu::getItems();
     if (!is_array($list) || !count($list)) {
         return;
     }
     require $this->getLayoutPath($this->params->get('layout', 'default'));
 }
Exemple #6
0
 /**
  * Returns the global JToolBar object, only creating it if it
  * doesn't already exist.
  *
  * @param   string  $name  The name of the toolbar.
  *
  * @return  JToolBar  The JToolBar object.
  *
  * @since   11.1
  */
 public static function getInstance($name = 'toolbar')
 {
     if ($name == 'toolbar' && class_exists('\\Toolbar')) {
         return \Toolbar::getRoot();
     }
     if ($name == 'submenu' && class_exists('\\Submenu')) {
         return \Submenu::getRoot();
     }
     if (empty(self::$instances[$name])) {
         self::$instances[$name] = new JToolBar($name);
     }
     return self::$instances[$name];
 }
Exemple #7
0
 /**
  * Configure the Linkbar.
  *
  * @param   string  $vName  The name of the active view.
  *
  * @return  void
  *
  * @since   1.6
  */
 public static function addSubmenu($vName)
 {
     Submenu::addEntry(Lang::txt('COM_USERS_SUBMENU_MEMBERS'), Route::url('index.php?option=com_members&view=users'), $vName == 'users');
     // Groups and Levels are restricted to core.admin
     $canDo = self::getActions();
     if ($canDo->get('core.admin')) {
         Submenu::addEntry(Lang::txt('COM_USERS_SUBMENU_GROUPS'), Route::url('index.php?option=com_users&view=groups'), $vName == 'groups');
         Submenu::addEntry(Lang::txt('COM_USERS_SUBMENU_LEVELS'), Route::url('index.php?option=com_users&view=levels'), $vName == 'levels');
         Submenu::addEntry(Lang::txt('COM_USERS_SUBMENU_NOTES'), Route::url('index.php?option=com_users&view=notes'), $vName == 'notes');
         $extension = Request::getString('extension');
         Submenu::addEntry(Lang::txt('COM_USERS_SUBMENU_NOTE_CATEGORIES'), Route::url('index.php?option=com_categories&extension=com_users'), $vName == 'categories' || $extension == 'com_users');
     }
 }
 /**
  * Configure the Linkbar.
  *
  * @param   string  $vName  The name of the active view.
  * @return  void
  */
 public static function addSubmenu($vName = 'install')
 {
     Submenu::addEntry(Lang::txt('COM_INSTALLER_SUBMENU_INSTALL'), Route::url('index.php?option=com_installer'), $vName == 'install');
     Submenu::addEntry(Lang::txt('COM_INSTALLER_SUBMENU_UPDATE'), Route::url('index.php?option=com_installer&controller=update'), $vName == 'update');
     Submenu::addEntry(Lang::txt('COM_INSTALLER_SUBMENU_MANAGE'), Route::url('index.php?option=com_installer&controller=manage'), $vName == 'manage');
     Submenu::addEntry(Lang::txt('COM_INSTALLER_SUBMENU_DISCOVER'), Route::url('index.php?option=com_installer&controller=discover'), $vName == 'discover');
     /*Submenu::addEntry(
     			Lang::txt('COM_INSTALLER_SUBMENU_DATABASE'),
     			Route::url('index.php?option=com_installer&controller=database'),
     			$vName == 'database'
     		);*/
     Submenu::addEntry(Lang::txt('COM_INSTALLER_SUBMENU_WARNINGS'), Route::url('index.php?option=com_installer&controller=warnings'), $vName == 'warnings');
     Submenu::addEntry(Lang::txt('COM_INSTALLER_SUBMENU_LANGUAGES'), Route::url('index.php?option=com_installer&controller=languages'), $vName == 'languages');
 }
Exemple #9
0
 public static function ipBeforeController()
 {
     //show admin submenu if needed
     if (ipRoute()->isAdmin()) {
         ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
         ipAddCss('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.css');
         $submenu = Submenu::getSubmenuItems();
         $submenu = ipFilter('ipAdminSubmenu', $submenu);
         if ($submenu) {
             ipResponse()->setLayoutVariable('submenu', $submenu);
         }
     }
     // Show admin toolbar if admin is logged in:
     if (ipAdminId() && !ipRequest()->getRequest('pa') || ipRequest()->getRequest('aa') && ipAdminId()) {
         if (!ipRequest()->getQuery('ipDesignPreview') && !ipRequest()->getQuery('disableAdminNavbar')) {
             ipAddJs('Ip/Internal/Admin/assets/admin.js');
             ipAddJsVariable('ipAdminNavbar', static::getAdminNavbarHtml());
         }
     }
     // Show popup with autogenerated user information if needed
     $adminIsAutogenerated = ipStorage()->get('Ip', 'adminIsAutogenerated');
     if ($adminIsAutogenerated) {
         $adminId = \Ip\Internal\Admin\Backend::userId();
         $admin = \Ip\Internal\Administrators\Model::getById($adminId);
         ipAddJs('Ip/Internal/Admin/assets/adminIsAutogenerated.js');
         $data = array('adminUsername' => $admin['username'], 'adminPassword' => ipStorage()->get('Ip', 'adminIsAutogenerated'), 'adminEmail' => $admin['email']);
         ipAddJsVariable('ipAdminIsAutogenerated', ipView('view/adminIsAutoGenerated.php', $data)->render());
     }
     if (ipContent()->getCurrentPage()) {
         // initialize management
         if (ipIsManagementState()) {
             if (!ipRequest()->getQuery('ipDesignPreview') && !ipRequest()->getQuery('disableManagement')) {
                 \Ip\Internal\Content\Helper::initManagement();
             }
         }
         //show page content
         $response = ipResponse();
         $response->setDescription(\Ip\ServiceLocator::content()->getDescription());
         $response->setKeywords(ipContent()->getKeywords());
         $response->setTitle(ipContent()->getTitle());
     }
 }
Exemple #10
0
 /**
  * @param \Ip\Menu\Item[] $menu
  * @param $info
  */
 public static function ipAdminMenu($menu, $info)
 {
     $urls = Submenu::getSubmenuUrls();
     $filteredMenu = array();
     //remove menu items that are in submenu
     foreach ($menu as $menuItem) {
         if (!in_array($menuItem->getUrl(), $urls)) {
             $filteredMenu[] = $menuItem;
         }
     }
     $submenuItems = Submenu::getSubmenuItems();
     if (!empty($submenuItems)) {
         $firstSubmenuItem = $submenuItems[0];
         $newItem = new \Ip\Internal\Admin\MenuItem();
         $newItem->setTitle(__('System', 'Ip-admin', false));
         $newItem->setUrl($firstSubmenuItem->getUrl());
         $newItem->setIcon('fa-cogs');
         $filteredMenu[] = $newItem;
     }
     return $filteredMenu;
 }
Exemple #11
0
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Kb\Admin;

if (!\User::authorise('core.manage', 'com_kb')) {
    throw new \Exception(\Lang::txt('JERROR_ALERTNOAUTHOR'), 403);
}
// Include scripts
require_once dirname(__DIR__) . DS . 'models' . DS . 'archive.php';
require_once __DIR__ . DS . 'helpers' . DS . 'html.php';
require_once __DIR__ . DS . 'helpers' . DS . 'permissions.php';
$controllerName = \Request::getCmd('controller', 'articles');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'articles';
}
\Submenu::addEntry(\Lang::txt('COM_KB_ARTICLES'), \Route::url('index.php?option=com_kb&controller=articles', false), $controllerName == 'articles');
\Submenu::addEntry(\Lang::txt('COM_KB_CATEGORIES'), \Route::url('index.php?option=com_categories&extension=com_kb', false));
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #12
0
 /**
  * Configure the Linkbar.
  *
  * @param	string	The name of the active view.
  */
 public static function addSubmenu($vName)
 {
     Submenu::addEntry(Lang::txt('COM_MENUS_SUBMENU_MENUS'), Route::url('index.php?option=com_menus&view=menus'), $vName == 'menus');
     Submenu::addEntry(Lang::txt('COM_MENUS_SUBMENU_ITEMS'), Route::url('index.php?option=com_menus&view=items'), $vName == 'items');
 }
Exemple #13
0
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
Submenu::addEntry(Lang::txt('COM_GROUPS_PAGES'), Route::url('index.php?option=com_groups&controller=pages&gid=' . $this->group->get('cn')), Request::getVar('controller', 'pages') == 'pages');
Submenu::addEntry(Lang::txt('COM_GROUPS_PAGES_CATEGORIES'), Route::url('index.php?option=com_groups&controller=categories&gid=' . $this->group->get('cn')), Request::getVar('controller', 'pages') == 'categories');
// load group params
$config = Component::params('com_groups');
// only show modules if Super group
if ($this->group->isSuperGroup() || $config->get('page_modules', 0)) {
    Submenu::addEntry(Lang::txt('COM_GROUPS_PAGES_MODULES'), Route::url('index.php?option=com_groups&controller=modules&gid=' . $this->group->get('cn')), Request::getVar('controller', 'pages') == 'modules');
}
Exemple #14
0
if (!\User::authorise('core.manage', 'com_support')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
include_once dirname(__DIR__) . DS . 'tables' . DS . 'ticket.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'watching.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'comment.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'message.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'attachment.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'category.php';
include_once dirname(__DIR__) . DS . 'helpers' . DS . 'utilities.php';
include_once dirname(__DIR__) . DS . 'helpers' . DS . 'acl.php';
$controllerName = \Request::getCmd('controller', 'tickets');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'tickets';
}
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_TICKETS'), \Route::url('index.php?option=com_support&controller=tickets'), $controllerName == 'tickets');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_CATEGORIES'), \Route::url('index.php?option=com_support&controller=categories'), $controllerName == 'categories');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_QUERIES'), \Route::url('index.php?option=com_support&controller=queries'), $controllerName == 'queries');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_MESSAGES'), \Route::url('index.php?option=com_support&controller=messages'), $controllerName == 'messages');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_STATUSES'), \Route::url('index.php?option=com_support&controller=statuses'), $controllerName == 'statuses');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_ABUSE'), \Route::url('index.php?option=com_support&controller=abusereports'), $controllerName == 'abusereports');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_STATS'), \Route::url('index.php?option=com_support&controller=stats'), $controllerName == 'stats');
\Submenu::addEntry(\Lang::txt('COM_SUPPORT_ACL'), \Route::url('index.php?option=com_support&controller=acl'), $controllerName == 'acl');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #15
0
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Wishlist\Admin;

// Authorization check
if (!\User::authorise('core.manage', 'com_wishlist')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
include_once dirname(__DIR__) . DS . 'tables' . DS . 'wishlist.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'owner.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'ownergroup.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'wish.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'wish' . DS . 'plan.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'wish' . DS . 'rank.php';
include_once dirname(__DIR__) . DS . 'tables' . DS . 'wish' . DS . 'attachment.php';
include_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
$controllerName = \Request::getCmd('controller', 'lists');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'lists';
}
\Submenu::addEntry(\Lang::txt('COM_WISHLIST_LISTS'), \Route::url('index.php?option=com_wishlist&controller=lists'), $controllerName == 'lists');
\Submenu::addEntry(\Lang::txt('COM_WISHLIST_WISHES'), \Route::url('index.php?option=com_wishlist&controller=wishes&wishlist=-1'), $controllerName == 'wishes');
\Submenu::addEntry(\Lang::txt('COM_WISHLIST_COMMENTS'), \Route::url('index.php?option=com_wishlist&controller=comments&wish=-1'), $controllerName == 'comments');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Initiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access.
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('Search: Setup Result Permissions'));
Toolbar::custom('saveRuleset', 'save', '', 'Save Ruleset', false);
Toolbar::cancel();
$this->css('solr');
$option = $this->option;
\Submenu::addEntry(Lang::txt('Overview'), 'index.php?option=' . $option . '&task=configure');
\Submenu::addEntry(Lang::txt('Search Index'), 'index.php?option=' . $option . '&task=searchindex');
\Submenu::addEntry(Lang::txt('Index Blacklist'), 'index.php?option=' . $option . '&task=manageBlacklist');
?>
<style>
/* Desktop View */
.search-container {
	background: #FFFFFF;
	height: 100%;
	width: 100%;
}

.search-container .inner {
	height: 100%;
	width: 100%;
	display:table;
}
Exemple #17
0
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Wiki\Admin;

// Authorization check
if (!\User::authorise('core.manage', 'com_wiki')) {
    return \App::abort(403, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
include_once dirname(__DIR__) . DS . 'helpers' . DS . 'parser.php';
include_once dirname(__DIR__) . DS . 'models' . DS . 'book.php';
// Initiate controller
$controllerName = \Request::getCmd('controller', 'pages');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'pages';
}
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
\Submenu::addEntry(\Lang::txt('COM_WIKI_PAGES'), \Route::url('index.php?option=com_wiki'), true);
require_once dirname(dirname(__DIR__)) . DS . 'com_plugins' . DS . 'admin' . DS . 'helpers' . DS . 'plugins.php';
if (\Components\Plugins\Admin\Helpers\Plugins::getActions()->get('core.manage')) {
    \Submenu::addEntry(\Lang::txt('COM_WIKI_PLUGINS'), \Route::url('index.php?option=com_plugins&view=plugins&filter_folder=wiki&filter_type=wiki'));
}
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
Exemple #18
0
 private function deleteSub($id_sub = null)
 {
     if (is_null($id_sub)) {
         return false;
     }
     $blocks = $this->getAllBlocks($id_sub);
     $del = true;
     if ($blocks && count($blocks) > 0) {
         foreach ($blocks as $bl) {
             $del &= $this->deleteBlock($bl['id_block']);
         }
     }
     if ($del) {
         $sub = new Submenu($id_sub);
         return $sub->delete();
     }
     return false;
 }
Exemple #19
0
require_once dirname(__DIR__) . DS . 'tables' . DS . 'password_rules.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'password_blacklist.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'quotas_classes.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'users_quotas.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
$controllerName = \Request::getCmd('controller', 'members');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'members';
}
$canDo = \Components\Members\Helpers\Permissions::getActions('component');
\Submenu::addEntry(\Lang::txt('COM_MEMBERS'), \Route::url('index.php?option=com_members'), $controllerName == 'members');
\Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_ONLINE'), \Route::url('index.php?option=com_members&controller=whosonline'), $controllerName == 'whosonline');
\Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_MESSAGING'), \Route::url('index.php?option=com_members&controller=messages'), $controllerName == 'messages');
if (\Component::params('com_members')->get('bankAccounts')) {
    \Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_POINTS'), \Route::url('index.php?option=com_members&controller=points'), $controllerName == 'points');
}
\Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_PLUGINS'), \Route::url('index.php?option=com_members&controller=plugins'), $controllerName == 'plugins');
if ($canDo->get('core.admin')) {
    \Submenu::addEntry(\Lang::txt('COM_MEMBERS_PASSWORDS'), \Route::url('index.php?option=com_members&controller=passwordrules'), $controllerName == 'passwordrules' || $controllerName == 'passwordblacklist');
}
\Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_QUOTAS'), \Route::url('index.php?option=com_members&controller=quotas'), $controllerName == 'quotas');
\Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_REGISTRATION'), \Route::url('index.php?option=com_members&controller=registration'), in_array($controllerName, array('registration', 'organizations', 'employers', 'incremental', 'premis')));
if ($canDo->get('core.admin')) {
    \Submenu::addEntry(\Lang::txt('COM_MEMBERS_MENU_IMPORT'), \Route::url('index.php?option=com_members&controller=import'), $controllerName == 'import' || $controllerName == 'importhooks');
}
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #20
0
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Alissa Nedossekina <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Answers\Admin;

if (!\User::authorise('core.manage', 'com_answers')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'economy.php';
require_once dirname(__DIR__) . DS . 'models' . DS . 'question.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
$controllerName = \Request::getCmd('controller', 'questions');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'questions';
}
\Submenu::addEntry(\Lang::txt('COM_ANSWERS_QUESTIONS'), \Route::url('index.php?option=com_answers'), $controllerName == 'questions');
\Submenu::addEntry(\Lang::txt('COM_ANSWERS_RESPONSES'), \Route::url('index.php?option=com_answers&controller=answers&qid=0'), $controllerName == 'answers');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// initiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
 /**
  * Configure the Linkbar.
  *
  * @param	string	The name of the active view.
  */
 public static function addSubmenu($vName)
 {
     Submenu::addEntry(Lang::txt('COM_TEMPLATES_SUBMENU_STYLES'), Route::url('index.php?option=com_templates&view=styles'), $vName == 'styles');
     Submenu::addEntry(Lang::txt('COM_TEMPLATES_SUBMENU_TEMPLATES'), Route::url('index.php?option=com_templates&view=templates'), $vName == 'templates');
 }
Exemple #22
0
 *
 * @package   hubzero-cms
 * @author    Alissa Nedossekina <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Store\Admin;

// Authorization check
if (!\User::authorise('core.manage', 'com_store')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
require_once dirname(__DIR__) . DS . 'tables' . DS . 'store.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'order.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'orderitem.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'cart.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'imghandler.php';
$controllerName = \Request::getCmd('controller', 'orders');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'orders';
}
\Submenu::addEntry(\Lang::txt('Orders'), \Route::url('index.php?option=com_store&controller=orders'), $controllerName == 'orders');
\Submenu::addEntry(\Lang::txt('Store Items'), \Route::url('index.php?option=com_store&controller=items'), $controllerName == 'items');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #23
0
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Courses\Admin;

if (!\User::authorise('core.manage', 'com_courses')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'log.php';
$controllerName = \Request::getCmd('controller', 'courses');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'courses';
}
\Submenu::addEntry(\Lang::txt('COM_COURSES_COURSES'), \Route::url('index.php?option=com_courses&controller=courses'), !in_array($controllerName, array('students', 'roles', 'pages')));
\Submenu::addEntry(\Lang::txt('COM_COURSES_PAGES'), \Route::url('index.php?option=com_courses&controller=pages&course=0'), $controllerName == 'pages');
\Submenu::addEntry(\Lang::txt('COM_COURSES_STUDENTS'), \Route::url('index.php?option=com_courses&controller=students&offering=0&section=0'), $controllerName == 'students');
\Submenu::addEntry(\Lang::txt('COM_COURSES_ROLES'), \Route::url('index.php?option=com_courses&controller=roles'), $controllerName == 'roles');
require_once PATH_CORE . DS . 'components' . DS . 'com_plugins' . DS . 'admin' . DS . 'helpers' . DS . 'plugins.php';
$canDo = \Components\Plugins\Admin\Helpers\Plugins::getActions();
if ($canDo->get('core.manage')) {
    \Submenu::addEntry(\Lang::txt('COM_COURSES_PLUGINS'), \Route::url('index.php?option=com_plugins&view=plugins&filter_folder=courses&filter_type=courses'));
}
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #24
0
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Events\Admin;

if (!\User::authorise('core.manage', 'com_events')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
require_once dirname(__DIR__) . DS . 'models' . DS . 'tags.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'date.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'category.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'event.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'config.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'page.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'respondent.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'html.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'csv.php';
$controllerName = \Request::getCmd('controller', 'events');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'events';
}
\Submenu::addEntry(\Lang::txt('COM_EVENTS'), \Route::url('index.php?option=com_events&controller=events'), $controllerName == 'events');
\Submenu::addEntry(\Lang::txt('COM_EVENTS_CATEGORIES'), \Route::url('index.php?option=com_categories&extension=com_events'), $controllerName == 'categories');
\Submenu::addEntry(\Lang::txt('COM_EVENTS_CONFIGURATION'), \Route::url('index.php?option=com_events&controller=configure'), $controllerName == 'configure');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #25
0
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Alissa Nedossekina <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Services\Admin;

if (!\User::authorise('core.manage', 'com_services')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'service.php';
require_once dirname(__DIR__) . DS . 'tables' . DS . 'subscription.php';
$controllerName = \Request::getCmd('controller', 'services');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'services';
}
\Submenu::addEntry(\Lang::txt('COM_SERVICES_SERVICES'), \Route::url('index.php?option=com_services&controller=services'), $controllerName == 'services');
\Submenu::addEntry(\Lang::txt('COM_SERVICES_SUBSCRIPTIONS'), \Route::url('index.php?option=com_services&controller=subscriptions'), $controllerName == 'subscriptions');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Initiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #26
0
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2011 Purdue University. All rights reserved.
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPLv3
 */
namespace Components\Cart\Admin;

$option = 'com_cart';
if (!\User::authorise('core.manage', $option)) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
require_once __DIR__ . DS . 'helpers' . DS . 'permissions.php';
$scope = \Request::getCmd('scope', 'site');
$controllerName = \Request::getCmd('controller', 'downloads');
\Submenu::addEntry(Lang::txt('COM_CART_SOFTWARE_DOWNLOADS'), \Route::url('index.php?option=com_storefront&controller=downloads'), $controllerName == 'downloads');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'downloads';
}
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #27
0
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Developer\Admin;

// permissions check
if (!\User::authorise('core.manage', 'com_developer')) {
    return \App::abort(403, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
require_once dirname(__DIR__) . DS . 'models' . DS . 'application.php';
// Make extra sure that controller exists
$controllerName = \Request::getCmd('controller', 'applications');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'applications';
}
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
// Add some submenu items
\Submenu::addEntry(\Lang::txt('COM_DEVELOPER_APPLICATIONS'), \Route::url('index.php?option=com_developer&controller=applications'), $controllerName == 'applications');
// Build the class name
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst(strtolower($controllerName));
// Instantiate controller
$component = new $controllerName();
$component->execute();
Exemple #28
0
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\Forum\Admin;

if (!\User::authorise('core.manage', 'com_forum')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
require_once dirname(__DIR__) . DS . 'models' . DS . 'manager.php';
require_once __DIR__ . DS . 'models' . DS . 'adminsection.php';
require_once __DIR__ . DS . 'models' . DS . 'admincategory.php';
require_once __DIR__ . DS . 'models' . DS . 'adminthread.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
$controllerName = \Request::getCmd('controller', 'sections');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'sections';
}
\Submenu::addEntry(\Lang::txt('COM_FORUM_SECTIONS'), \Route::url('index.php?option=com_forum&controller=sections'), $controllerName == 'sections');
\Submenu::addEntry(\Lang::txt('COM_FORUM_CATEGORIES'), \Route::url('index.php?option=com_forum&controller=categories&section_id=-1'), $controllerName == 'categories');
\Submenu::addEntry(\Lang::txt('COM_FORUM_THREADS'), \Route::url('index.php?option=com_forum&controller=threads&category_id=-1'), $controllerName == 'threads');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// initiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
require_once dirname(__DIR__) . DS . 'tables' . DS . 'contributor' . DS . 'roletype.php';
// include helpers
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'html.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'utilities.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'tags.php';
// include importer
require_once __DIR__ . DS . 'import' . DS . 'importer.php';
// get controller name
$controllerName = \Request::getCmd('controller', 'items');
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'items';
}
\Submenu::addEntry(\Lang::txt('COM_RESOURCES'), \Route::url('index.php?option=' . $option), $controllerName == 'items' && $task != 'orphans');
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_ORPHANS'), \Route::url('index.php?option=' . $option . '&controller=items&task=orphans'), $task == 'orphans');
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_TYPES'), \Route::url('index.php?option=' . $option . '&controller=types'), $controllerName == 'types');
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_LICENSES'), \Route::url('index.php?option=' . $option . '&controller=licenses'), $controllerName == 'licenses');
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_AUTHORS'), \Route::url('index.php?option=' . $option . '&controller=authors'), $controllerName == 'authors');
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_ROLES'), \Route::url('index.php?option=' . $option . '&controller=roles'), $controllerName == 'roles');
require_once dirname(dirname(__DIR__)) . DS . 'com_plugins' . DS . 'admin' . DS . 'helpers' . DS . 'plugins.php';
if (\Components\Plugins\Admin\Helpers\Plugins::getActions()->get('core.manage')) {
    \Submenu::addEntry(\Lang::txt('COM_RESOURCES_PLUGINS'), \Route::url('index.php?option=' . $option . '&controller=plugins'), $controllerName == 'plugins');
}
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_IMPORT'), \Route::url('index.php?option=' . $option . '&controller=import'), $controllerName == 'import');
\Submenu::addEntry(\Lang::txt('COM_RESOURCES_IMPORTHOOK'), \Route::url('index.php?option=' . $option . '&controller=importhooks'), $controllerName == 'importhooks');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();
Exemple #30
0
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Components\System\Admin;

if (!\User::authorise('core.manage', 'com_system')) {
    return \App::abort(404, \Lang::txt('JERROR_ALERTNOAUTHOR'));
}
// Include scripts
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'html.php';
require_once dirname(__DIR__) . DS . 'helpers' . DS . 'permissions.php';
$controllerName = \Request::getCmd('controller', \Request::getCmd('view', 'info'));
if (!file_exists(__DIR__ . DS . 'controllers' . DS . $controllerName . '.php')) {
    $controllerName = 'info';
}
\Submenu::addEntry(\Lang::txt('COM_SYSTEM_LDAP'), \Route::url('index.php?option=com_system&controller=ldap'), $controllerName == 'ldap');
\Submenu::addEntry(\Lang::txt('COM_SYSTEM_GEO'), \Route::url('index.php?option=com_system&controller=geodb'), $controllerName == 'geodb');
\Submenu::addEntry(\Lang::txt('COM_SYSTEM_APC'), \Route::url('index.php?option=com_system&controller=apc'), $controllerName == 'apc');
require_once __DIR__ . DS . 'controllers' . DS . $controllerName . '.php';
$controllerName = __NAMESPACE__ . '\\Controllers\\' . ucfirst($controllerName);
// Instantiate controller
$controller = new $controllerName();
$controller->execute();
$controller->redirect();