".$msg[titre_avis].""; if (!$montrerquoi) $montrerquoi='novalid' ; if (!$nb_per_page) $nb_per_page=10; //droits d'acces utilisateur/notice $acces_jm=''; $acces_jl=''; if ($gestion_acces_active==1 && $gestion_acces_user_notice==1) { require_once("$class_path/acces.class.php"); $ac= new acces(); $dom_1= $ac->setDomain(1); $acces_jm = $dom_1->getJoin($PMBuserid,8,'num_notice'); //modification $acces_jl = $dom_1->getJoin($PMBuserid,4,'num_notice'); //lecture } //action = VALIDER l'avis switch ($quoifaire) { case 'valider': for ($i=0 ; $i < sizeof($valid_id_avis) ; $i++) { $acces_m=1; if ($acces_jm) { $q = "select count(1) from avis $acces_jm where id_avis=".$valid_id_avis[$i]; $r = mysql_query($q, $dbh); if(mysql_result($r,0,0)==0) { $acces_m=0; } } if ($acces_m!=0) { $rqt = "update avis set valide=1 where id_avis='".$valid_id_avis[$i]."' "; mysql_query ($rqt, $dbh) ; } } break; case 'invalider': for ($i=0 ; $i < sizeof($valid_id_avis) ; $i++) { $acces_m=1; if ($acces_jm) { $q = "select count(1) from avis $acces_jm where id_avis=".$valid_id_avis[$i]; $r = mysql_query($q, $dbh); if(mysql_result($r,0,0)==0) { $acces_m=0; } } if ($acces_m!=0) { $rqt = "update avis set valide=0 where id_avis='".$valid_id_avis[$i]."' "; mysql_query ($rqt, $dbh) ; } } break; case 'supprimer' : for ($i=0 ; $i < sizeof($valid_id_avis) ; $i++) { $acces_m=1; if ($acces_jm) { $q = "select count(1) from avis $acces_jm where id_avis=".$valid_id_avis[$i]; $r = mysql_query($q, $dbh); if(mysql_result($r,0,0)==0) { $acces_m=0; } } if ($acces_m!=0) { $rqt = "delete from avis where id_avis='".$valid_id_avis[$i]."' "; mysql_query ($rqt, $dbh) ; } } break; default: break; } if($pmb_javascript_office_editor) print $pmb_javascript_office_editor; echo "

".$msg[avis_titre_form]."

"; $aff_final .= "
  
"; print $aff_final ; //variables if(!$page) $page=1; $debut =($page-1)*$nb_per_page; $url_base = "./catalog.php?categ=avis&montrerquoi=$montrerquoi"; switch ($montrerquoi) { case 'all': $restrict = " 1 " ; break; case 'valid' : $restrict = " valide='1' " ; break; default: case 'novalid' : $restrict = " valide='0' " ; break; } //requete d'affichage des notices.titre et des commentaires $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.= "$acces_jl "; $requete.= "where $restrict "; $requete.= "order by index_serie, tnvol, index_sew ,dateAjout desc "; if(!$nbr_lignes) { $r = mysql_query($requete, $dbh) or die (mysql_error()."

".$requete); $nbr_lignes=mysql_num_rows($r); } $requete.= "limit $debut, $nb_per_page"; $r = mysql_query($requete, $dbh) or die (mysql_error()."

".$requete); if (mysql_num_rows($r)) { //affichage des notices print $begin_result_liste; $res_final = ""; $notice_id=0; while ($loc = mysql_fetch_object($r)) { if ($notice_id!=$loc->notice_id) { if ($notice_id!=0) $res_final .= "
" ; $notice_id=$loc->notice_id; $deb = 1 ; if($loc->niveau_biblio != 's' && $loc->niveau_biblio != 'a') { // notice de monographie $link = './catalog.php?categ=isbd&id=!!id!!'; $link_expl = './catalog.php?categ=edit_expl&id=!!notice_id!!&cb=!!expl_cb!!&expl_id=!!expl_id!!'; $link_explnum = './catalog.php?categ=edit_explnum&id=!!notice_id!!&explnum_id=!!explnum_id!!'; $display = new mono_display($loc->notice_id, 6, $link, 1, $link_expl, '', $link_explnum,1, 0, 1, 1); $res_final .= pmb_bidi($display->result); } else { // on a affaire à un périodique $link_serial = './catalog.php?categ=serials&sub=view&serial_id=!!id!!'; $link_analysis = './catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!bul_id!!&art_to_show=!!id!!'; $link_bulletin = './catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!id!!'; $link_explnum = "./catalog.php?categ=serials&sub=analysis&action=explnum_form&bul_id=!!bul_id!!&analysis_id=!!analysis_id!!&explnum_id=!!explnum_id!!"; $serial = new serial_display($loc->notice_id, 6, $link_serial, $link_analysis, $link_bulletin, "", $link_explnum_serial, 0, 0, 1, 1, true, 1 ); $res_final .= pmb_bidi($serial->result); } $res_final .= "
" ; print $res_final ; } print aff_pagination ($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true) ; echo "
"; echo "
     
 
"; jscript_checkbox() ; ?>