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; } } public function make_display(){ global $msg,$dbh,$charset; $rqt = "select progression_action as prog from demandes_actions where id_action='".$this->idobjet."'"; $res = pmb_mysql_query($rqt,$dbh); $act = pmb_mysql_fetch_object($res); $display =""; $submit = ""; switch($this->champ_entree){ case 'text': $display = "
"; break; default: $display = "".htmlentities($act->prog,ENT_QUOTES,$charset).""; break; } $this->display = $display; } public function update(){ global $dbh, $progression; $req = "update demandes_actions set progression_action='".$progression."' where id_action='".$this->idobjet."'"; pmb_mysql_query($req,$dbh); switch($this->champ_sortie){ default: $this->display = ""; break; } } } ?>