Example #1
0
*/
use Xoops\Core\Kernel\Criteria;
use Xoops\Core\Kernel\CriteriaCompo;
/**
 * Template sets Manager
 *
 * @copyright   XOOPS Project (http://xoops.org)
 * @license     GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author      Kazumi Ono (AKA onokazu)
 * @package     system
 * @version     $Id$
 */
// Get main instance
$xoops = Xoops::getInstance();
$system = System::getInstance();
$system_breadcrumb = SystemBreadcrumb::getInstance();
// Check users rights
if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) {
    exit(XoopsLocale::E_NO_ACCESS_PERMISSION);
}
// Get Action type
$op = $system->cleanVars($_REQUEST, 'op', 'default', 'string');
// Call Header
$xoops->header('admin:system/system_templates.tpl');
// Define scripts
$xoops->theme()->addBaseScriptAssets(array('@jquery', '@jqueryui'));
$xoops->theme()->addScript('media/jquery/plugins/jquery.easing.js');
$xoops->theme()->addScript('media/jquery/plugins/jqueryFileTree.js');
$xoops->theme()->addScript('modules/system/js/admin.js');
$xoops->theme()->addScript('modules/system/js/templates.js');
$xoops->theme()->addScript('modules/system/js/code_mirror/codemirror.js');
Example #2
0
// Include XOOPS control panel header
include_once dirname(dirname(__DIR__)) . '/include/cp_header.php';
// Check user rights
if (is_object($xoopsUser)) {
    $admintest = 0;
    $xoopsModule = XoopsModule::getByDirname('system');
    if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
        redirect_header(XOOPS_URL, 3, _NOPERM);
    }
    $admintest = 1;
} else {
    redirect_header(XOOPS_URL, 3, _NOPERM);
}
// XOOPS Class
include_once $GLOBALS['xoops']->path('/class/pagenav.php');
include_once $GLOBALS['xoops']->path('/class/template.php');
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
include_once $GLOBALS['xoops']->path('/class/xoopslists.php');
// System Class
include_once $GLOBALS['xoops']->path('/modules/system/class/breadcrumb.php');
include_once $GLOBALS['xoops']->path('/modules/system/class/cookie.php');
// Load Language
xoops_loadLanguage('admin', 'system');
// Include System files
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
// include system category definitions
include_once $GLOBALS['xoops']->path('/modules/system/constants.php');
// Get request variable
$fct = system_CleanVars($_REQUEST, 'fct', '', 'string');
$xoBreadCrumb = new SystemBreadcrumb($fct);
$xoBreadCrumb->addLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true);