PHP Classes

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

Recommend this page to a friend!
  Packages 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: PER-CS formatting
short array
Merge pull request #1239 from Andrew-Staves-Activ/notificationhandler_subscribe_success

Merge xswatch4
Date: 2 months ago
Size: 2,174 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);
/** @var XoopsModule $moduleInfo */
$moduleInfo = $module_handler->get($xoopsModule->getVar('mid'));
$pathIcon32 = $moduleInfo->getInfo('icons32');

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

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

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