Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1030 Rev 1031
Line 108... Line 108...
108
			$this->onglet = $_GET['onglet'];
108
			$this->onglet = $_GET['onglet'];
109
		}
109
		}
110
	}
110
	}
Line 111... Line 111...
111
 
111
 
-
 
112
	private function capturerParametresFormulaire() {
-
 
113
		$this->blocs = array('description', 'ecologie', 'ethnobotanique', 'statuts', 'illustrations',
112
	private function capturerParametresFormulaire() {
114
			'bibliographie', 'repartition', 'nomenclature');
113
		if (!empty($_POST['bloc'])) {
115
		if (!empty($_POST['bloc'])) {
114
			$this->blocs = $_POST['bloc'];
-
 
115
		} else {
-
 
116
			$this->blocs = array('description', 'ecologie', 'ethnobotanique', 'statuts', 'illustrations',
-
 
117
				'bibliographie', 'repartition', 'nomenclature');
116
			$this->blocs = $_POST['bloc'];
118
		}
117
		}
Line 119... Line 118...
119
	}
118
	}
120
 
119
 
121
	public function executerActionParDefaut() {
120
	public function executerActionParDefaut() {
Line 122... Line 121...
122
		$this->executerPdfExport();
121
		$this->executerPdfExport();
-
 
122
	}
-
 
123
 
123
	}
124
	public function executerPdfExport(){
-
 
125
		$this->capturerParametresFormulaire();
124
 
126
		$hash = crc32(implode('-', $this->blocs));
125
	public function executerPdfExport(){
127
		$nom_fichier = $this->getNomFichierValide().'-'.$hash;
Line 126... Line 128...
126
		$nom_fichier = $this->getNomFichierValide();
128
 
127
		$this->fichier_html = $this->chemin_pdf.''.$nom_fichier.'.html';
-
 
-
 
129
		$this->fichier_html = $this->chemin_pdf.''.$nom_fichier.'.html';
128
		$this->fichier_pdf = $this->chemin_pdf.''.$nom_fichier.'.pdf';
130
		$this->fichier_pdf = $this->chemin_pdf.''.$nom_fichier.'.pdf';
129
 
131
 
130
		if (file_exists($this->fichier_pdf) == false) {
132
		if (file_exists($this->fichier_pdf) == false) {
131
			$this->capturerParametresFormulaire();
133
 
132
			$donnees = $this->obtenirDonnees();
134
			$donnees = $this->obtenirDonnees();