From 590cbbff3d27aa235205ac37df50e490a2e506e5 Mon Sep 17 00:00:00 2001 From: ARNO* <arno@rezo.net> Date: Tue, 25 Nov 2003 21:19:23 +0000 Subject: [PATCH] =?UTF-8?q?Nouvelle=20m=C2=8Ethode=20de=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 + ecrire/brouteur.php3 | 76 ++++++++++++++++++ ecrire/brouteur_frame.php3 | 128 ++++++++++++++++++++++++++++++ ecrire/img_pack/naviguer-site.gif | Bin 0 -> 220 bytes ecrire/inc_presentation.php3 | 9 ++- 5 files changed, 212 insertions(+), 2 deletions(-) create mode 100644 ecrire/brouteur.php3 create mode 100644 ecrire/brouteur_frame.php3 create mode 100644 ecrire/img_pack/naviguer-site.gif diff --git a/.gitattributes b/.gitattributes index 4f595640ed..1dbc51f4b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -148,6 +148,7 @@ ecrire/img_pack/m_envoi_rtl.gif -text ecrire/img_pack/messagerie-24.gif -text ecrire/img_pack/messagerie-48.gif -text ecrire/img_pack/mot-cle-24.gif -text +ecrire/img_pack/naviguer-site.gif -text ecrire/img_pack/pave-blanc-16.png -text ecrire/img_pack/pave-blanc-24.png -text ecrire/img_pack/pave-blanc-36.png -text diff --git a/ecrire/brouteur.php3 b/ecrire/brouteur.php3 new file mode 100644 index 0000000000..4376c79225 --- /dev/null +++ b/ecrire/brouteur.php3 @@ -0,0 +1,76 @@ +<?php + +include ("inc.php3"); + +debut_page(_T('titre_page_articles_tous'), "asuivre", "tout-site"); + +echo "<div> </div>"; + + if ($spip_ecran == "large") { + $largeur_table = 974; + $hauteur_table = 400; + $nb_col = 4; + } else { + $largeur_table = 750; + $hauteur_table = 300; + $nb_col = 3; + } + $largeur_col = round($largeur_table/$nb_col); + + + + echo "<table border='0' cellpadding='0' cellspacing='2' width='$largeur_table'>"; + + if ($id_rubrique) { + $j = $nb_col; + while ($id_rubrique > 0) { + $query = "SELECT * FROM spip_rubriques WHERE id_rubrique=$id_rubrique ORDER BY titre"; + $result=spip_query($query); + while($row=spip_fetch_array($result)){ + $j = $j-1; + $ze_rubrique = $row['id_rubrique']; + $titre = typo($row['titre']); + $id_rubrique =$row['id_parent']; + + if ($j >= 0) $dest[$j] = $ze_rubrique; + } + } + + $dest[$j-1] = 0; + + + + + while (!$dest[1]) { + for ($i = 0; $i < $nb_col; $i++) { + $dest[$i] = $dest[$i+1]; + } + } + + + if ($dest[0] > 0 AND $parent = $dest[$nb_col-2]) echo "<tr><td colspan='$nb_col' style='text-align: left;'><a href='brouteur.php3?id_rubrique=$parent'><img src='img_pack/fleche-left.png' alt='<<<' width='12' height='12' border='0'></a></td></tr>"; + } else { + $id_rubrique = 0; + $dest[0] = "$id_rubrique"; + } + + + + + echo "<tr width='$largeur_table'>"; + + for ($i=0; $i < $nb_col; $i++) { + echo "<td valign='top' width='$largeur_col'>"; + + echo "<iframe width='100%' id='iframe$i' name='iframe$i' src='brouteur_frame.php3?id_rubrique=".$dest[$i]."&frame=$i' height='$hauteur_table' style='background-color: #eeeeee; border-right: 1px solid white; border-bottom: 1px solid white; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc;'></iframe>"; + + + echo "</td>"; + + } + + echo "</tr>"; + echo "</table>"; + + +?> \ No newline at end of file diff --git a/ecrire/brouteur_frame.php3 b/ecrire/brouteur_frame.php3 new file mode 100644 index 0000000000..38678ca956 --- /dev/null +++ b/ecrire/brouteur_frame.php3 @@ -0,0 +1,128 @@ +<?php + +include ("inc.php3"); + +debut_html(); + + if ($spip_ecran == "large") { + $nb_col = 4; + } else { + $nb_col = 3; + } + + if ($effacer_suivant == "oui") { + for ($i = $frame+1; $i < $nb_col; $i++) { + echo "<script>parent.iframe$i.location.href='brouteur_frame.php3?frame=$i'</script>"; + } + } + echo "<div class='arial2'>"; + + + $query = "SELECT * FROM spip_rubriques WHERE id_rubrique=$id_rubrique ORDER BY titre"; + $result=spip_query($query); + if ($row=spip_fetch_array($result)){ + $ze_rubrique=$row['id_rubrique']; + $titre = typo($row['titre']); + $id_parent=$row['id_parent']; + + if ($id_parent == 0) $icone = "secteur-24.gif"; + else $icone = "rubrique-24.gif"; + + echo "<div style='background-color: #cccccc; margin-bottom: 3px;'>"; + icone_horizontale("$titre", "javascript:window.parent.location=\"naviguer.php3?coll=$id_rubrique\"", "$icone",""); + echo "</div>"; + } else if ($frame == 0) { + echo "<div style='background-color: #cccccc; margin-bottom: 3px;'>"; + icone_horizontale(_T('info_racine_site'), "javascript:window.parent.location=\"naviguer.php3\"", "racine-site-24.gif",""); + echo "</div>"; + } + + + + + $query = "SELECT * FROM spip_rubriques WHERE id_parent=$id_rubrique ORDER BY titre"; + $result=spip_query($query); + while($row=spip_fetch_array($result)){ + $ze_rubrique=$row['id_rubrique']; + $titre = typo($row['titre']); + $id_parent=$row['id_parent']; + + if ($id_parent == '0') { + echo "<div style='margin:3px; padding-top: 5px; padding-bottom: 5px; padding-left: 28px; background: url(img_pack/secteur-24.gif) left center no-repeat;'><b class='verdana2'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></b></div>"; + } + else { + if ($frame+1 < $nb_col) echo "<div style='margin:3px; padding-top: 5px; padding-bottom: 5px; padding-left: 28px; background: url(img_pack/rubrique-24.gif) left center no-repeat;'><b><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></b></div>"; + else echo "<div style='margin:3px; padding-top: 5px; padding-bottom: 5px; padding-left: 28px; background: url(img_pack/rubrique-24.gif) left center no-repeat;'><b><a href='javascript:window.parent.location=\"brouteur.php3?id_rubrique=$ze_rubrique\"'>$titre</a></b></div>"; + } + } + + + if ($id_rubrique > 0) { + //if ($connect_statut == "0minirezo") $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE id_rubrique=$id_rubrique ORDER BY date DESC"; + $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.id_rubrique=$id_rubrique AND (articles.statut = 'publie' OR articles.statut = 'prop' OR (articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur)) GROUP BY id_article ORDER BY articles.date DESC"; + $result=spip_query($query); + if (spip_fetch_row($result)>0) { + echo "<div style='padding-top: 6px;'><b class='verdana2'>"._T('info_articles')."</b></div>"; + while($row=spip_fetch_array($result)){ + $id_article=$row['id_article']; + $titre = typo($row['titre']); + $statut = $row['statut']; + switch ($statut) { + case 'publie': + $puce = 'verte'; + break; + case 'prepa': + $puce = 'blanche'; + break; + case 'prop': + $puce = 'orange'; + break; + case 'refuse': + $puce = 'rouge'; + break; + case 'poubelle': + $puce = 'poubelle'; + break; + } + $puce = "puce-$puce.gif"; + echo "<div style='margin:3px; padding-left: 20px; background: url(img_pack/$puce) left center no-repeat;'><a href='javascript:window.parent.location=\"articles.php3?id_article=$id_article\"'>$titre</a></div>"; + } + } + + $query = "SELECT * FROM spip_breves WHERE id_rubrique=$id_rubrique ORDER BY date_heure DESC LIMIT 0, 20"; + $result=spip_query($query); + if (spip_fetch_row($result)>0) { + echo "<div style='padding-top: 6px;'><b class='verdana2'>"._T('info_breves_02')."</b></div>"; + while($row=spip_fetch_array($result)){ + $id_breve=$row['id_breve']; + $titre = typo($row['titre']); + $statut = $row['statut']; + switch ($statut) { + case 'publie': + $puce = 'verte'; + break; + case 'prepa': + $puce = 'blanche'; + break; + case 'prop': + $puce = 'orange'; + break; + case 'refuse': + $puce = 'rouge'; + break; + case 'poubelle': + $puce = 'poubelle'; + break; + } + $puce = "puce-$puce.gif"; + echo "<div style='margin:3px; padding-left: 20px; background: url(img_pack/$puce) left center no-repeat;'><a href='javascript:window.parent.location=\"breves_voir.php3?id_breve=$id_breve\"'>$titre</a></div>"; + } + } + } + + echo "</div>"; + +echo "</body></html>"; + + +?> \ No newline at end of file diff --git a/ecrire/img_pack/naviguer-site.gif b/ecrire/img_pack/naviguer-site.gif new file mode 100644 index 0000000000000000000000000000000000000000..35f13e0f204bf82a458035de16d01487017dacaf GIT binary patch literal 220 zcmV<203-iLNk%w1VHyAw0J8u9$jHdV#Khd(+|tt0;o;%t=H~zZ|4>j+p{1$J%*^QM z=m4-ZjnDKkwR6|k*Yuv8A^8LV00000EC2ui02%-k000Du5XniawJPh)yOzZvj$~;b z1$bC%)l#TLob*Y^hoSHJuJ^vf4Iwx%63B$%@JK2T3+GZGDf)ibW%fWtIE+$eIGS8K zBm*FCyB(mx<wGOve7X?{HTJ4sCL{oTa${itfP!p%h6sUMb8%!yON)(si9wWzmWmPq WHJ>8^odKk!rl+W+7ptrj5db@j(`2>) literal 0 HcmV?d00001 diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index 83f9d76220..92900337cc 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -1531,8 +1531,13 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr // Bandeau echo "\n<table cellpadding='0' bgcolor='$couleur_foncee' style='border-bottom: solid 1px white; border-top: solid 1px #666666;' width='100%'><tr width='100%'><td width='100%'>"; echo "<table align='center' cellpadding='0' background='' width='$largeur'><tr width='$largeur'><td>"; + + global $id_rubrique; + if ($id_rubrique > 0) echo "<a href='brouteur.php3?id_rubrique=$id_rubrique'><img src='img_pack/naviguer-site.gif' alt='nav' width='26' height='20' border='0'></a>"; + else echo "<a href='brouteur.php3'><img src='img_pack/naviguer-site.gif' alt='nav' width='26' height='20' border='0'></a>"; + if ($activer_messagerie != 'non' AND $connect_activer_messagerie != 'non') { - echo "<font face='arial,helvetica,sans-serif' size=1><b>"; + echo " <font face='arial,helvetica,sans-serif' size=1><b>"; $result_messages = spip_query("SELECT * FROM spip_messages AS messages, spip_auteurs_messages AS lien WHERE lien.id_auteur=$connect_id_auteur AND vu='non' AND statut='publie' AND type='normal' AND lien.id_message=messages.id_message"); $total_messages = @spip_num_rows($result_messages); if ($total_messages == 1) { @@ -1545,7 +1550,7 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr echo "</b></font> "; } - if ($activer_messagerie == "oui" AND $connect_activer_messagerie != "non") echo "<a href='calendrier_jour.php3' title='"._T('icone_agenda')."'><img src='img_pack/cal-jour.gif' alt='jour' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>"; + if ($activer_messagerie == "oui" AND $connect_activer_messagerie != "non") echo "<a href='calendrier_jour.php3' title='"._T('icone_agenda')."'><img src='img_pack/cal-jour.gif' alt='jour' width='26' height='20' border='0'></a>"; echo "</td>"; echo "<td> </td>"; echo "<td>"; -- GitLab