source: trunk/spip/2.1/extensions/magusine-portage2.1/squelettes/blocs/webmaton_navigation.html @ 756

Last change on this file since 756 was 756, checked in by guillermoacedo@…, 14 years ago

se agrego la correccion de magusine para 2.1 basica

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1<div id="menu-webmaton" class="listagebloc">
2        <h2><:voir_aussi:></h2>
3        <ul class="listageconteneur">
4        <li><a href="spip.php?page=webmaton-mosaique&id_rubrique=#ID_RUBRIQUE"><:mosaique:></a></li>
5       
6<BOUCLE_questions_webmaton(DOCUMENTS){id_rubrique=#ENV{id_rubrique}}{fichier==^.*questions(-[0-9]*)?\.xml$}{0,1}>
7<?php
8include_spip('inc/xml-parser');
9
10$questions = array();
11
12if (file_exists('#FICHIER')) {
13 $p =& new xmlParser();
14 $p->parse('#FICHIER');
15  /* décommenter ceci pour vérifier si le fichier est correctement lu */
16   //print_r($p->output);
17
18  foreach($p->output[0]['child'] as $groupe) {
19    foreach($groupe["child"] as $prop){
20      if ($prop["name"] == "QUESTIONS") {
21        foreach($prop["child"] as $question) {
22          $questions[strtolower($groupe["attrs"]["PREFIX"])][$question["attrs"]["ID"]] = $question["content"];
23        }
24      }
25    }
26  }
27}
28
29foreach($questions as $langue => $larray){
30        echo "<li><a href='spip.php?page=webmaton-questions&id_rubrique=#ID_RUBRIQUE&prefix=".$langue."'><:questions_en:>  ".traduire_nom_langue($langue)."</a></li>";
31}
32
33?>
34</BOUCLE_questions_webmaton>
35       
36        </ul>
37</div>
Note: See TracBrowser for help on using the repository browser.