Permalink
Browse files

Simpler index.php structure

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1043 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent d74159b commit d58858c1015adb3783a934fd215085f608441768 jakubvrana committed Aug 29, 2009
Showing with 48 additions and 52 deletions.
  1. +40 −42 adminer/index.php
  2. +8 −10 editor/index.php
View
82 adminer/index.php
@@ -11,6 +11,15 @@
$enum_length = '\'(?:\'\'|[^\'\\\\]|\\\\.)*\'|"(?:""|[^"\\\\]|\\\\.)*"';
$inout = array("IN", "OUT", "INOUT");
+if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
+ $_GET["edit"] = $_GET["select"];
+}
+if (isset($_GET["callf"])) {
+ $_GET["call"] = $_GET["callf"];
+}
+if (isset($_GET["function"])) {
+ $_GET["procedure"] = $_GET["function"];
+}
if (isset($_GET["download"])) {
include "./download.inc.php";
} elseif (isset($_GET["table"])) {
@@ -21,49 +30,38 @@
include "./dump.inc.php";
} elseif (isset($_GET["privileges"])) {
include "./privileges.inc.php";
+} elseif (isset($_GET["sql"])) {
+ include "./sql.inc.php";
+} elseif (isset($_GET["edit"])) {
+ include "./edit.inc.php";
+} elseif (isset($_GET["create"])) {
+ include "./create.inc.php";
+} elseif (isset($_GET["indexes"])) {
+ include "./indexes.inc.php";
+} elseif (isset($_GET["database"])) {
+ include "./database.inc.php";
+} elseif (isset($_GET["call"])) {
+ include "./call.inc.php";
+} elseif (isset($_GET["foreign"])) {
+ include "./foreign.inc.php";
+} elseif (isset($_GET["view"])) {
+ include "./view.inc.php";
+} elseif (isset($_GET["event"])) {
+ include "./event.inc.php";
+} elseif (isset($_GET["procedure"])) {
+ include "./procedure.inc.php";
+} elseif (isset($_GET["trigger"])) {
+ include "./trigger.inc.php";
+} elseif (isset($_GET["user"])) {
+ include "./user.inc.php";
+} elseif (isset($_GET["processlist"])) {
+ include "./processlist.inc.php";
+} elseif (isset($_GET["select"])) {
+ include "./select.inc.php";
+} elseif (isset($_GET["variables"])) {
+ include "./variables.inc.php";
} else {
- if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
- $_GET["edit"] = $_GET["select"];
- }
- if (isset($_GET["callf"])) {
- $_GET["call"] = $_GET["callf"];
- }
- if (isset($_GET["function"])) {
- $_GET["procedure"] = $_GET["function"];
- }
- if (isset($_GET["sql"])) {
- include "./sql.inc.php";
- } elseif (isset($_GET["edit"])) {
- include "./edit.inc.php";
- } elseif (isset($_GET["create"])) {
- include "./create.inc.php";
- } elseif (isset($_GET["indexes"])) {
- include "./indexes.inc.php";
- } elseif (isset($_GET["database"])) {
- include "./database.inc.php";
- } elseif (isset($_GET["call"])) {
- include "./call.inc.php";
- } elseif (isset($_GET["foreign"])) {
- include "./foreign.inc.php";
- } elseif (isset($_GET["view"])) {
- include "./view.inc.php";
- } elseif (isset($_GET["event"])) {
- include "./event.inc.php";
- } elseif (isset($_GET["procedure"])) {
- include "./procedure.inc.php";
- } elseif (isset($_GET["trigger"])) {
- include "./trigger.inc.php";
- } elseif (isset($_GET["user"])) {
- include "./user.inc.php";
- } elseif (isset($_GET["processlist"])) {
- include "./processlist.inc.php";
- } elseif (isset($_GET["select"])) {
- include "./select.inc.php";
- } elseif (isset($_GET["variables"])) {
- include "./variables.inc.php";
- } else {
- include "./db.inc.php";
- }
+ include "./db.inc.php";
}
// each page calls its own page_header(), if the footer should not be called then the page exits
View
18 editor/index.php
@@ -8,19 +8,17 @@
include "../adminer/include/bootstrap.inc.php";
+if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
+ $_GET["edit"] = $_GET["select"];
+}
if (isset($_GET["download"])) {
include "../adminer/download.inc.php";
+} elseif (isset($_GET["edit"])) {
+ include "../adminer/edit.inc.php";
+} elseif (isset($_GET["select"])) {
+ include "../adminer/select.inc.php";
} else {
- if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
- $_GET["edit"] = $_GET["select"];
- }
- if (isset($_GET["edit"])) {
- include "../adminer/edit.inc.php";
- } elseif (isset($_GET["select"])) {
- include "../adminer/select.inc.php";
- } else {
- include "./db.inc.php";
- }
+ include "./db.inc.php";
}
// each page calls its own page_header(), if the footer should not be called then the page exits

0 comments on commit d58858c

Please sign in to comment.