[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 include ("inc.php"); 20 21 debut_page(_T('titre_page_articles_tous'), "asuivre", "tout-site"); 22 23 echo "<div> </div>"; 24 25 if ($spip_ecran == "large") { 26 $largeur_table = 974; 27 $hauteur_table = 400; 28 $nb_col = 4; 29 } 30 else { 31 $largeur_table = 750; 32 $hauteur_table = 300; 33 $nb_col = 3; 34 } 35 36 $largeur_col = round($largeur_table / $nb_col); 37 38 echo "<table border='0' cellpadding='0' cellspacing='2' width='$largeur_table'>"; 39 40 if ($id_rubrique) { 41 $j = $nb_col; 42 43 while ($id_rubrique > 0) { 44 /**************** Modification elebescond@clever-age.com ******************/ 45 $rubriqueMetier = &recuperer_instance_rubrique(); 46 $loadOK = $rubriqueMetier->load($id_rubrique); 47 if (PEAR::isError($loadOK)) { 48 die ($loadOK->getMessage()); 49 } 50 else { 51 $j = $j - 1; 52 $ze_rubrique = $rubriqueMetier->getRubriqueId(); 53 $titre = $rubriqueMetier->getTitre(); 54 $id_rubrique = $rubriqueMetier->getParentId(); 55 56 $dest[$j] = $ze_rubrique; 57 } 58 } 59 60 $dest[$j - 1] = 0; 61 62 while (!$dest[1]) { 63 for ($i = 0; $i < $nb_col; $i++) { 64 $dest[$i] = $dest[$i + 1]; 65 } 66 } 67 if ($dest[0] > 0 AND $parent = $dest[$nb_col - 2]) { 68 // Affiche la hierarchie pour "remonter" 69 echo "<tr><td colspan='$nb_col' style='text-align: $spip_lang_left;'>"; 70 $la_rubrique = $dest[0]; 71 $rubriqueMetier = &recuperer_instance_rubrique(); 72 $loadOK = $rubriqueMetier->load($la_rubrique); 73 74 if (PEAR::isError($loadOK)) { 75 die ($loadOK->getMessage()); 76 } 77 else { 78 $la_rubrique = $rubriqueMetier->getParentId(); 79 } 80 81 while ($la_rubrique > 0) { 82 $rubriqueMetier = &recuperer_instance_rubrique(); 83 $loadOK = $rubriqueMetier->load($la_rubrique); 84 if (PEAR::isError($loadOK)) { 85 die ($loadOK->getMessage()); 86 } 87 else { 88 $compteur = $compteur + 1; 89 $ze_rubrique = $rubriqueMetier->getRubriqueId(); 90 $titre = $rubriqueMetier->getTitre(); 91 $la_rubrique = $rubriqueMetier->getParentId(); 92 $lien = $dest[$nb_col - $compteur - 1]; 93 94 if ($la_rubrique == 0) 95 $icone = "secteur-24.gif"; 96 else 97 $icone = "rubrique-24.gif"; 98 $ret = "<div style='padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px; " 99 ."background: url(img_pack/$icone) $spip_lang_left no-repeat;'>" 100 ."<a href='brouteur.php?id_rubrique=$lien'>$titre</a></div>" 101 ."<div style='margin-$spip_lang_left: 28px;'>$ret</div>"; 102 } 103 } 104 $lien = $dest[$nb_col - $compteur - 2]; 105 $icone = "racine-site-24.gif"; 106 $ret = "<div style='padding-top:5px; padding-bottom:5px; padding-$spip_lang_left:28px; " 107 ."background:url(img_pack/$icone) $spip_lang_left no-repeat;'>" 108 ."<a href='brouteur.php?id_rubrique=$lien'>"._T('info_racine_site')."</a></div>" 109 ."<div style='margin-$spip_lang_left:28px;'>$ret</div>"; 110 echo $ret; 111 echo "</td></tr>"; 112 } 113 } 114 else { 115 $id_rubrique = 0; 116 $dest[0] = "$id_rubrique"; 117 } 118 119 echo "<tr width='$largeur_table'>"; 120 121 for ($i = 0; $i < $nb_col; $i++) { 122 echo "<td valign=\"top\" width=\"$largeur_col\">"; 123 124 echo "<iframe width=\"100%\" id=\"iframe$i\" name=\"iframe$i\" " 125 ."src=\"brouteur_frame.php?id_rubrique=".$dest[$i]."&frame=$i\" " 126 ."height=\"$hauteur_table\" " 127 ."style=\"background-color:#eee; border-right:1px solid white; border-bottom:1px solid white; " 128 ."border-left:1px solid #cccccc; border-top:1px solid #cccccc;\">" 129 ."</iframe>\n"; 130 echo "</td>\n"; 131 } 132 133 echo "</tr>\n"; 134 echo "</table>\n"; 135 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |