From 6ff94b44d74fd4ce5aa5245f263c8e4f437d32d3 Mon Sep 17 00:00:00 2001
From: ARNO* <arno@rezo.net>
Date: Sat, 6 Jul 2002 19:32:19 +0000
Subject: [PATCH] Modif de presentation des forums.

---
 ecrire/controle_forum.php3   | 43 +++++++++++++++---------------------
 ecrire/inc_presentation.php3 | 16 ++++++++++++++
 2 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/ecrire/controle_forum.php3 b/ecrire/controle_forum.php3
index 2266e43a38..9c4bb091a9 100644
--- a/ecrire/controle_forum.php3
+++ b/ecrire/controle_forum.php3
@@ -185,6 +185,7 @@ function controle_forum($request,$adresse_retour) {
 	static $i;
 	global $couleur_foncee;
 	global $mots_cles_forums;
+	global $controle_sans;
 
 	
 	$compteur_forum++; 
@@ -211,29 +212,19 @@ function controle_forum($request,$adresse_retour) {
 		if ($compteur_forum==1)
 			echo "<BR><BR>";
 		if ($forum_stat=="off" OR $forum_stat == "privoff") {
-			echo "<TABLE WIDTH=100% CELLPADDING=2 CELLSPACING=0 BORDER=0><TR><TD BGCOLOR='#FF0000'>";
-		}else if($forum_stat=="prop"){
-			echo "<TABLE WIDTH=100% CELLPADDING=2 CELLSPACING=0 BORDER=0><TR><TD BGCOLOR='#FFFF00'>";
+			echo "<div style='border: 1px #ff0000 solid'>";
 		}
-		echo "<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR>";
-		
-		for ($count = 2; $count <= $compteur_forum AND $count < 11; $count++) {
-
-			$fond[$count] = 'img_pack/rien.gif';
-			if ($i[$count] != $nb_forum[$count]) {
-				$fond[$count] = 'img_pack/forum-vert.gif';
-			}		
-		
-			$fleche='img_pack/rien.gif';
-			if ($count == $compteur_forum) {
-				$fleche='img_pack/forum-droite.gif';
-			}		
-			echo "<TD WIDTH=10 VALIGN='top' BACKGROUND=$fond[$count]><IMG SRC=$fleche ALT='' WIDTH=10 HEIGHT=13 BORDER=0></TD>\n";
+		else if($forum_stat=="prop"){
+			echo "<div style='border: 1px yellow solid'>";
 		}
-		
-		echo "<TD WIDTH=100% BGCOLOR='#EEEEEE' VALIGN='top'>";
+		else {
+			echo "<div style='border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc;'>";
+			echo "<div style='border: 1px #999999 dashed; background-color: white;'>";
+		}
+		echo "<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0><TR>";
+		echo "<TD WIDTH=100% VALIGN='top'>";
 
-		echo "<TABLE WIDTH=100% CELLPADDING=3 CELLSPACING=0><TR><TD BGCOLOR='$couleur_foncee'><FONT FACE='Verdana,Arial,Helvetica,sans-serif' SIZE=2 COLOR='#FFFFFF'><B>".typo($forum_titre)."</B></FONT></TD></TR>";
+		echo "<TABLE WIDTH=100% CELLPADDING=5 CELLSPACING=0><TR><TD BGCOLOR='$couleur_foncee'><FONT FACE='Verdana,Arial,Helvetica,sans-serif' SIZE=2 COLOR='#FFFFFF'><B>".typo($forum_titre)."</B></FONT></TD></TR>";
 		echo "<TR><TD>";
 		echo "<FONT SIZE=2 FACE='Georgia,Garamond,Times,serif'>";
 		if ($forum_stat=="publie" OR $forum_stat == "off") {
@@ -253,8 +244,8 @@ function controle_forum($request,$adresse_retour) {
 		}
 
 		if ($forum_stat <> "off" AND $forum_stat <> "prioff") {
-			if ($forum_stat == "publie") icone ("Supprimer ce message", "controle_forum.php3?supp_forum=$id_forum&debut=$debut", "forum-interne-24.gif", "supprimer.gif", "right");
-			else if ($forum_stat == "prive" OR $forum_stat == "privrac" OR $forum_stat == "privadm") icone ("Supprimer ce message", "controle_forum.php3?supp_forum_priv=$id_forum&debut=$debut", "forum-interne-24.gif", "supprimer.gif", "right");
+			if ($forum_stat == "publie") icone ("Supprimer ce message", "controle_forum.php3?supp_forum=$id_forum&debut=$debut$controle_sans", "forum-interne-24.gif", "supprimer.gif", "right");
+			else if ($forum_stat == "prive" OR $forum_stat == "privrac" OR $forum_stat == "privadm") icone ("Supprimer ce message", "controle_forum.php3?supp_forum_priv=$id_forum&debut=$debut$controle_sans", "forum-interne-24.gif", "supprimer.gif", "right");
 		}
 		else {
 			echo "<BR><FONT COLOR='red'><B>MESSAGE SUPPRIM&Eacute; $forum_ip</B></FONT>";
@@ -295,10 +286,12 @@ function controle_forum($request,$adresse_retour) {
 		echo "</TD></TR></TABLE>";
 		
 		echo "</TD></TR></TABLE>\n";
-
-		if ($forum_stat == 'off' OR $forum_stat == 'privoff' OR $forum_stat=='prop') {
-			echo "</TD></TR></TABLE>";
+		
+		if (!($forum_stat == 'off' OR $forum_stat == 'privoff' OR $forum_stat=='prop')) {
+			echo "</div>";
 		}
+		
+		echo "</div>";
 	}
 }
 
diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3
index d81243a16f..34e286f49f 100644
--- a/ecrire/inc_presentation.php3
+++ b/ecrire/inc_presentation.php3
@@ -704,6 +704,22 @@ function afficher_forum($request, $adresse_retour, $controle = "non", $recurrenc
 				echo "<b><a href=\"$url\">R&eacute;pondre &agrave; ce message</a></b></font>";
 			}
 
+			if ($mots_cles_forums == "oui"){
+			
+				$query_mots = "SELECT * FROM spip_mots AS mots, spip_mots_forum AS lien WHERE lien.id_forum = '$id_forum' AND lien.id_mot = mots.id_mot";
+				$result_mots = spip_query($query_mots);
+				
+				while ($row_mots = mysql_fetch_array($result_mots)) {
+					$id_mot = $row_mots['id_mot'];
+					$titre_mot = propre($row_mots['titre']);
+					$type_mot = propre($row_mots['type']);
+					echo "<li> <b>$type_mot :</b> $titre_mot";
+				}
+				
+			}
+
+
+
 			echo "</font>";
 			echo "</td></tr></table>";
 			if ($statut == "off" OR $statut == "prop") {
-- 
GitLab