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 include_once("ac_common.php");
00025 include_once("class_impress.php");
00026 require_once('class_database.php');
00027 require_once ('header_print.php');
00028 require_once ('class_acc_bilan.php');
00029
00030 require_once ('class_user.php');
00031 require_once('class_dossier.php');
00032 $gDossier=dossier::id();
00033
00034
00035 $cn=new Database($gDossier);
00036
00037 $bilan=new Acc_Bilan($cn);
00038 $bilan->get_request_get();
00039 $bilan->load();
00040
00041 if ( $bilan->b_type=='odt')
00042 {
00043 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
00044 header("Cache-Control: must-revalidate");
00045 header('Content-type: application/vnd.oasis.opendocument.text');
00046 header('Content-Disposition: attachment;filename="'.$bilan->b_name.'.odt"',FALSE);
00047 header("Accept-Ranges: bytes");
00048
00049 }
00050 if ( $bilan->b_type=='ods')
00051 {
00052 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
00053 header("Cache-Control: must-revalidate");
00054 header('Content-type: application/vnd.oasis.opendocument.spreadsheet');
00055 header('Content-Disposition: attachment;filename="'.$bilan->b_name.'.ods"',FALSE);
00056 header("Accept-Ranges: bytes");
00057
00058 }
00059
00060 $bilan->generate();
00061 ?>