static function getEtat($idpatient, $idapp = '1') { $req = new clResultQuery(); $param['cw'] = "where r.idpatient=p.idpatient and (etat='a' or etat='b' or etat='c' or etat='d') and r.idpatient={$idpatient} and idapplication={$idapp}"; $param['base'] = clListeRadios::getBaseFromIdApp($idapp); $res = $req->Execute("Fichier", "getRadios", $param, "ResultQuery"); $l = ''; if ($res['INDIC_SVC'][2]) { switch ($res['etat'][0]) { case 'a': $text = '<b>Statut : </b> Demande de radio effectuée.'; $l = 'A'; break; case 'b': $text = '<b>Statut : </b> Patient pris en charge à la radio.'; $l = 'B'; break; case 'c': $text = '<b>Statut : </b> Radio en cours...'; $l = 'C'; break; case 'd': $text = '<b>Statut : </b> Radio terminée...'; $l = 'D'; break; } if ($res['commentaire_radio'][0]) { $comm = "<br/><b>Commentaire : </b>" . addslashes(htmlentities(nl2br($res['commentaire_radio'][0]))); } else { $comm = ''; } $text = $text . $comm; return '<img src="images/radio' . $l . ($res['commentaire_radio'][0] ? 'C' : '') . '.png" alt="radio" onmouseover="return overlib(\'' . $text . '\');" onmouseout="return nd();" />'; } else { return ''; } }