Subversion Repositories Applications.referentiel

Rev

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

Rev 356 Rev 358
Line 112... Line 112...
112
		$parametres['version'] = $_POST["version"];
112
		$parametres['version'] = $_POST["version"];
113
		$parametres['version'] = str_replace(".", "_", $parametres['version']);
113
		$parametres['version'] = str_replace(".", "_", $parametres['version']);
114
		if (isset($_POST["champs"])) $parametres['champs'] = implode(",",$_POST["champs"]);
114
		if (isset($_POST["champs"])) $parametres['champs'] = implode(",",$_POST["champs"]);
115
		if (isset($_POST["filtres"])) $parametres['filtres'] = implode(",",$_POST["filtres"]);
115
		if (isset($_POST["filtres"])) $parametres['filtres'] = implode(",",$_POST["filtres"]);
116
		if (isset($_POST["encodage"])) $parametres['encodage'] = $_POST["encodage"];
116
		if (isset($_POST["encodage"])) $parametres['encodage'] = $_POST["encodage"];
-
 
117
		
-
 
118
		$_POST['usage'] = empty($_POST['usage']) ? 'inconnu' : $_POST['usage'];
-
 
119
		$this->loggerExport($_SERVER['REMOTE_ADDR'], $_POST['usage'], $parametres['ref'], $parametres['version']);
-
 
120
		
117
		$this->supprimerAncienExport($dossier);
121
		$this->supprimerAncienExport($dossier);
118
		$ref = $this->referentielDao->exporter($parametres);
122
		$ref = $this->referentielDao->exporter($parametres);
119
		$meta = $this->metaDao->exporter($parametres);
123
		$meta = $this->metaDao->exporter($parametres);
Line 120... Line 124...
120
 
124
 
Line 147... Line 151...
147
		}
151
		}
148
		//$this->transformerEnXls($ref, $dossier);
152
		//$this->transformerEnXls($ref, $dossier);
149
		$this->setSortie(self::RENDU_CORPS, $this->getVue('detail_referentiel', $donnees), false);
153
		$this->setSortie(self::RENDU_CORPS, $this->getVue('detail_referentiel', $donnees), false);
150
	}
154
	}
Line -... Line 155...
-
 
155
	
-
 
156
	private function loggerExport($ip, $usage, $referentiel, $version) {
-
 
157
		$separateur = "\t";
-
 
158
		$ligne = date('Y-m-d H:i:s').$separateur.$ip.$separateur.$usage.$separateur.$referentiel.$separateur.$version."\n";
-
 
159
		file_put_contents(Config::get('base_chemin_log').'telechargements.log', $ligne, FILE_APPEND);
-
 
160
	}
151
	
161
	
152
	public function transformerEnXls($fichier, $dossier) {
162
	public function transformerEnXls($fichier, $dossier) {
Line 153... Line 163...
153
		include '../bibliotheque/utilitaires/PHPExcel/IOFactory.php';
163
		include '../bibliotheque/utilitaires/PHPExcel/IOFactory.php';