コード例 #1
0
ファイル: DefaultFunc.php プロジェクト: Novo1987/mozilo2.0
function cleanREQUEST($post_return)
{
    foreach ($post_return as $key => $value) {
        #!!!!!! der key muss auch geprüft werden
        if (is_array($post_return[$key])) {
            $post_return[$key] = cleanREQUEST($post_return[$key]);
        } else {
            // Nullbytes abfangen!
            if (strpos("tmp" . $value, "") > 0 or strpos("tmp" . $key, "") > 0) {
                die;
            }
            # ein paar unötige sachen drumherum weg machen
            $key = trim($key, ".. ");
            # x20 = space
            # bei texten brauchen wir die bracks
            $value = str_replace(array("\r\n", "\r", "\n"), "-tmpbr_", $value);
            $value = trim($value, "..");
            # x20 = space
            $value = str_replace("-tmpbr_", "\n", $value);
            # auf manchen Systemen mus ein stripslashes() gemacht werden
            if (strpos("tmp" . $value, '\\') > 0 and addslashes(stripslashes($value)) == $value) {
                $value = stripslashes($value);
            }
            # auf manchen Systemen mus ein stripslashes() gemacht werden
            if (strpos("tmp" . $key, '\\') > 0 and addslashes(stripslashes($key)) == $key) {
                $key = stripslashes($key);
            }
            if (function_exists("mb_convert_encoding")) {
                $value = @mb_convert_encoding($value, CHARSET, @mb_detect_encoding($value, "UTF-8,ISO-8859-1,ISO-8859-15", true));
            }
            $post_return[$key] = $value;
        }
    }
    return $post_return;
}
コード例 #2
0
ファイル: index.php プロジェクト: Novo1987/mozilo2.0
$test_dir = array(BASE_DIR_ADMIN . LANGUAGE_DIR_NAME => LANGUAGE_DIR_NAME, BASE_DIR_ADMIN . CONF_DIR_NAME => CONF_DIR_NAME, BASE_DIR_CMS . CONF_DIR_NAME => CONF_DIR_NAME, BASE_DIR . CONTENT_DIR_NAME => CONTENT_DIR_NAME, BASE_DIR . LAYOUT_DIR_NAME => LAYOUT_DIR_NAME, BASE_DIR_CMS . LANGUAGE_DIR_NAME => LANGUAGE_DIR_NAME, BASE_DIR . GALLERIES_DIR_NAME => GALLERIES_DIR_NAME);
foreach ($test_dir as $dir => $name) {
    if (!is_dir($dir)) {
        die("Fatal Error Directory doesn't exist: " . $name);
    }
}
if (is_file(BASE_DIR_CMS . "DefaultFunc.php")) {
    require_once BASE_DIR_CMS . "DefaultFunc.php";
} else {
    die("Fatal Error File doesn't exist: " . "DefaultFunc.php");
}
$_GET = cleanREQUEST($_GET);
$_REQUEST = cleanREQUEST($_REQUEST);
$_POST = cleanREQUEST($_POST);
if (isset($_FILE)) {
    $_FILE = cleanREQUEST($_FILE);
}
$message = NULL;
#define("ICON_SIZE","24x24"); # 16x16 22x22 24x24 32x32 48x48
#define("ADMIN_ICONS", URL_BASE.ADMIN_DIR_NAME."/gfx/icons/".ICON_SIZE."/");
#define("ADMIN_ICONS_TABS",URL_BASE.ADMIN_DIR_NAME."/gfx/icons/22x22/");
define("ICON_URL", URL_BASE . ADMIN_DIR_NAME . '/gfx/');
define("ICON_URL_SLICE", URL_BASE . ADMIN_DIR_NAME . '/gfx/clear.gif');
require_once BASE_DIR_ADMIN . "default_conf.php";
require_once BASE_DIR_CMS . "Properties.php";
require_once BASE_DIR_CMS . "SpecialChars.php";
$specialchars = new SpecialChars();
$ADMIN_CONF = new Properties(BASE_DIR_ADMIN . CONF_DIR_NAME . "/basic.conf.php");
$CMS_CONF = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . "/main.conf.php");
#$LANGUAGE  = new Properties(BASE_DIR_ADMIN."sprachen/language_".$ADMIN_CONF->get("language").".txt");
require_once BASE_DIR_CMS . "Language.php";
コード例 #3
0
ファイル: index.php プロジェクト: Novo1987/mozilo2.0
// UTF-8 erzwingen - experimentell!
@ini_set("default_charset", CHARSET);
$start_time = get_executTime(false);
if (!is_file(BASE_DIR . CMS_DIR_NAME . "/conf/main.conf.php") and is_file(BASE_DIR . "install.php")) {
    $install = $_SERVER['HTTP_HOST'] . URL_BASE . "install.php";
    header("Location: http://{$install}");
    exit;
}
if (is_file(BASE_DIR_CMS . "DefaultFunc.php")) {
    require_once BASE_DIR_CMS . "DefaultFunc.php";
} else {
    die("Fatal Error " . BASE_DIR_CMS . "DefaultFunc.php Datei existiert nicht");
}
$_GET = cleanREQUEST($_GET);
$_REQUEST = cleanREQUEST($_REQUEST);
$_POST = cleanREQUEST($_POST);
#------------------------------
# manche Provider sind auf iso eingestelt
header('content-type: text/html; charset=' . CHARSET . '');
require_once BASE_DIR_CMS . "SpecialChars.php";
require_once BASE_DIR_CMS . "Properties.php";
$specialchars = new SpecialChars();
$CMS_CONF = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . "/main.conf.php");
$GALLERY_CONF = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . "/gallery.conf.php");
$USER_SYNTAX = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . "/syntax.conf.php");
#define("URL_BASE",substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],"index.php")));
require_once BASE_DIR_CMS . 'idna_convert.class.php';
$Punycode = new idna_convert();
require_once BASE_DIR_CMS . "Language.php";
$language = new Language();
setTimeLocale($language);