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 = mysql_query($q, $dbh);
if(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 = 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 (mysql_num_rows($sql_circ)) {
// gestion erreur: circulation en cours
error_message($msg[416], $msg["serialcirc_bull_no_del"], 1, "catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=$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=@mysql_query($requete);
if (mysql_num_rows($result)) {
// gestion erreur pret en cours
error_message($msg[416], $msg[impossible_bull_del_pret], 1, "catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=$bul_id");
} else {
$myBulletinage = new bulletinage($bul_id);
$myBulletinage->delete();
$retour = "./catalog.php?categ=serials&sub=view&serial_id=".$myBulletinage->bulletin_notice;
// form de retour vers la page de gestion du periodique chapeau (auto-submit)
print "
";
}
}
}
?>