Subversion Repositories eFlore/Applications.cel

Rev

Rev 1656 | Rev 1660 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1656 Rev 1658
Line 75... Line 75...
75
		$parametres = $this->parametres_defaut;
75
		$parametres = $this->parametres_defaut;
76
		if(isset($params['format'])) {
76
		if(isset($params['format'])) {
77
			if($params['format'] == 'csv') $parametres['format'] = 'CSV';
77
			if($params['format'] == 'csv') $parametres['format'] = 'CSV';
78
			if($params['format'] == 'xls') $parametres['format'] = 'Excel5';
78
			if($params['format'] == 'xls') $parametres['format'] = 'Excel5';
79
			if($params['format'] == 'xlsx') $parametres['format'] = 'Excel2007';
79
			if($params['format'] == 'xlsx') $parametres['format'] = 'Excel2007';
-
 
80
			if($params['format'] == 'pdf') $parametres['format'] = 'pdf';
80
		}
81
		}
81
		// TODO: $params['part'] pour le multi-part
82
		// TODO: $params['part'] pour le multi-part
82
		$parametres['widget'] = isset($params['widget']) ? $params['widget'] : 'CEL';	
83
		$parametres['widget'] = isset($params['widget']) ? $params['widget'] : 'CEL';	
83
		$parametres['debut'] = isset($params['debut']) ? intval($params['debut']) : 0;
84
		$parametres['debut'] = isset($params['debut']) ? intval($params['debut']) : 0;
84
		$parametres['limite'] = isset($params['limite']) ? intval($params['limite']) : 0;
85
		$parametres['limite'] = isset($params['limite']) ? intval($params['limite']) : 0;
Line 141... Line 142...
141
		if(!$observations) {
142
		if(!$observations) {
142
			header('HTTP/1.0 204 No Content');
143
			header('HTTP/1.0 204 No Content');
143
			exit;
144
			exit;
144
		}
145
		}
Line -... Line 146...
-
 
146
 
-
 
147
		if($parametres_format['format'] == 'pdf') {
-
 
148
			if(count($observations) > 15) die('too much');
-
 
149
			require_once('GenerateurPDF.php');
-
 
150
 
-
 
151
			$pdf = new GenerateurPDF();
-
 
152
			$pdf->export($observations);
-
 
153
			//$pdf->export1($observations);
-
 
154
			//$pdf->export2($observations);
-
 
155
			$pdf->pdf->Output('etiquettes.pdf', 'I');
-
 
156
			die;
-
 
157
		}
145
 
158
 
146
		$colonnes = FormateurGroupeColonne::nomEnsembleVersListeColonnes($parametres_format['groupe_champs']);
159
		$colonnes = FormateurGroupeColonne::nomEnsembleVersListeColonnes($parametres_format['groupe_champs']);
147
		// $colonne_abbrev = array_keys($colonnes);
160
		// $colonne_abbrev = array_keys($colonnes);
148
		$objPHPExcel = $this->gerenerFeuilleImportFormatee($parametres_format);
161
		$objPHPExcel = $this->gerenerFeuilleImportFormatee($parametres_format);
149
		$feuille = $objPHPExcel->setActiveSheetIndex(0);
162
		$feuille = $objPHPExcel->setActiveSheetIndex(0);