Plugins  LAST
 All Data Structures Files Functions Variables Pages
raw.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 /* $Revision$ */
20 
21 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
22 
23 /*!\file
24  * \brief export the pcmn
25  */
26 $cn=Dossier::connect();
27 
28 $sql="SELECT pcm_val, pcm_lib, pcm_val_parent, pcm_type
29  FROM tmp_pcmn order by pcm_val::text";
30 
31 $array=$cn->get_array($sql);
32 
33 header('Pragma: public');
34 header('Content-type: application/csv');
35 header('Content-Disposition: attachment;filename="pcmn.csv"',FALSE);
36 
37 for ($i=0;$i<count($array);$i++)
38  {
39  printf('"%s";"%s";"%s";"%s"'."\n\r",
40  $array[$i]['pcm_val'],
41  $array[$i]['pcm_lib'],
42  $array[$i]['pcm_val_parent'],
43  $array[$i]['pcm_type']);
44  }
45 ?>
$sql
Definition: raw.php:28
$array
Definition: raw.php:31
$cn
Definition: raw.php:26