| [ PHPXref.com ] | [ Generated: Sun Jul 20 20:25:42 2008 ] | [ SPIP 1.8.3 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2005 * 7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * 8 * * 9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * 10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * 11 \***************************************************************************/ 12 13 14 include ("inc.php3"); 15 16 17 function enfant($leparent){ 18 global $id_parent; 19 global $id_rubrique; 20 global $connect_toutes_rubriques; 21 global $i; 22 global $couleur_claire, $spip_lang_left; 23 global $browser_name, $browser_version; 24 25 $i++; 26 $query="SELECT * FROM spip_rubriques WHERE id_parent='$leparent' ORDER BY 0+titre,titre"; 27 $result=spip_query($query); 28 29 while($row=spip_fetch_array($result)){ 30 $my_rubrique=$row['id_rubrique']; 31 $titre=typo($row['titre']); 32 $statut_rubrique = $row['statut']; 33 $lang_rub = $row['lang']; 34 $langue_choisie_rub = $row['langue_choisie']; 35 $style = ""; 36 $espace = ""; 37 38 if ($my_rubrique != $id_rubrique){ 39 40 if (eregi("mozilla", $browser_name)) { 41 //$style .= "padding-$spip_lang_left: 16px; "; 42 $style .= "margin-$spip_lang_left: ".($i*16)."px;"; 43 } else { 44 for ($count = 0; $count <= $i; $count ++) $espace .= " "; 45 } 46 47 if ($i > 3) $style .= "color: #666666;"; 48 if ($i > 4) $style .= "font-style: italic;"; 49 if ($i < 3) $style .= "font-weight:bold; "; 50 if ($i==1) { 51 $style .= "background-image: url(" . _DIR_IMG_PACK . 'secteur-12.gif);'; 52 $style .= "background-color: $couleur_claire;"; 53 $style .= "font-weight: bold;"; 54 } 55 else if ($i==2) { 56 $style .= "border-bottom: 1px solid $couleur_claire;"; 57 $style .= "font-weight: bold;"; 58 } 59 else { 60 } 61 62 $titre = couper(supprimer_tags(typo(extraire_multi($titre)))." ", 50); 63 if ($statut_rubrique!='publie') $titre = "($titre)"; 64 if (lire_meta('multi_rubriques') == 'oui' AND $langue_choisie_rub == "oui") $titre = $titre." [".traduire_nom_langue($lang_rub)."]"; 65 66 $selec_rub = "selec_rub"; 67 if ($browser_name == "MSIE" AND floor($browser_version) == "5") $selec_rub = ""; // Bug de MSIE MacOs 9.0 68 69 if (acces_rubrique($my_rubrique)) { 70 echo "<option".mySel($my_rubrique,$id_parent)." class='$selec_rub' style=\"$style\">$espace".supprimer_tags($titre)."\n"; 71 } 72 enfant($my_rubrique); 73 } 74 75 } 76 $i=$i-1; 77 } 78 79 80 if ($new == "oui") { 81 if (($connect_statut=='0minirezo') AND acces_rubrique($id_parent)) { 82 $id_parent = intval($id_parent); 83 $id_rubrique = 0; 84 $titre = filtrer_entites(_T('titre_nouvelle_rubrique')); 85 $onfocus = " onfocus=\"if(!antifocus){this.value='';antifocus=true;}\""; 86 $descriptif = ""; 87 $texte = ""; 88 } 89 else { 90 echo _T('avis_acces_interdit'); 91 exit; 92 } 93 } 94 else { 95 $query = "SELECT * FROM spip_rubriques WHERE id_rubrique='$id_rubrique'"; 96 $result = spip_query($query); 97 while ($row = spip_fetch_array($result)) { 98 $id_rubrique = $row['id_rubrique']; 99 $id_parent = $row['id_parent']; 100 $titre = $row['titre']; 101 $descriptif = $row['descriptif']; 102 $texte = $row['texte']; 103 $id_secteur = $row['id_secteur']; 104 $extra = $row["extra"]; 105 } 106 } 107 108 debut_page(_T('info_modifier_titre', array('titre' => $titre)), "documents", "rubriques"); 109 110 if ($id_parent == 0) $ze_logo = "secteur-24.gif"; 111 else $ze_logo = "rubrique-24.gif"; 112 113 if ($id_parent == 0) $logo_parent = "racine-site-24.gif"; 114 else { 115 $query = "SELECT id_parent FROM spip_rubriques WHERE id_rubrique='$id_parent'"; 116 $result=spip_query($query); 117 while($row=spip_fetch_array($result)){ 118 $parent_parent=$row['id_parent']; 119 } 120 if ($parent_parent == 0) $logo_parent = "secteur-24.gif"; 121 else $logo_parent = "rubrique-24.gif"; 122 } 123 124 125 126 debut_grand_cadre(); 127 128 afficher_hierarchie($id_parent); 129 130 fin_grand_cadre(); 131 132 debut_gauche(); 133 //////// parents 134 135 136 137 debut_droite(); 138 139 debut_cadre_formulaire(); 140 141 echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>"; 142 echo "<tr width='100%'>"; 143 echo "<td>"; 144 145 if ($id_rubrique) icone(_T('icone_retour'), "naviguer.php3?id_rubrique=$id_rubrique", $ze_logo, "rien.gif"); 146 else icone(_T('icone_retour'), "naviguer.php3?id_rubrique=$id_parent", $ze_logo, "rien.gif"); 147 148 echo "</td>"; 149 echo "<td>". http_img_pack('rien.gif', " ", "width='10'") . "</td>\n"; 150 echo "<td width='100%'>"; 151 echo _T('info_modifier_rubrique'); 152 gros_titre($titre); 153 echo "</td></tr></table>"; 154 echo "<p>"; 155 156 if ($id_rubrique>0) 157 echo "<FORM ACTION='naviguer.php3?id_rubrique=$id_rubrique' METHOD='post'>"; 158 else 159 echo "<FORM ACTION='naviguer.php3' METHOD='post'>"; 160 161 echo "<INPUT TYPE='Hidden' NAME='id_rubrique' VALUE=\"$id_rubrique\">"; 162 if ($new == "oui") echo "<INPUT TYPE='Hidden' NAME='new' VALUE=\"oui\">"; 163 164 $titre = entites_html($titre); 165 166 echo _T('entree_titre_obligatoire'); 167 echo "<INPUT TYPE='text' CLASS='formo' NAME='titre' VALUE=\"$titre\" SIZE='40' $onfocus><P>"; 168 169 170 debut_cadre_couleur("$logo_parent", false, '', _T('entree_interieur_rubrique').aide ("rubrub")); 171 172 // Integrer la recherche de rubrique au clavier 173 echo "<script language='JavaScript' type='text/javascript' src='filtery.js'></script>\n"; 174 echo "<input type='text' size='10' style='font-size: 90%; width: 15%;' onkeyup=\"filtery(this.value,this.form.id_parent);\" onChange=\"filtery(this.value,this.form.id_parent);\"> "; 175 176 echo "<SELECT NAME='id_parent' style='font-size: 90%; width:80%; font-face:verdana,arial,helvetica,sans-serif; max-height: 24px;' SIZE=1>\n"; 177 178 if ($connect_toutes_rubriques) { 179 echo "<OPTION".mySel("0",$id_parent). http_style_background('racine-site-12.gif', "$spip_lang_left no-repeat; background-color:$couleur_foncee; padding-$spip_lang_left: 16px; font-weight:bold; color:white") .'>'._T('info_racine_site')."\n"; 180 } else { 181 echo "<OPTION".mySel("0",$id_parent).">"._T('info_non_deplacer')."\n"; 182 } 183 184 if (lire_meta('multi_rubriques') == 'oui') echo " [".traduire_nom_langue(lire_meta('langue_site'))."]"; 185 186 // si le parent ne fait pas partie des rubriques restreintes, modif impossible 187 if (acces_rubrique($id_parent)) { 188 enfant(0); 189 } 190 echo "</SELECT>\n"; 191 192 // si c'est une rubrique-secteur contenant des breves, ne pas proposer de deplacer 193 $query = "SELECT COUNT(*) AS cnt FROM spip_breves WHERE id_rubrique='$id_rubrique'"; 194 $row = spip_fetch_array(spip_query($query)); 195 $contient_breves = $row['cnt']; 196 if ($contient_breves > 0) { 197 $scb = ($contient_breves>1? 's':''); 198 echo "<div><font size='2'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace'><label for='confirme-deplace'> "._T('avis_deplacement_rubrique', array('contient_breves' => $contient_breves, 'scb' => $scb))."</font></label></div>\n"; 199 } 200 fin_cadre_couleur(); 201 202 echo "<P>"; 203 204 205 if ($options == "avancees" OR $descriptif) { 206 echo "<B>"._T('texte_descriptif_rapide')."</B><BR>"; 207 echo _T('entree_contenu_rubrique')."<BR>"; 208 echo "<TEXTAREA NAME='descriptif' CLASS='forml' ROWS='4' COLS='40' wrap=soft>"; 209 echo $descriptif; 210 echo "</TEXTAREA><P>\n"; 211 } 212 else { 213 echo "<INPUT TYPE='Hidden' NAME='descriptif' VALUE=\"".entites_html($descriptif)."\">"; 214 } 215 216 echo "<B>"._T('info_texte_explicatif')."</B>"; 217 echo aide ("raccourcis"); 218 echo "<BR><TEXTAREA NAME='texte' ROWS='15' CLASS='formo' COLS='40' wrap=soft>"; 219 echo $texte; 220 echo "</TEXTAREA>\n"; 221 222 if ($champs_extra) { 223 include_ecrire("inc_extra.php3"); 224 extra_saisie($extra, 'rubriques', $id_secteur); 225 } 226 227 echo "<P align='right'><INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_enregistrer')."' CLASS='fondo'>"; 228 echo "</FORM>"; 229 fin_cadre_formulaire(); 230 231 fin_page(); 232 233 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |