Пример #1
0
// Make sure the main page data is loaded.
require_once $bb_dir . "/" . $bb_file . "_" . $bb_pref_lang . "_page.php";
// Load initialization functions.
require_once ROOT_PATH . "/" . SUPPORT_PATH . "/bb_init_functions.php";
// Manage the page.
if (isset($_REQUEST["bb_action"])) {
    require_once "edit.php";
} else {
    if (isset($_REQUEST["action"])) {
        // Find the widget.  Can't be a widget master and must exist.
        if (isset($_REQUEST["wid"]) && isset($bb_langpage["widgets"][$_REQUEST["wid"]])) {
            $bb_widget->SetID($_REQUEST["wid"]);
            if ($bb_widget->_m === false && $bb_widget->_a !== false && file_exists(ROOT_PATH . "/" . WIDGET_PATH . "/" . $bb_widget->_file)) {
                // Load widgets.
                BB_LoadWidgets();
                $bb_widget->SetID($_REQUEST["wid"]);
                $bb_widget_instances[$_REQUEST["wid"]]->ProcessAction();
            }
        }
    } else {
        // Load widgets.
        BB_LoadWidgets();
        $bb_widget->SetID("");
        $data = BB_ProcessPage($bb_page["cachetime"] != 0, true, true);
        if ($bb_page["cachetime"] != 0) {
            $bb_page["langs"][$bb_pref_lang][$bb_profile] = array(time(), gmdate("D, d M Y H:i:s") . " GMT");
            BB_WriteFile($bb_dir . "/" . $bb_file . "_" . $bb_pref_lang . ($bb_profile != "" ? "." . $bb_profile : "") . ".html", $data);
            BB_SavePage();
        }
    }
}
Пример #2
0
        }
        if (isset($_REQUEST["notify"])) {
            require_once "translate.php";
            if (isset($bb_translate_notify[(int) $_REQUEST["notify"]])) {
                $entry = $bb_translate_notify[(int) $_REQUEST["notify"]];
                echo BB_Translate("<br />%s, %s, %s =&gt; %s, %s", htmlspecialchars($entry[0]), BB_FormatTimestamp($entry[1]), htmlspecialchars(BB_Translate(BB_GetIANADesc($entry[4], true, true))), htmlspecialchars(BB_Translate(BB_GetIANADesc($entry[5], true, true))), htmlspecialchars($entry[6]));
            }
        }
        BB_RunPluginAction("post_bb_main_edit_mainviewinfo");
    } else {
        if ($_REQUEST["bb_action"] == "bb_main_edit_view") {
            BB_RunPluginAction("pre_bb_main_edit_view");
            if ($bb_page["redirect"] != "") {
                header("Location: " . $bb_page["redirect"]);
            } else {
                BB_ProcessPage(false, true, false);
            }
            BB_RunPluginAction("post_bb_main_edit_view");
        } else {
            if ($_REQUEST["bb_action"] == "bb_main_edit_menu") {
                BB_RunPluginAction("pre_bb_main_edit_menu");
                ?>
	<div class="menu">
		<div class="title"><?php 
                echo BB_Translate("Page Options");
                ?>
</div>
<?php 
                BB_RunPluginAction("bb_main_edit_menu_pre_page_options");
                echo BB_CreatePropertiesLink(BB_Translate("Edit Properties"), "bb_main_edit_page_opt_properties");
                if (count($bb_profiles) > 1) {
Пример #3
0
 public function ProcessAction()
 {
     foreach ($GLOBALS as $key => $val) {
         if (substr($key, 0, 3) == "bb_" || substr($key, 0, 2) == "g_") {
             global ${$key};
         }
     }
     if (!$this->initrun) {
         $this->initrun = true;
         $this->ProcessLangmap();
         if (isset($bb_widget->init)) {
             eval("?" . ">" . $bb_widget->init);
         }
     }
     if (!isset($bb_widget->action) || $bb_widget->action === "") {
         echo BB_ProcessPage(true, false, true);
     } else {
         eval("?" . ">" . $bb_widget->action);
     }
 }