$opac_nb_max_tri) { $_SESSION['last_sortnotices']=''; } $cart_=(isset($_SESSION['cart']) ? $_SESSION['cart'] : array()); if (isset($raz_cart) && $raz_cart) { $cart_=array(); $_SESSION['cart']=$cart_; } //Traitement des actions if(!isset($action)) $action = ''; if ($action) { switch ($action) { case 'del': for ($i=0; $i var cart_all_checked = false; function check_uncheck_all_cart() { if (cart_all_checked) { setCheckboxes('cart_form', 'notice', false); cart_all_checked = false; document.getElementById('show_cart_checked_all').value = '".$msg['show_cart_check_all']."'; document.getElementById('show_cart_checked_all').title = '".$msg['show_cart_check_all']."'; } else { setCheckboxes('cart_form', 'notice', true); cart_all_checked = true; document.getElementById('show_cart_checked_all').value = '".$msg['show_cart_uncheck_all']."'; document.getElementById('show_cart_checked_all').title = '".$msg['show_cart_uncheck_all']."'; } return false; } function setCheckboxes(the_form, the_objet, do_check) { var elts = document.forms[the_form].elements[the_objet+'[]'] ; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { elts[i].checked = do_check; } } else { elts.checked = do_check; } return true; } function confirm_transform(){ var is_check=false; var elts = document.getElementsByName('notice[]') ; if (!elts) is_check = false ; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { if (elts[i].checked) { return true; } } } if(!is_check){ alert('".$msg['list_lecture_no_ck']."'); return false; } return is_check; } "; print '
'; if (!isset($page) || $page=='') $page=1; if (count($cart_)) { //gestion des notices externes (sauvegarde) $cart_ext = array(); for($i=0;$i       "; if($opac_allow_download_docnums) { print " "; print "

 
"; } if($opac_shared_lists && $allow_liste_lecture && $id_empr){ print "

  "; } if ($opac_show_suggest && $opac_allow_multiple_sugg && $allow_sugg && $id_empr) { print " "; print '

'; print ""; print "  "; print ''; } //resas if($opac_resa && $opac_resa_planning!=1 && $id_empr && $opac_resa_cart) { print '

'; if($opac_resa_popup){ print "  "; }else{ print "  "; } //resas planifiees } elseif($opac_resa && $opac_resa_planning=='1' && $id_empr && $opac_resa_cart) { print '

'; if($opac_resa_popup){ print "  "; } else { print "  "; } } // Demande de numérisation if ($opac_scan_request_activate && $allow_scan_request && $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; $zappliquer_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,$dbh); $cart_=array(); while ($r=pmb_mysql_fetch_object($res)) { $cart_[]=$r->notice_id; } if($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, $dbh); $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,$dbh); if ($ligne=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 "

"; $radio = "
"; $exp = start_export::get_exports(); $selector_exp = "" ; print sprintf($msg['show_cart_export']." ",$selector_exp.$radio); print ""; print " "; print '
'; } } print '
'; if (count($cart_)) { print '

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

'; print '
'; if ($opac_notices_depliable) print $begin_result_liste; if (count($cart_)<=$pmb_nb_max_tri) { $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
'; 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'].'

'; } ?>