Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00024 header('Pragma: public');
00025 header('Content-type: application/csv');
00026 header('Content-Disposition: attachment;filename="fiche.csv"',FALSE);
00027 include_once ("ac_common.php");
00028 include_once('class_fiche.php');
00029 require_once('class_database.php');
00030 require_once('class_dossier.php');
00031 $gDossier=dossier::id();
00032
00033 $cn=new Database($gDossier);
00034
00035 require_once ('class_user.php');
00036
00037
00038
00039 if ( isset ($_GET['fd_id']))
00040 {
00041 $fiche_def=new Fiche_Def($cn,$_GET ['fd_id']);
00042 $fiche=new Fiche($cn);
00043 $e=$fiche_def->get_by_type();
00044 $o=0;
00045
00046 $fiche_def->GetAttribut();
00047 foreach ($fiche_def->attribut as $attribut)
00048 {
00049 if ( $o == 0 )
00050 {
00051 printf("%s",$attribut->ad_text);
00052 $o=1;
00053 }
00054 else
00055 {
00056 printf(";%s",$attribut->ad_text);
00057 }
00058 }
00059 printf("\n");
00060 $o=0;
00061
00062
00063 foreach ($e as $fiche)
00064 {
00065 $detail=new Fiche($cn,$fiche['f_id']);
00066
00067 $detail->getAttribut();
00068
00069 foreach ( $detail->attribut as $dattribut )
00070 {
00071 if ( $o == 0 )
00072 {
00073 printf("%s",$dattribut->av_text);
00074 $o=1;
00075 }
00076 else
00077 {
00078 printf (";%s",$dattribut->av_text);
00079
00080 }
00081 }
00082 printf("\n");
00083 $o=0;
00084 }
00085
00086
00087 }
00088 exit;
00089 ?>