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]; } function make_display(){ global $msg, $charset,$dbh; $req="SELECT * from perio_relance where rel_id=".$this->idobjet.""; $res= mysql_query($req); $act = mysql_fetch_object($res); $display =""; $submit = ""; switch($this->champ_entree){ case 'text': $display = "
"; break; default: $display = "".htmlentities($act->rel_comment_opac,ENT_QUOTES,$charset).""; break; } $this->display = $display; } function update(){ global $dbh, $comment_opac; $req = "update perio_relance set rel_comment_opac='".$comment_opac."' where rel_id='".$this->idobjet."'"; mysql_query($req,$dbh); switch($this->champ_sortie){ default : $this->display = $comment_opac; break; } } } ?>