"; print "

".$msg["print_cart_title"]."

\n"; print "
"; //Affichage de la s�lection des paniers $requete="select caddie.*,count(object_id) as nb_objects, count(flag=1) as nb_flags from caddie left join caddie_content on caddie_id=idcaddie group by idcaddie order by type, name, comment"; $resultat=mysql_query($requete); $ctype=""; while ($ca=mysql_fetch_object($resultat)) { $ca_auth=explode(" ",$ca->autorisations); $as=in_array(SESSuserid,$ca_auth); if (($as!==false)&&($as!==null)) { if ($ca->type!=$ctype) { $ctype=$ca->type; $print_cart[$ctype]["titre"]="".$msg["caddie_de_".$ca->type]."
"; } if (($parity=1-$parity)) $pair_impair = "even"; else $pair_impair = "odd"; $tr_javascript=" onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" "; $print_cart[$ctype]["cart_list"].= pmb_bidi(" "); $link = "print_cart.php?action=print&object_type=".$object_type."&idcaddie=".$ca->idcaddie."&item=$item¤t_print=$current_print"; $print_cart[$ctype]["cart_list"].= pmb_bidi( "".$ca->name."") ; if ($ca->comment) $print_cart[$ctype]["cart_list"].= pmb_bidi("
(".$ca->comment.")"); $print_cart[$ctype]["cart_list"].= pmb_bidi(" ".$ca->nb_flags."". $msg[caddie_contient_pointes]." / $ca->nb_objects $aff_lien "); } } print "  ".$msg["print_size_current_page"]."
 ".$msg["print_size_all"]."
 ".$msg["cart_include_child"]; print "
"; print pmb_bidi("
".$msg['caddie_add_search']."
"); foreach($print_cart as $key => $cart_type) { print gen_plus($key,$cart_type["titre"],"".$cart_type["cart_list"]."
",1); } print ""; $boutons_select=" "; $lien_creation=1; $object_type="NOTI"; if ($lien_creation) { print "

$boutons_select 
"; } else { print "

$boutons_select
"; } print "
"; } if ($action=="print") { if ($_SESSION["session_history"][$current_print]) { if($_SESSION["session_history"][$current_print]["NOTI"]) $_SESSION["PRINT_CART"]=$_SESSION["session_history"][$current_print]["NOTI"]; else if($_SESSION["session_history"][$current_print]["EXPL"]) $_SESSION["PRINT_CART"]=$_SESSION["session_history"][$current_print]["EXPL"]; $_SESSION["PRINT_CART"]["caddie"]=$caddie; $_SESSION["PRINT_CART"]["pager"]=$pager; $_SESSION["PRINT_CART"]["include_child"]=$include_child; echo ""; } else { echo ""; } } if (($action=="")&&($_SESSION["PRINT_CART"])) { $environement=$_SESSION["PRINT_CART"]; $object_type="NOTI"; if ($environement["TEXT_QUERY"]) { $requete=$environement["TEXT_QUERY"]; if ($_SESSION["tri"]) { $sort=new sort('notices','base'); //$requete = $sort->appliquer_tri($_SESSION["tri"], $requete, "notice_id"); if ($nb_per_page_search) { //$requete .= " LIMIT ".$page*$nb_per_page_search.",".$nb_per_page_search; $requete = $sort->appliquer_tri($_SESSION["tri"], $requete, "notice_id" , $page*$nb_per_page_search , $nb_per_page_search); } else { $requete = $sort->appliquer_tri($_SESSION["tri"], $requete, "notice_id" ,0 ,0); } } if (!$environement["pager"]) { $p=strpos($requete,"limit"); if ($p) { $requete=substr($requete,0,$p); } } } else { switch ($environement["SEARCH_TYPE"]) { case "extended": $sh=new search(); $table=$sh->make_search(); if ($environement["pager"]) $limit="limit ".($nb_per_page_search*$page).",$nb_per_page_search"; $requete="select notice_id from $table ".$limit; break; case "cart": if ($environement["pager"]) $limit="limit ".($nb_per_page_search*($page-1)).",$nb_per_page_search"; $requete="select object_id as notice_id from caddie_content where caddie_id=".$idcaddie." ".$limit; break; case "expl": $sh=new search(true,"search_fields_expl"); $table=$sh->make_search(); if ($environement["pager"]) $limit="limit ".($nb_per_page_search*$page).",$nb_per_page_search"; $requete="select expl_id as notice_id from $table ".$limit; $object_type="EXPL"; break; } } if ($environement["caddie"]) { foreach ($environement["caddie"] as $environement_caddie) { $c=new caddie($environement_caddie); $nb_items_before=$c->nb_item; $resultat=@mysql_query($requete); print mysql_error(); while (($r=mysql_fetch_object($resultat))) { if($environement["include_child"]) { $tab_list_child=notice::get_list_child($r->notice_id); if(count($tab_list_child)) foreach ($tab_list_child as $notice_id) { $c->add_item($notice_id,$object_type); } } else $c->add_item($r->notice_id,$object_type); } $c->compte_items(); $message.=sprintf($msg["print_cart_n_added"]."\\n",($c->nb_item-$nb_items_before),$c->name); } print ""; } else { print ""; } $_SESSION["PRINT_CART"]=false; } print $footer; ?>