categ_name) { $sources[$srce->categ_name][] = $srce; } else { $sources_no_category[] = $srce; } } if(count($sources_no_category)) { $sources[$msg["source_no_category"]] =$sources_no_category; } return $sources; } function do_sources() { global $charset,$source, $dbh, $msg; $r=""; if (!$source) $source=array(); if (count($source)) $_SESSION["checked_sources"]=$source; if (!isset($_SESSION["checked_sources"])) $_SESSION["checked_sources"] = ''; if ($_SESSION["checked_sources"]&&(!$source)) $source=$_SESSION["checked_sources"]; $count = 0; $paquets_de_sources = array(); //Recherche des sources $sources = get_sources(); foreach ($sources as $category_name=>$category) { if (isset($paquets_de_source) && $paquets_de_source) $paquets_de_sources[] = $paquets_de_source; $paquets_de_source = array(); $paquets_de_source["name"] = $category_name; $paquets_de_source["content"] = ''; // gen_plus_form("zsources".$count, $srce->categ_name ,"sdfsdfsdfsdf",true); $count++; foreach ($category as $srce) { $paquets_de_source["id"] = $srce->num_categ; $paquets_de_source["opac_expanded"] = $srce->opac_expanded ? true : false; if(!isset($_SESSION["source_".$srce->source_id."_cancel"])) $_SESSION["source_".$srce->source_id."_cancel"] = 0; $paquets_de_source["content"] .="