noalyss Version-9
export_reportinit_csv.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21
22/*!\file
23 * \brief export definition of a report
24 */
25
26if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
27require_once NOALYSS_INCLUDE.'/constant.php';
28require_once NOALYSS_INCLUDE.'/lib/user_common.php';
29if ( ! isset($_GET['gDossier']) ||
30 ! isset($_GET['f']) )
31{
32 $a='Paramètre manquant';
33 header("Content-type: text/html; charset: utf8",true);
34 print $a;
35 exit();
36}
37
39if ( ! is_dir('tmp') )
40{
41 mkdir ('tmp');
42}
43
46$rap=new Acc_Report($cn,$http->get('f',"number"));
47
48$file= fopen('php://output',"a+");
49header('Pragma: public');
50header('Content-type: application/bin');
51header('Content-Disposition: attachment;filename="export.bin"',FALSE);
52$rap->export_csv($file);
53?>
$input_from id
Definition: balance.inc.php:63
$_GET['qcode']
Class rapport Create, view, modify and parse report.
static connect()
manage the http input (get , post, request) and extract from an array
for($e=0; $e< count($afiche); $e++) exit
if(! is_dir('tmp')) $cn
if(! isset($_GET['gDossier'])||! isset($_GET['f'])) $gDossier
print
Type of printing.