Subversion Repositories Applications.referentiel

Rev

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

Rev 181 Rev 267
Line 54... Line 54...
54
			$this->url->unsetVariablesRequete(array('module', 'action', 'ref'));
54
			$this->url->unsetVariablesRequete(array('module', 'action', 'ref'));
55
			$donnees['url_form'] = $this->url->getUrl();
55
			$donnees['url_form'] = $this->url->getUrl();
56
			$donnees['url_module'] = 'Test';
56
			$donnees['url_module'] = 'Test';
57
			$donnees['url_action_demande'] = 'demanderTraitement';
57
			$donnees['url_action_demande'] = 'demanderTraitement';
58
			$donnees['url_action_rafraichir'] = 'afficherInterface';
58
			$donnees['url_action_rafraichir'] = 'afficherInterface';
-
 
59
			$donnees['url_action_importer'] = 'importerReferentiel';
-
 
60
			$donnees['url_importation'] = $donnees['url_form'].
-
 
61
				'?module='.$donnees['url_module'].'&action='.$donnees['url_action_importer'].'&ref='.$this->referentiel;
Line 59... Line 62...
59
			
62
			
60
			// Traitement de l'info sur le code du référentiel
63
			// Traitement de l'info sur le code du référentiel
61
			if (isset($this->referentiel)) {
64
			if (isset($this->referentiel)) {
62
				// Récupération du nom du référentiel courrant
65
				// Récupération du nom du référentiel courrant
Line 96... Line 99...
96
	 */
99
	 */
97
	public function demanderTraitement() {
100
	public function demanderTraitement() {
98
		$this->ajouterTraitement($this->referentiel, self::SCRIPT_A_LANCER);
101
		$this->ajouterTraitement($this->referentiel, self::SCRIPT_A_LANCER);
99
		$this->afficherInterface();
102
		$this->afficherInterface();
100
	}
103
	}
-
 
104
	
-
 
105
	/**
-
 
106
	* Lance l'importation d'un référentiel au format taxref dans une table bdnt_taxref
-
 
107
	*/
-
 
108
	public function importerReferentiel() {print_r($_FILES['nom_fichier']);
-
 
109
		if (isset($_FILES['nom_fichier']) && $_FILES['nom_fichier']['name'] != '') {
-
 
110
			$destination = Config::get('chemin_tmp').$_FILES['nom_fichier']['name'];
-
 
111
			move_uploaded_file($_FILES['nom_fichier']['tmp_name'], $destination);
-
 
112
			$this->ajouterTraitementParametre($this->referentiel, $destination, 'importation');
-
 
113
		} else {
-
 
114
			$this->addMessage("Aucun fichier n'a été précisé.");
-
 
115
		}
-
 
116
		$this->afficherInterface();
-
 
117
	}
101
}
118
}
102
?>
119
?>
103
120