Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Simpler index.php structure

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1043 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
commit d58858c1015adb3783a934fd215085f608441768 1 parent d74159b
authored
82  adminer/index.php
@@ -11,6 +11,15 @@
11 11
 $enum_length = '\'(?:\'\'|[^\'\\\\]|\\\\.)*\'|"(?:""|[^"\\\\]|\\\\.)*"';
12 12
 $inout = array("IN", "OUT", "INOUT");
13 13
 
  14
+if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
  15
+	$_GET["edit"] = $_GET["select"];
  16
+}
  17
+if (isset($_GET["callf"])) {
  18
+	$_GET["call"] = $_GET["callf"];
  19
+}
  20
+if (isset($_GET["function"])) {
  21
+	$_GET["procedure"] = $_GET["function"];
  22
+}
14 23
 if (isset($_GET["download"])) {
15 24
 	include "./download.inc.php";
16 25
 } elseif (isset($_GET["table"])) {
@@ -21,49 +30,38 @@
21 30
 	include "./dump.inc.php";
22 31
 } elseif (isset($_GET["privileges"])) {
23 32
 	include "./privileges.inc.php";
  33
+} elseif (isset($_GET["sql"])) {
  34
+	include "./sql.inc.php";
  35
+} elseif (isset($_GET["edit"])) {
  36
+	include "./edit.inc.php";
  37
+} elseif (isset($_GET["create"])) {
  38
+	include "./create.inc.php";
  39
+} elseif (isset($_GET["indexes"])) {
  40
+	include "./indexes.inc.php";
  41
+} elseif (isset($_GET["database"])) {
  42
+	include "./database.inc.php";
  43
+} elseif (isset($_GET["call"])) {
  44
+	include "./call.inc.php";
  45
+} elseif (isset($_GET["foreign"])) {
  46
+	include "./foreign.inc.php";
  47
+} elseif (isset($_GET["view"])) {
  48
+	include "./view.inc.php";
  49
+} elseif (isset($_GET["event"])) {
  50
+	include "./event.inc.php";
  51
+} elseif (isset($_GET["procedure"])) {
  52
+	include "./procedure.inc.php";
  53
+} elseif (isset($_GET["trigger"])) {
  54
+	include "./trigger.inc.php";
  55
+} elseif (isset($_GET["user"])) {
  56
+	include "./user.inc.php";
  57
+} elseif (isset($_GET["processlist"])) {
  58
+	include "./processlist.inc.php";
  59
+} elseif (isset($_GET["select"])) {
  60
+	include "./select.inc.php";
  61
+} elseif (isset($_GET["variables"])) {
  62
+	include "./variables.inc.php";
24 63
 } else {
25  
-	if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
26  
-		$_GET["edit"] = $_GET["select"];
27  
-	}
28  
-	if (isset($_GET["callf"])) {
29  
-		$_GET["call"] = $_GET["callf"];
30  
-	}
31  
-	if (isset($_GET["function"])) {
32  
-		$_GET["procedure"] = $_GET["function"];
33  
-	}
34  
-	if (isset($_GET["sql"])) {
35  
-		include "./sql.inc.php";
36  
-	} elseif (isset($_GET["edit"])) {
37  
-		include "./edit.inc.php";
38  
-	} elseif (isset($_GET["create"])) {
39  
-		include "./create.inc.php";
40  
-	} elseif (isset($_GET["indexes"])) {
41  
-		include "./indexes.inc.php";
42  
-	} elseif (isset($_GET["database"])) {
43  
-		include "./database.inc.php";
44  
-	} elseif (isset($_GET["call"])) {
45  
-		include "./call.inc.php";
46  
-	} elseif (isset($_GET["foreign"])) {
47  
-		include "./foreign.inc.php";
48  
-	} elseif (isset($_GET["view"])) {
49  
-		include "./view.inc.php";
50  
-	} elseif (isset($_GET["event"])) {
51  
-		include "./event.inc.php";
52  
-	} elseif (isset($_GET["procedure"])) {
53  
-		include "./procedure.inc.php";
54  
-	} elseif (isset($_GET["trigger"])) {
55  
-		include "./trigger.inc.php";
56  
-	} elseif (isset($_GET["user"])) {
57  
-		include "./user.inc.php";
58  
-	} elseif (isset($_GET["processlist"])) {
59  
-		include "./processlist.inc.php";
60  
-	} elseif (isset($_GET["select"])) {
61  
-		include "./select.inc.php";
62  
-	} elseif (isset($_GET["variables"])) {
63  
-		include "./variables.inc.php";
64  
-	} else {
65  
-		include "./db.inc.php";
66  
-	}
  64
+	include "./db.inc.php";
67 65
 }
68 66
 
69 67
 // each page calls its own page_header(), if the footer should not be called then the page exits
18  editor/index.php
@@ -8,19 +8,17 @@
8 8
 
9 9
 include "../adminer/include/bootstrap.inc.php";
10 10
 
  11
+if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
  12
+	$_GET["edit"] = $_GET["select"];
  13
+}
11 14
 if (isset($_GET["download"])) {
12 15
 	include "../adminer/download.inc.php";
  16
+} elseif (isset($_GET["edit"])) {
  17
+	include "../adminer/edit.inc.php";
  18
+} elseif (isset($_GET["select"])) {
  19
+	include "../adminer/select.inc.php";
13 20
 } else {
14  
-	if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
15  
-		$_GET["edit"] = $_GET["select"];
16  
-	}
17  
-	if (isset($_GET["edit"])) {
18  
-		include "../adminer/edit.inc.php";
19  
-	} elseif (isset($_GET["select"])) {
20  
-		include "../adminer/select.inc.php";
21  
-	} else {
22  
-		include "./db.inc.php";
23  
-	}
  21
+	include "./db.inc.php";
24 22
 }
25 23
 
26 24
 // each page calls its own page_header(), if the footer should not be called then the page exits

0 notes on commit d58858c

Please sign in to comment.
Something went wrong with that request. Please try again.