Simplify includes

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@715 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-06-18 04:27:02 +00:00
parent c191cfa01f
commit 481e838ba2
2 changed files with 70 additions and 71 deletions

View file

@ -2,3 +2,4 @@
header("Content-Type: application/octet-stream");
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"));
exit; // don't output footer

View file

@ -58,16 +58,15 @@ include "./include/connect.inc.php";
include "./include/editing.inc.php";
include "./include/export.inc.php";
if (isset($_GET["download"])) {
include "./download.inc.php";
} else { // outputs footer
$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"])) {
if (isset($_GET["download"])) {
include "./download.inc.php";
} elseif (isset($_GET["table"])) {
include "./table.inc.php";
} elseif (isset($_GET["view"])) {
include "./view.inc.php";
@ -133,4 +132,3 @@ if (isset($_GET["download"])) {
}
}
page_footer();
}