* Copyright (c) 2009
 */
include "../include_php/check_install.php";
function stripslashes_for_array(&$arr)
{
    foreach ($arr as $k => $v) {
        if (is_string($v)) {
            $arr[$k] = stripslashes($v);
        } else {
            $arr[$k] = $v;
        }
    }
}
stripslashes_for_array($_POST);
stripslashes_for_array($_GET);
stripslashes_for_array($_REQUEST);
include "../dbconfig.inc";
include "../include_php/functions.php";
require '../libs/Smarty.class.php';
session_start();
mysql_connect($gConfig['base_host'], $gConfig['base_user'], $gConfig['base_pass']);
$MySQL = mysql_select_db($gConfig['base_name']);
$qset = mysql_query("select * from Settings");
while ($aset = mysql_fetch_assoc($qset)) {
    $gConfig[$aset['Name']] = $aset['Value'];
}
$admin_dop_path = '.';
if (!$_SESSION['adminID'] && !$no_redirect) {
    header("location: /admin/login.php");
}
$smartyparam = $_SERVER['HTTP_HOST'];
Ejemplo n.º 2
0
 function fix_magic_quotes_gpc()
 {
     if (get_magic_quotes_gpc()) {
         stripslashes_for_array($_POST);
     }
 }