Please sign in to comment.
Adds export functionality to tables.
To enable exporting of a table, pass "show_export"=>true to $opts. The table will be generated with "export" set to true in $opts, in case the export structure should be different from the html structure.
- Loading branch information...
Showing with 137 additions and 7 deletions.
|@@ -0,0 +1,25 @@|
|+ Copyright 2009-2012 Edward L. Platt <email@example.com>|
|+ This file is part of the Seltzer CRM Project|
|+ export-csv.php - Exports a table to csv format.|
|+ Seltzer is free software: you can redistribute it and/or modify|
|+ it under the terms of the GNU General Public License as published by|
|+ the Free Software Foundation, either version 3 of the License, or|
|+ any later version.|
|+ Seltzer is distributed in the hope that it will be useful,|
|+ but WITHOUT ANY WARRANTY; without even the implied warranty of|
|+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the|
|+ GNU General Public License for more details.|
|+ You should have received a copy of the GNU General Public License|
|+ along with Seltzer. If not, see <http://www.gnu.org/licenses/>.|
|+header('Content-Disposition: attachment; filename="export.csv"');|
|+print theme('table_csv', $_GET['name'], json_decode($_GET['opts'], true));|