コード例 #1
0
        }
    }
    unset($process);
}
// Error reporting
error_reporting(E_ALL ^ E_NOTICE);
define("FAKE", 1);
include "_cms/includes/global.php";
StopWatch::Start();
ObjMgr::Initialize();
$pageid = isset($_GET['page']) ? $_GET['page'] : Content::GetDefaultPageId();
if (isset($_GET['logout']) && ObjMgr::GetAccount()->m_loggedin) {
    ObjMgr::GetAccount()->Logout();
}
if (isset($_GET['locale'])) {
    Locales::SetUserLocale($_GET['locale']);
}
if (ObjMgr::GetAccount()->m_loggedin) {
    if (isset($_POST['action'])) {
        Compiler::$Mode = COMPILER_MODE_EDITOR;
        // Plugin Hook
        $data_object = new stdClass();
        $data_object->post = $_POST;
        ObjMgr::GetPluginMgr()->ExecuteHook("On_PostAction_" . $_POST['action'], $data_object);
        switch ($_POST['action']) {
            // Saves module data
            case 'module_update':
                Editor::SaveModule($_POST['module_data']);
                exit;
                // Returns module html
            // Returns module html