id_element = $id_elt; $format_affichage = explode('/',$fieldElt); $this->champ_entree = $format_affichage[0]; if($format_affichage[1]) $this->champ_sortie = $format_affichage[1]; $ids = explode("_",$id_elt); $this->idobjet = $ids[1]; switch($quoifaire){ case 'edit': $this->make_display(); break; case 'save': $this->update(); break; } } function make_display(){ global $msg, $dbh,$charset; $display =""; $submit = ""; $action = new demandes_actions($this->idobjet); switch($this->champ_entree){ case 'selector': $display = "
"; break; default: $display = "".htmlentities($action->statut_action,ENT_QUOTES,$charset).""; break; } $this->display = $display; } function update(){ global $dbh, $statut; $req = "update demandes_actions set statut_action='".$statut."' where id_action='".$this->idobjet."'"; mysql_query($req,$dbh); $action = new demandes_actions($this->idobjet); $display = ""; switch($this->champ_sortie){ default: for($i=1;$i