Agregation Russe

"ang", 960 =>"ita", 961 =>"let", 965 =>"phi", 966 =>"his", 967 =>"geo", 986 =>"rus"]; $id=$_GET['id']; // 1350 => "https://bu.univ-lyon3.fr/information-communication" $urls = [ 959 => "https://bu.univ-lyon3.fr/agregation-anglais", 960 => "https://bu.univ-lyon3.fr/agregation-italien", 961 => "https://bu.univ-lyon3.fr/agregation-capes-lettres-modernes", 965 => "https://bu.univ-lyon3.fr/agregation-philosophie", 966 => "https://bu.univ-lyon3.fr/capes-histoire-et-geographie", 967 => "https://bu.univ-lyon3.fr/agregation-histoire", 986 => "", 1286 => "https://bu.univ-lyon3.fr/agregation-geographie", 1314 => "https://bu.univ-lyon3.fr/agregation-russe-1" ]; $url = "http://catalogue.univ-lyon3.fr/cgi-bin/koha/svc/report?id=$id"; $json = file_get_contents($url); $liste = json_decode($json,true); $count=1; //var_dump($liste); $themes=[]; $url = $urls[$id]; if ($url){ echo "

Listes par thème :

"; } foreach ($liste as $key) { $theme = $key[0]; $themelink = preg_replace('/^\s+|\s+$/','',$theme); if (!$themes[$theme] and $url) { echo "$theme"; } $themes[$theme]=1; } if ($url){ echo "
"; } foreach (array_keys($themes) as $theme){ $theme_anchor = preg_replace('/^\s+|\s+$/','',$theme); echo "

$theme

"; foreach ($liste as $key) { if ($key[0] == $theme) { $titre=$key[1];$auteur=$key[2];$ville=$key[3];$editeur=$key[4];$annee=$key[5]; echo "

$count.
$titre / $auteur. "; echo "$ville : $editeur"; if ($annee) echo ", $annee"; echo "

"; $count++; } } } echo "" /* echo " "; */ ?>