setDomain(2); $acces_j = $dom_2->getJoin($_SESSION['id_empr_session'],4,'notice_id'); } if($acces_j) { $statut_j=''; $statut_r=''; } else { $statut_j=',notice_statut'; $statut_r="where statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)".($_SESSION["user_code"]?" or (notice_visible_opac_abon=1 and notice_visible_opac=1)":"").")"; } if($opac_view_restrict) $statut_r.=" and ".$opac_view_restrict; $requete = "select notice_id from notices $acces_j $statut_j $statut_r "; $requete.= "order by create_date desc, notice_id desc limit $last_records"; $result = mysql_query($requete, $dbh); if(mysql_num_rows($result)) { print $last_records_header; // print "
\n"; if ($opac_notices_depliable) print $begin_result_liste; while($notice = mysql_fetch_object($result)) { print pmb_bidi(aff_notice($notice->notice_id)); } // print "
\n"; $plus = $plus + 10; print $last_records_footer; }