';
if (!isset($page) || $page == '') {
$page = 1;
}
if (!empty($cart_)) {
//gestion des notices externes (sauvegarde)
$cart_ext = array();
for ($i = 0; $i < sizeof($cart_); $i++){
if (strpos($cart_[$i], 'es') !== false) {
$cart_ext[] = $cart_[$i];
}
}
print
"
";
}
if (!empty($opac_allow_download_docnums)) {
print "
";
print
"
";
}
if (!empty($opac_shared_lists) && !empty($allow_liste_lecture) && !empty($id_empr)) {
print
"
";
}
if (!empty($opac_show_suggest) && !empty($opac_allow_multiple_sugg) && !empty($allow_sugg) && !empty($id_empr)) {
print "
";
print '
';
print "
";
print "
";
print '
';
print '';
//Affichage du selecteur de source
$req = 'select * from suggestions_source order by libelle_source';
$res = pmb_mysql_query($req);
$option = '';
while ($src = pmb_mysql_fetch_object($res)) {
$option .= "";
}
$selecteur = "";
print $selecteur;
print "";
print '
';
}
//resas
if (!isset($id_empr)) {
$id_empr = '';
}
if (!empty($opac_resa) && $opac_resa_planning != 1 && !empty($id_empr) && !empty($opac_resa_cart)) {
print '
';
if (!empty($opac_resa_popup)) {
print "
";
} else {
print "
";
}
//resas planifiees
} elseif(!empty($opac_resa) && $opac_resa_planning == '1' && !empty($id_empr) && !empty($opac_resa_cart)) {
print '
';
if ($opac_resa_popup) {
print "
";
} else {
print "
";
}
}
// Demande de numérisation
if (!empty($opac_scan_request_activate) && !empty($allow_scan_request) && !empty($id_empr)) {
print "
";
}
//Tri
if (isset($_SESSION['last_sortnotices']) && $_SESSION['last_sortnotices'] !=='') {
$sort = new sort('notices', 'session');
$sql = "SELECT notice_id FROM notices WHERE notice_id IN (";
for ($z = 0; $z < count($cart_); $z++) {
$sql .= "'". $cart_[$z] ."',";
}
$sql = substr($sql, 0, strlen($sql) - 1) .")";
$sql = $sort->appliquer_tri($_SESSION['last_sortnotices'], $sql, 'notice_id', 0, 0);
} else {
$sql = "select notice_id from notices where notice_id in ('".implode("','", $cart_)."') order by tit1";
}
$res = pmb_mysql_query($sql);
$cart_ = array();
while ($r = pmb_mysql_fetch_object($res)) {
$cart_[] = $r->notice_id;
}
if (!empty($cart_ext)) {
$cart_ = array_merge($cart_, $cart_ext);
}
$_SESSION['cart'] = $cart_;
if ($opac_export_allow == '1' || ($opac_export_allow == '2' && $_SESSION['user_code'])) {
$nb_fiche = 0;
$nb_fiche_total = count($cart_);
for ($z = 0; $z < $nb_fiche_total; $z++) {
if (substr($cart_[$z], 0, 2) != "es") {
// Exclure de l'export (opac, panier) les fiches interdites de diffusion dans administration, Notices > Origines des notices NG72
$sql = "select 1 from origine_notice,notices where notice_id = '$cart_[$z]' and origine_catalogage = orinot_id and orinot_diffusion='1'";
} else {
$requete = "SELECT source_id FROM external_count WHERE rid=".addslashes(substr($cart_[$z], 2));
$myQuery = pmb_mysql_query($requete);
$source_id = pmb_mysql_result($myQuery, 0, 0);
$sql = "select 1 from entrepot_source_$source_id where recid='".addslashes(substr($cart_[$z], 2))."' group by ufield,usubfield,field_order,subfield_order,value";
}
$res = pmb_mysql_query($sql);
if (!empty(pmb_mysql_fetch_array($res))) {
$nb_fiche++;
}
}
if ($nb_fiche != $nb_fiche_total) {
$msg_export_partiel = str_replace ('!!nb_export!!', $nb_fiche, $msg['export_partiel']);
$msg_export_partiel = str_replace ('!!nb_total!!', $nb_fiche_total, $msg_export_partiel);
$js_export_partiel = "if (confirm('".addslashes($msg_export_partiel)."')) {";
} else {
$js_export_partiel = "if (true) {";
}
print "
';
}
}
if ($opac_cart_more_actions_activate) {
print '