27 require_once
'include/class_formulaire_param.php';
28 require_once
'include/class_rapav_declaration.php';
31 if (
$act ==
'rapav_form_export')
36 if (
$act ==
'export_decla_csv')
41 $orient=(
$decl->d_step==0)?
"list":
"table";
45 if (
$act ==
'export_decla_document')
52 if (
$decl->d_filename ==
"")
54 ini_set(
'zlib.output_compression',
'Off');
55 header(
"Pragma: public");
56 header(
"Expires: Mon, 26 Jul 1997 05:00:00 GMT");
57 header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
58 header(
"Cache-Control: must-revalidate");
59 header(
'Content-type: ' .
'text/plain');
60 header(
'Content-Disposition: attachment;filename=vide.txt', FALSE);
61 header(
"Accept-Ranges: bytes");
62 echo
"******************";
63 echo _(
"Fichier effacé");
64 echo
"******************";
67 $tmp = tempnam($_ENV[
'TMP'],
'document_');
71 ini_set(
'zlib.output_compression',
'Off');
72 header(
"Pragma: public");
73 header(
"Expires: Mon, 26 Jul 1997 05:00:00 GMT");
74 header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
75 header(
"Cache-Control: must-revalidate");
76 header(
'Content-type: ' .
$decl->d_mimetype);
77 header(
'Content-Disposition: attachment;filename="' .
$decl->d_filename .
'"', FALSE);
78 header(
"Accept-Ranges: bytes");
79 $file = fopen($tmp,
'r');
81 echo fread(
$file, 8192);
89 if (
$act ==
'export_definition_modele')
96 if (
$decl->f_filename ==
"")
98 ini_set(
'zlib.output_compression',
'Off');
99 header(
"Pragma: public");
100 header(
"Expires: Mon, 26 Jul 1997 05:00:00 GMT");
101 header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
102 header(
"Cache-Control: must-revalidate");
103 header(
'Content-type: ' .
'text/plain');
104 header(
'Content-Disposition: attachment;filename=vide.txt', FALSE);
105 header(
"Accept-Ranges: bytes");
106 echo
"******************";
107 echo _(
"Fichier effacé");
108 echo
"******************";
111 $tmp = tempnam($_ENV[
'TMP'],
'document_');
115 ini_set(
'zlib.output_compression',
'Off');
116 header(
"Pragma: public");
117 header(
"Expires: Mon, 26 Jul 1997 05:00:00 GMT");
118 header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
119 header(
"Cache-Control: must-revalidate");
120 header(
'Content-type: ' .
$decl->f_mimetype);
121 header(
'Content-Disposition: attachment;filename="' .
$decl->f_filename .
'"', FALSE);
122 header(
"Accept-Ranges: bytes");
123 $file = fopen($tmp,
'r');
125 echo fread(
$file, 8192);
compute, save and display a declaration
static to_csv($p_id, $p_orient="list")
export a declaration to CSV $cn database conx