function utility($name)
{
    static $utilities;
    if (!isset($utilities)) {
        $utilities = utilities();
    }
    Scope::$root->assign($ref = "__{$name}", $utilities[$name]);
    return $ref;
}
Example #2
0
    case 'clear_user_log':
        include_once "./include/top_header.php";
        utilities_clear_user_log();
        utilities_view_user_log();
        include_once "./include/bottom_footer.php";
        break;
    case 'view_tech':
        $php_info = utilities_php_modules();
        include_once "./include/top_header.php";
        utilities_view_tech($php_info);
        include_once "./include/bottom_footer.php";
        break;
    default:
        if (!api_plugin_hook_function('utilities_action', $_REQUEST['action'])) {
            include_once './include/top_header.php';
            utilities();
            include_once './include/bottom_footer.php';
        }
        break;
}
/* -----------------------
    Utilities Functions
   ----------------------- */
function utilities_php_modules()
{
    /*
       Gather phpinfo into a string variable - This has to be done before
       any headers are sent to the browser, as we are going to do some
       output buffering fun
    */
    ob_start();