Exemplo n.º 1
0
    foreach ($_GET as $key => $val) {
        $find[] = "{" . $key . "}";
        $replace[] = "{$val}";
    }
    echo str_replace($find, $replace, file_get_contents($ifile));
    die;
}
// Bootstrap BigTree Environment
if (file_exists("../custom/bootstrap.php")) {
    include "../custom/bootstrap.php";
} else {
    include "../core/bootstrap.php";
}
// Connect to MySQL and begin sessions and output buffering.
if (!$bigtree["mysql_read_connection"]) {
    $bigtree["mysql_read_connection"] = bigtree_setup_sql_connection();
}
ob_start();
session_start();
// Make it easier to extend the nav tree without overwriting important things.
include BigTree::path("admin/_nav-tree.php");
// Initialize BigTree's additional CSS and JS arrays for inclusion in the admin's header
if (isset($bigtree["config"]["admin_js"]) && is_array($bigtree["config"]["admin_js"])) {
    $bigtree["js"] = $bigtree["config"]["admin_js"];
} else {
    $bigtree["js"] = array();
}
if (isset($bigtree["config"]["admin_css"]) && is_array($bigtree["config"]["admin_css"])) {
    $bigtree["css"] = $bigtree["config"]["admin_css"];
} else {
    $bigtree["css"] = array();
Exemplo n.º 2
0
 function sqlescape($string)
 {
     global $bigtree;
     if ($bigtree["mysql_read_connection"] === "disconnected") {
         $bigtree["mysql_read_connection"] = bigtree_setup_sql_connection();
     }
     if (!is_string($string) && !is_numeric($string) && !is_bool($string) && $string) {
         trigger_error("sqlescape expects a string");
     }
     return mysql_real_escape_string($string);
 }