ERROR: Your PHP version is too old
" . "You need at least PHP 4.0.0 to run TWGXplorer; preferably PHP 4.4.1 or higher."); } // ------------------------------------------------------------------------------ // Get Action if (isset($GLOBALS['__GET']["action"])) $GLOBALS["action"] = $GLOBALS['__GET']["action"]; else $GLOBALS["action"] = "list"; if (isset($GLOBALS['__POST']["action"])) { $GLOBALS["action"] = $GLOBALS['__POST']["action"]; } if ($GLOBALS["action"] == "post") { if (isset($GLOBALS['__GET']["do_action"])) $GLOBALS["action"] = $GLOBALS['__GET']["do_action"]; elseif (isset($GLOBALS['__POST']["do_action"])) $GLOBALS["action"] = $GLOBALS['__POST']["do_action"]; } if ($GLOBALS["action"] == "") $GLOBALS["action"] = "list"; $GLOBALS["action"] = stripslashes($GLOBALS["action"]); // Default Dir if (isset($GLOBALS['__GET']["dir"])) $GLOBALS["dir"] = stripslashes($GLOBALS['__GET']["dir"]); else $GLOBALS["dir"] = ""; if ($GLOBALS["dir"] == ".") $GLOBALS["dir"] == ""; // Get Item if (isset($GLOBALS['__GET']["item"])) $GLOBALS["item"] = stripslashes($GLOBALS['__GET']["item"]); else $GLOBALS["item"] = ""; // Get Sort if (isset($GLOBALS['__GET']["order"])) $GLOBALS["order"] = stripslashes($GLOBALS['__GET']["order"]); else $GLOBALS["order"] = "name"; if ($GLOBALS["order"] == "") $GLOBALS["order"] == "name"; // Get Sortorder (yes==up) if (isset($GLOBALS['__GET']["srt"])) $GLOBALS["srt"] = stripslashes($GLOBALS['__GET']["srt"]); else $GLOBALS["srt"] = "yes"; if ($GLOBALS["srt"] == "") $GLOBALS["srt"] == "yes"; // Get Language if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $lang_browser = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); if (file_exists(dirname(__FILE__) . "/../_lang/".$lang_browser.".php")) { $GLOBALS["default_language"] = $lang_browser; } } if (isset($GLOBALS['__GET']["lang"])) $GLOBALS["lang"] = $GLOBALS["language"] = $_SESSION["admin_lang"] = basename($GLOBALS['__GET']["lang"]); elseif (isset($GLOBALS['__POST']["lang"])) $GLOBALS["lang"] = $GLOBALS["language"] = $_SESSION["admin_lang"] = basename ($GLOBALS['__POST']["lang"]); else if (isset($_SESSION["admin_lang"])) $GLOBALS["lang"] = $GLOBALS["language"] = $_SESSION["admin_lang"]; else $GLOBALS["language"] = $GLOBALS["default_language"]; // get upload parameters if (isset($GLOBALS['__GET']["twgsize"])) $GLOBALS["twgsize"] = $GLOBALS['__GET']["twgsize"]; elseif (isset($GLOBALS['__POST']["twgsize"])) $GLOBALS["twgsize"] = $GLOBALS['__POST']["twgsize"]; else $GLOBALS["twgsize"] = "10000"; // get upload parameters if (isset($GLOBALS['__GET'][session_name()])) $GLOBALS["ses_name"] = $GLOBALS['__GET'][session_name()]; elseif (isset($GLOBALS['__POST'][session_name()])) $GLOBALS["ses_name"] = $GLOBALS['__POST'][session_name()]; // optional helper action for some pages if (isset($_GET['twg_helper_action'])) { $helper_action = $_GET['twg_helper_action']; } else if (isset($_POST['twg_helper_action'])) { $helper_action = $_POST['twg_helper_action']; } else { $helper_action = "none"; } // ------------------------------------------------------------------------------ // Necessary files require _QUIXPLORER_PATH . "/_config/conf.php"; if (file_exists(_QUIXPLORER_PATH . "/_lang/" . $GLOBALS["language"] . ".php")) require _QUIXPLORER_PATH . "/_lang/" . $GLOBALS["language"] . ".php"; else if (file_exists(_QUIXPLORER_PATH . "/_lang/" . $GLOBALS["default_language"] . ".php")) require _QUIXPLORER_PATH . "/_lang/" . $GLOBALS["default_language"] . ".php"; else require _QUIXPLORER_PATH . "/_lang/en.php"; if (file_exists(_QUIXPLORER_PATH . "/_lang/" . $GLOBALS["language"] . "_mimes.php")) require _QUIXPLORER_PATH . "/_lang/" . $GLOBALS["language"] . "_mimes.php"; else require _QUIXPLORER_PATH . "/_lang/".$GLOBALS["default_language"]."_mimes.php"; if (file_exists(_QUIXPLORER_PATH . "/_lang/". $GLOBALS["language"] ."_config_help.php")) require _QUIXPLORER_PATH . "/_lang/". $GLOBALS["language"] ."_config_help.php"; else require _QUIXPLORER_PATH . "/_lang/". $GLOBALS["default_language"] ."_config_help.php"; require _QUIXPLORER_PATH . "/_config/mimes.php"; require _QUIXPLORER_PATH . "/_include/fun_extra.php"; require _QUIXPLORER_PATH . "/_include/header.php"; require _QUIXPLORER_PATH . "/_include/footer.php"; require _QUIXPLORER_PATH . "/_include/error.php"; require _QUIXPLORER_PATH . "/menu.php"; $d=a(); @ob_end_clean(); // get rid of cached unwanted output // ------------------------------------------------------------------------------ if ($GLOBALS["require_login"]) { // LOGIN require "./_include/login.php"; if ($GLOBALS["action"] == "logout") { // $GLOBALS["tview"] = "no"; logout(false); exit; } else { login(); if ($GLOBALS["action"] == "login") { show_menu(); } } } // -- after login because homedir is needed! // Get view if (isset($GLOBALS['__GET']["tview"])) { if (!isset($_SESSION["autoview"])) { // admin $hd = (strpos ($GLOBALS["home_dir"], "pictures") > 0); if (($GLOBALS["dir"] == "pictures") || $hd) { $GLOBALS["tview"] = "yes"; $_SESSION["autoview"] = "yes"; } else { $GLOBALS["tview"] = stripslashes($GLOBALS['__GET']["tview"]); } } else { $GLOBALS["tview"] = stripslashes($GLOBALS['__GET']["tview"]); } } else { if (!isset($_SESSION["autoview"])) { // user $hd = (strpos ($GLOBALS["home_dir"], "pictures") > 0); if (($GLOBALS["dir"] == "pictures") || $hd) { $GLOBALS["tview"] = "yes"; $_SESSION["autoview"] = "yes"; } else { $GLOBALS["tview"] = "no"; } } else { $GLOBALS["tview"] = "no"; } } if (!isset($GLOBALS["tview"])) { $GLOBALS["tview"] = "no"; } // get simple view parameters if (isset($GLOBALS['__GET']["sview"])) $GLOBALS["sview"] = $GLOBALS['__GET']["sview"]; elseif (isset($GLOBALS['__POST']["sview"])) $GLOBALS["sview"] = $GLOBALS['__POST']["sview"]; else $GLOBALS["sview"] = $GLOBALS["default_simple_view"]; if (isset($GLOBALS['__GET']["twgquality"])) $GLOBALS["twgquality"] = $GLOBALS["twgquality"] = $GLOBALS['__GET']["twgquality"]; elseif (isset($GLOBALS['__POST']["twgquality"])) $GLOBALS["twgquality"] = $GLOBALS["twgquality"] = $GLOBALS['__POST']["twgquality"]; else $GLOBALS["twgquality"] = $GLOBALS["uploadquality"]; // ------------------------------------------------------------------------------ $abs_dir = get_abs_dir($GLOBALS["dir"]); if (!file_exists($GLOBALS["home_dir"])) { if (!file_exists($GLOBALS["home_dir"] . $GLOBALS["separator"])) { if ($GLOBALS["require_login"]) { $extra = "" . $GLOBALS["messages"]["btnlogout"] . ""; } else $extra = null; if ($_SERVER['PHP_SELF'] == "/admin/index.php") { show_error($GLOBALS["error_msg"]["homeroot"] , $extra); } else { show_error($GLOBALS["error_msg"]["home"] . " (" . $GLOBALS["home_dir"] . ")", $extra); } } } if (!down_home($abs_dir)) show_error($GLOBALS["dir"] . " : " . $GLOBALS["error_msg"]["abovehome"]); if (!is_dir($abs_dir)) if (!is_dir($abs_dir . $GLOBALS["separator"])) show_error($abs_dir . " : " . $GLOBALS["error_msg"]["direxist"]); // ------------------------------------------------------------------------------ ?>