mirror of
https://github.com/vrana/adminer.git
synced 2025-08-14 18:44:02 +02:00
Separate include
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@623 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
include dirname(__FILE__) . "/version.inc.php";
|
include dirname(__FILE__) . "/include/version.inc.php";
|
||||||
include dirname(__FILE__) . "/externals/jsmin-php/jsmin.php";
|
include dirname(__FILE__) . "/externals/jsmin-php/jsmin.php";
|
||||||
|
|
||||||
function add_apo_slashes($s) {
|
function add_apo_slashes($s) {
|
||||||
@@ -52,7 +52,7 @@ function put_file($match) {
|
|||||||
return "switch (\$LANG) {\n$return}\n";
|
return "switch (\$LANG) {\n$return}\n";
|
||||||
}
|
}
|
||||||
$return = file_get_contents(dirname(__FILE__) . "/$match[3]");
|
$return = file_get_contents(dirname(__FILE__) . "/$match[3]");
|
||||||
if ($match[3] == "./lang.inc.php" && $_COOKIE["lang"] && (preg_match("~case '$_COOKIE[lang]': (.*) break;~", $return, $match2) || preg_match("~default: (.*)~", $return, $match2))) {
|
if ($match[3] == "./include/lang.inc.php" && $_COOKIE["lang"] && (preg_match("~case '$_COOKIE[lang]': (.*) break;~", $return, $match2) || preg_match("~default: (.*)~", $return, $match2))) {
|
||||||
return "$match[1]\nfunction lang(\$ar, \$number) {\n\t$match2[1]\n\treturn sprintf(\$ar[\$pos], \$number);\n}\n$match[4]";
|
return "$match[1]\nfunction lang(\$ar, \$number) {\n\t$match2[1]\n\treturn sprintf(\$ar[\$pos], \$number);\n}\n$match[4]";
|
||||||
}
|
}
|
||||||
$return = preg_replace("~\\?>\n?\$~", '', $return);
|
$return = preg_replace("~\\?>\n?\$~", '', $return);
|
||||||
@@ -151,7 +151,7 @@ function php_shrink($input) {
|
|||||||
error_reporting(E_ALL & ~E_NOTICE);
|
error_reporting(E_ALL & ~E_NOTICE);
|
||||||
if ($_SERVER["argc"] > 1) {
|
if ($_SERVER["argc"] > 1) {
|
||||||
$_COOKIE["lang"] = $_SERVER["argv"][1];
|
$_COOKIE["lang"] = $_SERVER["argv"][1];
|
||||||
include dirname(__FILE__) . "/lang.inc.php";
|
include dirname(__FILE__) . "/include/lang.inc.php";
|
||||||
if ($_SERVER["argc"] != 2 || !isset($langs[$_COOKIE["lang"]])) {
|
if ($_SERVER["argc"] != 2 || !isset($langs[$_COOKIE["lang"]])) {
|
||||||
echo "Usage: php _compile.php [lang]\nPurpose: Compile phpMinAdmin[-lang].php from index.php.\n";
|
echo "Usage: php _compile.php [lang]\nPurpose: Compile phpMinAdmin[-lang].php from index.php.\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
|
20
index.php
20
index.php
@@ -46,17 +46,17 @@ if (get_magic_quotes_gpc()) {
|
|||||||
set_magic_quotes_runtime(false);
|
set_magic_quotes_runtime(false);
|
||||||
$SELF = preg_replace('~^[^?]*/([^?]*).*~', '\\1?', $_SERVER["REQUEST_URI"]) . (strlen($_GET["server"]) ? 'server=' . urlencode($_GET["server"]) . '&' : '') . (strlen($_GET["db"]) ? 'db=' . urlencode($_GET["db"]) . '&' : '');
|
$SELF = preg_replace('~^[^?]*/([^?]*).*~', '\\1?', $_SERVER["REQUEST_URI"]) . (strlen($_GET["server"]) ? 'server=' . urlencode($_GET["server"]) . '&' : '') . (strlen($_GET["db"]) ? 'db=' . urlencode($_GET["db"]) . '&' : '');
|
||||||
|
|
||||||
include "./version.inc.php";
|
include "./include/version.inc.php";
|
||||||
include "./functions.inc.php";
|
include "./include/functions.inc.php";
|
||||||
include "./lang.inc.php";
|
include "./include/lang.inc.php";
|
||||||
include "./lang/$LANG.inc.php";
|
include "./lang/$LANG.inc.php";
|
||||||
include "./pdo.inc.php";
|
include "./include/pdo.inc.php";
|
||||||
include "./mysql.inc.php";
|
include "./include/mysql.inc.php";
|
||||||
include "./design.inc.php";
|
include "./include/design.inc.php";
|
||||||
include "./auth.inc.php";
|
include "./include/auth.inc.php";
|
||||||
include "./connect.inc.php";
|
include "./include/connect.inc.php";
|
||||||
include "./editing.inc.php";
|
include "./include/editing.inc.php";
|
||||||
include "./export.inc.php";
|
include "./include/export.inc.php";
|
||||||
|
|
||||||
if (isset($_GET["download"])) {
|
if (isset($_GET["download"])) {
|
||||||
include "./download.inc.php";
|
include "./download.inc.php";
|
||||||
|
Reference in New Issue
Block a user