$opac_nb_max_tri) { $_SESSION['last_sortnotices'] = ''; } $cart_ = (isset($_SESSION['cart']) ? $_SESSION['cart'] : array()); if (!empty($raz_cart)) { $cart_ = array(); $_SESSION['cart'] = $cart_; } //Traitement des actions if (!isset($action)) { $action = ''; } if (!empty($action)) { if ($action == 'del') { for ($i = 0; $i < count($notice); $i++) { $as = array_search($notice[$i], $cart_); if ($as !== null && $as !== false) { //Décalage for ($j = $as + 1; $j < count($cart_); $j++) { $cart_[$j - 1] = $cart_[$j]; } unset($cart_[count($cart_) - 1]); } } $_SESSION['cart'] = $cart_; if (ceil(count($cart_) / $opac_search_results_per_page) < $page) { $page = count($cart_) / $opac_search_results_per_page; } } } print ""; print '
'; 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 ($opac_cart_more_actions_activate) { print "  "; print ""; print "'; } if (!empty($cart_)) { print '

'.$msg['show_cart_content'].' : '.sprintf($msg['show_cart_n_notices'], count($cart_)).'

'; print '
'; if (!empty($opac_notices_depliable)) { print $begin_result_liste; } if (count($cart_) <= $opac_nb_max_tri) { $affich_tris_result_liste = sort::show_tris_selector(); $affich_tris_result_liste = str_replace('!!page_en_cours!!', 'lvl=show_cart', $affich_tris_result_liste); $affich_tris_result_liste = str_replace('!!page_en_cours1!!', 'lvl=show_cart', $affich_tris_result_liste); print $affich_tris_result_liste; } if (isset($_SESSION['last_sortnotices']) && $_SESSION['last_sortnotices'] !== "") { print "".$msg['tri_par'].' '.$sort->descriptionTriParId($_SESSION['last_sortnotices']).' '; } print '
'; // case à cocher de suppression transférée dans la classe notice_affichage $cart_aff_case_traitement = 1 ; print "
"; for ($i = (($page - 1) * $opac_search_results_per_page); ($i < count($cart_) && ($i < ($page * $opac_search_results_per_page))); $i++) { if (substr($cart_[$i], 0, 2) != 'es') { print pmb_bidi(aff_notice($cart_[$i], 1)); } else { print pmb_bidi(aff_notice_unimarc(substr($cart_[$i], 2), 1)); } } print '
'; if(!isset($nb_per_page_custom)) { $nb_per_page_custom = ''; } print '

'.printnavbar($page, count($cart_), $opac_search_results_per_page, './index.php?lvl=show_cart&page=!!page!!&nbr_lignes='.count($cart_).($nb_per_page_custom ? "&nb_per_page_custom=".$nb_per_page_custom : '')).'
'; } else { print '

'.$msg['show_cart_is_empty'].'

'; } print "
"; ?>