Skip to content
Extraits de code Groupes Projets
Valider a5edf3bc rédigé par Antoine Pitrou's avatar Antoine Pitrou
Parcourir les fichiers

modif graphique admin restreint (suite)

parent c34c829d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -1949,31 +1949,27 @@ fin_grand_cadre(); ...@@ -1949,31 +1949,27 @@ fin_grand_cadre();
// //
// Afficher la hierarchie des rubriques // Afficher la hierarchie des rubriques
// //
function afficher_parents($collection){ function afficher_parents($id_rubrique) {
global $parents, $couleur_foncee; global $parents, $couleur_foncee;
global $coll; $parents = ereg_replace("(~+)","\\1~",$parents);
$parents=ereg_replace("(~+)","\\1~",$parents); if ($id_rubrique) {
if ($collection!=0){ $query = "SELECT id_rubrique, id_parent, titre FROM spip_rubriques WHERE id_rubrique=$id_rubrique";
$query2="SELECT * FROM spip_rubriques WHERE id_rubrique=\"$collection\""; $result = spip_query($query);
$result2=spip_query($query2);
while($row=spip_fetch_array($result2)){ while ($row = spip_fetch_array($result)) {
$id_rubrique = $row['id_rubrique']; $id_rubrique = $row['id_rubrique'];
$id_parent = $row['id_parent']; $id_parent = $row['id_parent'];
$titre = $row['titre']; $titre = $row['titre'];
if (acces_restreint_rubrique($id_rubrique)) { $parents = " <FONT SIZE=3 FACE='Verdana,Arial,Helvetica,sans-serif'><a href='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>$titre</font></a></FONT><BR>\n".$parents;
$parents="~ <IMG SRC='img_pack/triangle-anim.gif' WIDTH=16 HEIGHT=14 BORDER=0> <FONT SIZE=3 FACE='Verdana,Arial,Helvetica,sans-serif'><a href='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>$titre</font></a></FONT><BR>\n$parents"; if (acces_restreint_rubrique($id_rubrique))
} $parents = " <img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='Vous pouvez administrer cette rubrique et ses sous-rubriques'> ".$parents;
else { if (!$id_parent)
if ($id_parent == "0"){ $parents = "~ <IMG SRC='img_pack/secteur-24.gif' alt='' WIDTH=24 HEIGHT=24 BORDER=0 align='middle'> ".$parents;
$parents="~ <IMG SRC='img_pack/secteur-24.gif' alt='' WIDTH=24 HEIGHT=24 BORDER=0 align='middle'> <FONT SIZE=3 FACE='Verdana,Arial,Helvetica,sans-serif'><a href='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>$titre</font></a></FONT><BR>\n$parents"; else
} else { $parents = "~ <IMG SRC='img_pack/rubrique-24.gif' alt='' WIDTH=24 HEIGHT=24 BORDER=0 align='middle'> ".$parents;
$parents="~ <IMG SRC='img_pack/rubrique-24.gif' alt='' WIDTH=24 HEIGHT=24 BORDER=0 align='middle'> <FONT SIZE=3 FACE='Verdana,Arial,Helvetica,sans-serif'><a href='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>$titre</font></a></FONT><BR>\n$parents";
}
}
} }
afficher_parents($id_parent); afficher_parents($id_parent);
} }
} }
......
...@@ -32,9 +32,9 @@ function enfant($collection){ ...@@ -32,9 +32,9 @@ function enfant($collection){
if (strlen($les_sous_enfants) > 0){ if (strlen($les_sous_enfants) > 0){
$les_enfants.= $bouton_layer; $les_enfants.= $bouton_layer;
} }
if (acces_restreint_rubrique($id_rubrique)) if (acces_restreint_rubrique($id_rubrique))
$les_enfants.= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='Vous pouvez administrer cette rubrique et ses sous-rubriques'> "; $les_enfants.= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='Vous pouvez administrer cette rubrique et ses sous-rubriques'> ";
$les_enfants.= "<B><A HREF='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>".typo($titre)."</font></A></B>"; $les_enfants.= "<B><A HREF='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>".typo($titre)."</font></A></B>";
if (strlen($descriptif)>1) if (strlen($descriptif)>1)
$les_enfants.="<BR><FONT SIZE=1>$descriptif</FONT>"; $les_enfants.="<BR><FONT SIZE=1>$descriptif</FONT>";
...@@ -151,7 +151,7 @@ if ($titre) { ...@@ -151,7 +151,7 @@ if ($titre) {
$texte = addslashes($texte); $texte = addslashes($texte);
$query = "UPDATE spip_rubriques SET $change_parent titre=\"$titre\", descriptif=\"$descriptif\", texte=\"$texte\" WHERE id_rubrique=$coll"; $query = "UPDATE spip_rubriques SET $change_parent titre=\"$titre\", descriptif=\"$descriptif\", texte=\"$texte\" WHERE id_rubrique=$coll";
$result = spip_query($query); $result = spip_query($query);
calculer_rubriques(); calculer_rubriques();
if (lire_meta('activer_moteur') == 'oui') { if (lire_meta('activer_moteur') == 'oui') {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter