Simplify includes
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@715 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
c191cfa01f
commit
481e838ba2
|
@ -2,3 +2,4 @@
|
||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Disposition: attachment; filename=" . friendly_url("$_GET[download]-" . implode("_", $_GET["where"])) . "." . friendly_url($_GET["field"]));
|
header("Content-Disposition: attachment; filename=" . friendly_url("$_GET[download]-" . implode("_", $_GET["where"])) . "." . friendly_url($_GET["field"]));
|
||||||
echo $dbh->result($dbh->query("SELECT " . idf_escape($_GET["field"]) . " FROM " . idf_escape($_GET["download"]) . " WHERE " . implode(" AND ", where($_GET)) . " LIMIT 1"));
|
echo $dbh->result($dbh->query("SELECT " . idf_escape($_GET["field"]) . " FROM " . idf_escape($_GET["download"]) . " WHERE " . implode(" AND ", where($_GET)) . " LIMIT 1"));
|
||||||
|
exit; // don't output footer
|
||||||
|
|
|
@ -58,26 +58,25 @@ include "./include/connect.inc.php";
|
||||||
include "./include/editing.inc.php";
|
include "./include/editing.inc.php";
|
||||||
include "./include/export.inc.php";
|
include "./include/export.inc.php";
|
||||||
|
|
||||||
|
$on_actions = array("RESTRICT", "CASCADE", "SET NULL", "NO ACTION");
|
||||||
|
$enum_length = '\'(?:\'\'|[^\'\\\\]+|\\\\.)*\'|"(?:""|[^"\\\\]+|\\\\.)*"';
|
||||||
|
$inout = array("IN", "OUT", "INOUT");
|
||||||
|
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
||||||
|
$error = "";
|
||||||
|
|
||||||
if (isset($_GET["download"])) {
|
if (isset($_GET["download"])) {
|
||||||
include "./download.inc.php";
|
include "./download.inc.php";
|
||||||
} else { // outputs footer
|
} elseif (isset($_GET["table"])) {
|
||||||
$on_actions = array("RESTRICT", "CASCADE", "SET NULL", "NO ACTION");
|
|
||||||
$enum_length = '\'(?:\'\'|[^\'\\\\]+|\\\\.)*\'|"(?:""|[^"\\\\]+|\\\\.)*"';
|
|
||||||
$inout = array("IN", "OUT", "INOUT");
|
|
||||||
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
|
||||||
|
|
||||||
$error = "";
|
|
||||||
if (isset($_GET["table"])) {
|
|
||||||
include "./table.inc.php";
|
include "./table.inc.php";
|
||||||
} elseif (isset($_GET["view"])) {
|
} elseif (isset($_GET["view"])) {
|
||||||
include "./view.inc.php";
|
include "./view.inc.php";
|
||||||
} elseif (isset($_GET["schema"])) {
|
} elseif (isset($_GET["schema"])) {
|
||||||
include "./schema.inc.php";
|
include "./schema.inc.php";
|
||||||
} elseif (isset($_GET["dump"])) {
|
} elseif (isset($_GET["dump"])) {
|
||||||
include "./dump.inc.php";
|
include "./dump.inc.php";
|
||||||
} elseif (isset($_GET["privileges"])) {
|
} elseif (isset($_GET["privileges"])) {
|
||||||
include "./privileges.inc.php";
|
include "./privileges.inc.php";
|
||||||
} else { // uses CSRF token
|
} else { // uses CSRF token
|
||||||
$token = $_SESSION["tokens"][$_GET["server"]];
|
$token = $_SESSION["tokens"][$_GET["server"]];
|
||||||
if ($_POST) {
|
if ($_POST) {
|
||||||
if ($_POST["token"] != $token) {
|
if ($_POST["token"] != $token) {
|
||||||
|
@ -131,6 +130,5 @@ if (isset($_GET["download"])) {
|
||||||
} else {
|
} else {
|
||||||
include "./db.inc.php";
|
include "./db.inc.php";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
page_footer();
|
|
||||||
}
|
}
|
||||||
|
page_footer();
|
||||||
|
|
Loading…
Reference in a new issue