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, $dbh,$charset; $rqt = "select progression from demandes where id_demande='".$this->idobjet."'"; $res = mysql_query($rqt,$dbh); $act = mysql_fetch_object($res); $display =""; $submit = ""; switch($this->champ_entree){ case 'text': $display = "
$submit
"; break; case 'img'; $display = "
$submit
"; break; default: $display = ""; break; } $this->display = $display; } function update(){ global $dbh, $progressiondemande; $req = "update demandes set progression='".$progressiondemande."' where id_demande='".$this->idobjet."'"; mysql_query($req,$dbh); switch($this->champ_sortie){ case 'img': $this->display = ""; break; default: $this->display = $progressiondemande."%"; break; } } } ?>