Example #1
0
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();
Example #2
0
				<option value=""><?php 
echo Lang::txt('JOPTION_SELECT_PUBLISHED');
?>
</option>
				<?php 
echo Html::select('options', \Components\Plugins\Admin\Helpers\Plugins::stateOptions(), 'value', 'text', $this->state->get('filter.state'), true);
?>
			</select>

			<select name="filter_folder" class="inputbox" onchange="this.form.submit()">
				<option value=""><?php 
echo Lang::txt('COM_PLUGINS_OPTION_FOLDER');
?>
</option>
				<?php 
echo Html::select('options', \Components\Plugins\Admin\Helpers\Plugins::folderOptions(), 'value', 'text', $this->state->get('filter.folder'));
?>
			</select>

			<select name="filter_access" class="inputbox" onchange="this.form.submit()">
				<option value=""><?php 
echo Lang::txt('JOPTION_SELECT_ACCESS');
?>
</option>
				<?php 
echo Html::select('options', Html::access('assetgroups'), 'value', 'text', $this->state->get('filter.access'));
?>
			</select>
		</div>
	</fieldset>
Example #3
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();
Example #4
0
    Toolbar::unpublishList();
}
include_once PATH_CORE . DS . 'components' . DS . 'com_plugins' . DS . 'admin' . DS . 'helpers' . DS . 'plugins.php';
?>
<form action="<?php 
echo Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller);
?>
" method="post" name="adminForm" id="adminForm">
	<fieldset id="filter-bar">
		<select name="state" class="inputbox" onchange="this.form.submit()">
			<option value=""><?php 
echo Lang::txt('JOPTION_SELECT_PUBLISHED');
?>
</option>
			<?php 
echo Html::select('options', \Components\Plugins\Admin\Helpers\Plugins::stateOptions(), 'value', 'text', $this->filters['state'], true);
?>
		</select>

		<input type="submit" name="filter_submit" id="filter_submit" value="<?php 
echo Lang::txt('COM_RESOURCES_GO');
?>
" />
	</fieldset>

	<table class="adminlist">
		<thead>
			<tr>
				<th scope="col">
					<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
echo count($this->rows);