".$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 "
"; jscript_checkbox() ; ?>