Exemplo n.º 1
0
                            } else {
                                $bmo->Performance->Start("includefile-{$module_file}");
                                include $module_file;
                                $bmo->Performance->Stop("includefile-{$module_file}");
                            }
                        }
                    } else {
                        echo sprintf(_("404 Not found (%s)"), $module_file);
                    }
                }
            }
            // BMO TODO: Post display hooks.
            $bmo->GuiHooks->getPostDisplay($module_name, $_REQUEST);
            // global component
            if (isset($currentcomponent)) {
                modgettext::textdomain($module_name);
                echo $currentcomponent->generateconfigpage();
            }
        }
        break;
}
$header = array();
$footer = array();
if ($quietmode) {
    // send the output buffer, should be sending just the page contents
    @ob_end_flush();
} elseif ($fw_popover || $fw_popover_process) {
    $admin_template = $template = array();
    //get the page contents from the buffer
    $content = ob_get_contents();
    @ob_end_clean();
Exemplo n.º 2
0
if (!isset($_REQUEST['module'])) {
    $module = "framework";
} else {
    $module = $_REQUEST['module'];
}
if (isset($_REQUEST['command'])) {
    $command = $_REQUEST['command'];
} else {
    $command = "unset";
}
// I think we'll default to having astman connected,
// it adds a REALLY minor startup penalty, and saves
// work in the modules. Feel free to revisit later and
// yell at me if you disagree.
//
// $bootstrap_settings['skip_astman'] = true;
// No auth - we'll do that later.
$bootstrap_settings['freepbx_auth'] = false;
// Throw verbose exceptions, no matter what.
$bootstrap_settings['freepbx_error_handler'] = false;
// No non-BMO Modules.
$restrict_mods = true;
// Bootstrap!
if (!@(include_once getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) {
    include_once '/etc/asterisk/freepbx.conf';
}
// We may remove this, but for the moment, ajax should be
// 100% error and warning free.
error_reporting(-1);
modgettext::textdomain($module);
$bmo->Ajax->doRequest($module, $command);