HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/mailing.wb-cloud.nl/private_html/admin/setpermissions.php
<?php

require_once dirname(__FILE__).'/accesscheck.php';

$GLOBALS['disallowpages'] = array(
    'accesscheck',
    'addprefix',
    'classlistmailer',
    'connect',
    'date',
    'defaultplugin',
    'defaulttest',
    'emailtest',
    'init',
    'languages',
    'lib',
    'mimePart',
    'pluginlib',
    'preparesend',
    'readtestmail',
    'rsslib',
    'segmentation',
    'send_core',
    'sendemaillib2',
    'sendemaillib',
    'sessionlib',
    'sidebar',
    'sorbs',
    'stresstest',
    'structure',
    'subscribelib2',
);

if (!empty($_SESSION['logindetails']['superuser'])) {
    return;
}

if (!empty($_SESSION['privileges'])) {
    $removeSections = array('system', 'plugins', 'develop');
    foreach ($_SESSION['privileges'] as $priv_category => $enabled) {
        switch ($priv_category) {
            //# map the privileges to the above pagecategories
            case 'subscribers':
                if (!$enabled) {
                    $removeSections[] = 'subscribers';
                }
                break;
            case 'campaigns':
                if (!$enabled) {
                    $removeSections[] = 'campaigns';
                }
                break;
            case 'statistics':
                if (!$enabled) {
                    $removeSections[] = 'statistics';
                }
                break;
            case 'settings':
                if (!$enabled) {
                    $removeSections[] = 'config';
                }
                break;
        }
    }
    foreach ($removeSections as $removeSection) {
        //    print '<h2>Removing '.$removeSection.' '.$priv_category.'</h2>';
        if (empty($GLOBALS['pagecategories'][$removeSection]['pages'])) {
            continue;
        }
        foreach ($GLOBALS['pagecategories'][$removeSection]['pages'] as $sectionPage) {
            //    print '<h2>Disallow '.$sectionPage.'</h2>';
            $GLOBALS['disallowpages'][] = $sectionPage;
        }
        unset($GLOBALS['pagecategories'][$removeSection]);
    }
}
//var_dump($GLOBALS['disallowpages']);
#var_dump($GLOBALS['pagecategories']);