sujet; $desc = $avis->commentaire; if($charset != "utf-8") $desc=cp1252Toiso88591($desc); } if ($pmb_javascript_office_editor) { $office_editor_cmd_quit="tinyMCE.execCommand('mceRemoveControl', true, 'avis_desc_".$id."');"; $display .= "


"; } else{ $display .= "
"; } print $display; } function update_avis($id){ global $dbh,$desc, $sujet, $msg, $charset; $req = "update avis set sujet='".$sujet."', commentaire='".$desc."' where id_avis='".$id."'"; mysql_query($req,$dbh); $requete = "select avis.note, avis.sujet, avis.commentaire, avis.id_avis, DATE_FORMAT(avis.dateAjout,'".$msg[format_date]."') as ladate, "; $requete.= "empr_login, empr_nom, empr_prenom, "; $requete.= "niveau_biblio, niveau_biblio, valide, notice_id "; $requete.= "from avis "; $requete.= "left join empr on empr.id_empr=avis.num_empr "; $requete.= "left join notices on notices.notice_id=avis.num_notice "; $requete.= "where id_avis='".$id."'"; $requete.= "order by index_serie, tnvol, index_sew ,dateAjout desc "; $res = mysql_query($requete,$dbh); while(($loc = mysql_fetch_object($res))){ $display = "
" ; if (!$loc->valide) $display .= "".$msg[gestion_avis_note]." ".htmlentities($loc->note,ENT_QUOTES,$charset)." ".htmlentities($loc->sujet,ENT_QUOTES, $charset).""; else $display .= "".$msg[gestion_avis_note]." ".htmlentities($loc->note,ENT_QUOTES,$charset)." ".htmlentities($loc->sujet,ENT_QUOTES,$charset).""; if($charset != "utf-8") $loc->commentaire=cp1252Toiso88591($loc->commentaire); $display .= ", ".htmlentities($loc->ladate,ENT_QUOTES,$charset)." ".htmlentities($loc->empr_prenom." ".$loc->empr_nom,ENT_QUOTES,$charset)."
".do_bbcode($loc->commentaire)."
"; } print $display; } ?>