Skip to content
Extraits de code Groupes Projets
Valider 590cbbff rédigé par ARNO*'s avatar ARNO*
Parcourir les fichiers

Nouvelle mŽthode de navigation

parent ead796a3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -148,6 +148,7 @@ ecrire/img_pack/m_envoi_rtl.gif -text ...@@ -148,6 +148,7 @@ ecrire/img_pack/m_envoi_rtl.gif -text
ecrire/img_pack/messagerie-24.gif -text ecrire/img_pack/messagerie-24.gif -text
ecrire/img_pack/messagerie-48.gif -text ecrire/img_pack/messagerie-48.gif -text
ecrire/img_pack/mot-cle-24.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-16.png -text
ecrire/img_pack/pave-blanc-24.png -text ecrire/img_pack/pave-blanc-24.png -text
ecrire/img_pack/pave-blanc-36.png -text ecrire/img_pack/pave-blanc-36.png -text
......
<?php
include ("inc.php3");
debut_page(_T('titre_page_articles_tous'), "asuivre", "tout-site");
echo "<div>&nbsp;</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='&lt;&lt;&lt;' 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
<?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
ecrire/img_pack/naviguer-site.gif

220 octets

...@@ -1531,8 +1531,13 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr ...@@ -1531,8 +1531,13 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr
// Bandeau // 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 "\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>"; 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') { if ($activer_messagerie != 'non' AND $connect_activer_messagerie != 'non') {
echo "<font face='arial,helvetica,sans-serif' size=1><b>"; echo " &nbsp; <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"); $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); $total_messages = @spip_num_rows($result_messages);
if ($total_messages == 1) { if ($total_messages == 1) {
...@@ -1545,7 +1550,7 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr ...@@ -1545,7 +1550,7 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr
echo "</b></font> &nbsp; "; echo "</b></font> &nbsp; ";
} }
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>";
echo "<td> </td>"; echo "<td> </td>";
echo "<td>"; echo "<td>";
......
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