Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 289 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 289 Rev 294
Line 41... Line 41...
41
    	$requete = 'INSERT INTO ods_especes ';
41
    	$requete = 'INSERT INTO ods_especes ';
42
    	$champs = array('oe_id_espece');
42
    	$champs = array('oe_id_espece');
43
    	$valeurs = array("''");
43
    	$valeurs = array("''");
44
    	foreach($params as $param => $valeur) {
44
    	foreach($params as $param => $valeur) {
45
    		$champs[] = 'oe_'.$param;
45
    		$champs[] = 'oe_'.$param;
-
 
46
    		$valeur = stripslashes($valeur);
46
    		$valeurs[] = $this->proteger($valeur);
47
    		$valeurs[] = $this->proteger($valeur);
47
    	}
48
    	}
48
    	$champs[] = 'oe_ce_climat';
49
    	$champs[] = 'oe_ce_climat';
49
    	$valeurs[] = $this->proteger(0);
50
    	$valeurs[] = $this->proteger(0);
50
    	$requete .= '('.implode(', ', $champs).') VALUES ('.implode(', ', $valeurs).')';
51
    	$requete .= '('.implode(', ', $champs).') VALUES ('.implode(', ', $valeurs).')';
Line 69... Line 70...
69
    	$controle = new ControleUtilisateur($this->config);
70
    	$controle = new ControleUtilisateur($this->config);
70
    	$controle->controleAppelIpAutorisee();
71
    	$controle->controleAppelIpAutorisee();
Line 71... Line 72...
71
 
72
 
72
    	$requete = 'UPDATE ods_especes SET ';	
73
    	$requete = 'UPDATE ods_especes SET ';	
-
 
74
    	foreach($params as $param => $valeur) {
73
    	foreach($params as $param => $valeur) {
75
    		$valeur = stripslashes($valeur);
74
    		$requete .= 'oe_'.$param.' = '.$this->proteger($valeur).', ';
76
    		$requete .= 'oe_'.$param.' = '.$this->proteger($valeur).', ';
75
    	}
77
    	}
76
    	$requete = rtrim ($requete, ', ');
78
    	$requete = rtrim ($requete, ', ');