XOOPS  2.6.0
cp_header.php
Go to the documentation of this file.
1 <?php
25 include_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'mainfile.php';
26 
29 include_once $xoops->path('include/cp_functions.php');
30 
31 $moduleperm_handler = $xoops->getHandlerGroupperm();
32 if ($xoops->isUser()) {
33  $url_arr = explode('/', strstr($_SERVER['REQUEST_URI'], '/modules/'));
34  if (!$xoops->isActiveModule($url_arr[2])) {
36  }
37  $xoops->module = $xoops->getModuleByDirname($url_arr[2]);
38  unset($url_arr);
39  if (!$moduleperm_handler->checkRight('module_admin', $xoops->module->getVar('mid'), $xoops->user->getGroups())) {
41  }
42 } else {
43  $xoops->redirect($xoops_url . '/user.php', 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
44 }
45 
46 // set config values for this module
47 if ($xoops->module->getVar('hasconfig') == 1 || $xoops->module->getVar('hascomments') == 1) {
48  $xoops->moduleConfig = $xoops->getModuleConfigs();
49 }
50 
51 // include the default language file for the admin interface
52 $xoops->loadLanguage('admin', $xoops->module->getVar('dirname'));
53 $xoops->moduleDirname = $xoops->module->getVar('dirname');
54 $xoops->isAdminSide = true;
$xoops_url
Definition: cp_header.php:28
static getInstance()
Definition: Xoops.php:160
$_SERVER['REQUEST_URI']
$xoops
Definition: cp_header.php:27
defined('DS') or define('DS' DIRECTORY_SEPARATOR
Definition: common.php:41
static get($name)
const E_NO_ACCESS_PERMISSION
Definition: en_US.php:351
$moduleperm_handler
Definition: cp_header.php:31