PHP Classes

File: htdocs/xoops_lib/modules/protector/admin_menu.php

Recommend this page to a friend!
  Classes of Michael Beck   Xoops 2.5   htdocs/xoops_lib/modules/protector/admin_menu.php   Download  
File: htdocs/xoops_lib/modules/protector/admin_menu.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change: non-canonical order

In docblock var tags, use "type variableName" more consistently
Merge pull request #511 from mambax7/feature/deprecated

Feature/deprecated
Date: 5 years ago
Size: 2,142 bytes
 

Contents

Class file image Download
<?php
// start hack by Trabis
if (!class_exists('ProtectorRegistry')) {
    exit(
'Registry not found');
}

$registry = ProtectorRegistry::getInstance();
$mydirname = $registry->getEntry('mydirname');
$mydirpath = $registry->getEntry('mydirpath');
$language = $registry->getEntry('language');
// end hack by Trabis

/* @var XoopsModuleHandler $module_handler */
$module_handler = xoops_getHandler('module');
$xoopsModule = XoopsModule::getByDirname($mydirname);
$moduleInfo = $module_handler->get($xoopsModule->getVar('mid'));
$pathIcon32 = $moduleInfo->getInfo('icons32');

$constpref = '_MI_' . strtoupper($mydirname);

$adminmenu = array(
    array(
       
'title' => constant($constpref . '_ADMINHOME'),
       
'link' => 'admin/index.php',
       
'icon' => '../../' . $pathIcon32 . '/home.png'),
    array(
       
'title' => constant($constpref . '_ADMININDEX'),
       
'link' => 'admin/center.php?page=center',
       
//'link' => 'admin/center.php' ,
       
'icon' => '../../' . $pathIcon32 . '/firewall.png'),
    array(
       
'title' => constant($constpref . '_ADMINSTATS'),
       
'link' => 'admin/stats.php',
       
'icon' => '../../' . $pathIcon32 . '/stats.png'),
    array(
       
'title' => constant($constpref . '_ADVISORY'),
       
//'link' => 'admin/center.php?page=advisory' ,
       
'link' => 'admin/advisory.php',
       
'icon' => '../../' . $pathIcon32 . '/security.png'),
    array(
       
'title' => constant($constpref . '_PREFIXMANAGER'),
       
//'link' => 'admin/center.php?page=prefix_manager' ,
       
'link' => 'admin/prefix_manager.php',
       
'icon' => '../../' . $pathIcon32 . '/manage.png'),
    array(
       
'title' => constant($constpref . '_ADMINABOUT'),
       
'link' => 'admin/about.php',
       
'icon' => '../../' . $pathIcon32 . '/about.png'));

$adminmenu4altsys = array(
    array(
       
'title' => constant($constpref . '_ADMENU_MYBLOCKSADMIN'),
       
'link' => 'admin/main.php?mode=admin&lib=altsys&page=myblocksadmin'),
    array(
       
'title' => _PREFERENCES,
       
'link' => 'admin/main.php?mode=admin&lib=altsys&page=mypreferences'));