noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
export_rec_csv.php
Go to the documentation of this file.
00001 <?php
00002 //This file is part of NOALYSS and is under GPL 
00003 //see licence.txt
00004 
00005 /**
00006  * Export to CSV the operations asked in impress_rec.inc.php
00007  * variable set $g_user,$cn
00008  * @see impress_rec.inc.php
00009  */
00010 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00011 $Date=date('Ymd');
00012 $filename="reconcialed_operation-".$Date;
00013 
00014 header('Pragma: public');
00015 header('Content-type: application/csv');
00016 header('Content-Disposition: attachment;filename="'.$filename.'.csv"',FALSE);
00017 
00018 require_once 'class_acc_reconciliation.php';
00019 include_once ("ac_common.php");
00020 require_once('class_database.php');
00021 require_once('class_dossier.php');
00022 // --------------------------
00023 // Check if all mandatory arg are passed
00024 foreach (array('choice','p_end','p_start') as $arg)
00025 {
00026     if ( ! isset ($_GET[$arg])) {
00027         die ("argument [".$arg."] is missing");
00028     }
00029 }
00030 extract($_GET);
00031 $r_jrn=(isset($r_jrn))?$r_jrn:'';
00032 // -------------------------
00033 // Create object and export
00034 $acc_reconciliation=new Acc_Reconciliation($cn);
00035 $acc_reconciliation->a_jrn=$r_jrn;
00036 $acc_reconciliation->start_day=$p_start;
00037 $acc_reconciliation->end_day=$p_end;
00038 
00039 $array=$acc_reconciliation->export_csv($choice);
 All Data Structures Namespaces Files Functions Variables Enumerations