setDomain(1);
$acces_j = $dom_1->getJoin($PMBuserid,8,'bulletin_notice');
$q = "select count(1) from bulletins $acces_j where bulletin_id = $bul_id ";
$r = pmb_mysql_query($q);
if(pmb_mysql_result($r,0,0)==0) {
$acces_m=0;
}
}
if ($acces_m==0) {
error_message('', htmlentities($dom_1->getComment('mod_bull_error'), ENT_QUOTES, $charset), 1, '');
} else {
print "
".$msg['catalog_notices_suppression']."
";
$sql_circ = pmb_mysql_query("select 1 from serialcirc_expl,exemplaires,bulletins where num_serialcirc_expl_id =expl_id and expl_bulletin=bulletin_id and bulletin_id=$bul_id ") ;
if (pmb_mysql_num_rows($sql_circ)) {
// gestion erreur: circulation en cours
error_message($msg[416], $msg["serialcirc_bull_no_del"], 1, bulletinage::get_permalink($bul_id));
} else{
$requete = "select 1 from pret, exemplaires, bulletins where bulletin_id='$bul_id' ";
$requete .="and pret_idexpl=expl_id and expl_bulletin=bulletin_id ";
$result=@pmb_mysql_query($requete);
if (pmb_mysql_num_rows($result)) {
// gestion erreur pret en cours
error_message($msg[416], $msg['impossible_bull_del_pret'], 1, bulletinage::get_permalink($bul_id));
} else {
$myBulletinage = new bulletinage($bul_id);
$myBulletinage->delete();
$retour = serial::get_permalink($myBulletinage->bulletin_notice);
// form de retour vers la page de gestion du periodique chapeau (auto-submit)
print "
";
}
}
}
?>