123456789101112131415161718192021222324252627282930 |
- <?php
-
- ini_set('max_execution_time', 0);
- require_once 'auth.php';
-
-
-
-
-
-
-
-
-
-
- if (!$_GET['tableid']) die('Emtpy Table');
- $rs = $adodb->Execute("SELECT * FROM ".$_GET['tableid']);
- if (!$rs) die($adodb->ErrorMsg());
- header("Content-type: text/comma-separated-values");
- header("Content-Disposition: attachment; filename=".$_GET['tableid'].".csv");
- header("Expires: 0");
- header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
- header("Pragma: public");
- while (!$rs->EOF) {
- echo "\"".implode("\",\"", $rs->fields)."\"\n";
- $rs->MoveNext();
- }
- ?>
|