mirror of https://github.com/harish2704/dotFiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
521 B
10 lines
521 B
<?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 $driver->value($row[0], $fields[$_GET["field"]]);
|
|
exit; // don't output footer
|
|
|