id_element = $id_elt; $format_affichage = explode('/',$fieldElt); $this->champ_entree = $format_affichage[0]; if (!empty($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; } } public function make_display(){ global $msg, $dbh,$charset; $display =""; $submit = ""; $action = new demandes_actions($this->idobjet); switch($this->champ_entree){ case 'selector': $display = "
".$action->getStatutSelector($action->statut_action,true).$submit."
"; break; default: $display = ""; break; } $this->display = $display; } public function update(){ global $dbh, $statut; $req = "update demandes_actions set statut_action='".$statut."' where id_action='".$this->idobjet."'"; pmb_mysql_query($req,$dbh); $action = new demandes_actions($this->idobjet); $display = ""; switch($this->champ_sortie){ default: for($i=1;$ilist_statut)+1;$i++){ if($action->list_statut[$i]['id'] == $statut){ $display = $action->list_statut[$i]['comment']; break; } } break; } $this->display = $display; } } ?>