devilbox/.devilbox/www/htdocs/vendor/adminer-4.3.1/adminer/download.inc.php
2017-05-16 20:40:02 +02:00

11 lines
480 B
PHP

<?php
$TABLE = $_GET["download"];
$fields = fields($TABLE);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . friendly_url("$TABLE-" . implode("_", $_GET["where"])) . "." . friendly_url($_GET["field"]));
$select = array(idf_escape($_GET["field"]));
$result = $driver->select($TABLE, $select, array(where($_GET, $fields)), $select);
$row = ($result ? $result->fetch_row() : array());
echo $row[0];
exit; // don't output footer