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

interface : icones avec legende texte, re-modifs interface articles

parent b132f189
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -190,22 +190,38 @@ echo "<div align='center'>\n"; ...@@ -190,22 +190,38 @@ echo "<div align='center'>\n";
if ($statut_article == "publie") { if ($statut_article == "publie") {
$post_dates = lire_meta("post_dates"); $post_dates = lire_meta("post_dates");
$voir_en_ligne = true;
if ($post_dates == "non") { if ($post_dates == "non") {
$query = "SELECT id_article FROM spip_articles WHERE id_article=$id_article AND date<=NOW()"; $query = "SELECT id_article FROM spip_articles WHERE id_article=$id_article AND date<=NOW()";
$result = mysql_query($query); $result = mysql_query($query);
if (mysql_num_rows($result) > 0) { if (!mysql_num_rows($result)) {
echo "<a href='../spip_redirect.php3?id_article=$id_article&recalcul=oui'><img src='IMG2/voirenligne.gif' alt='voir en ligne' width='48' height='48' border='0' align='right'></a>\n"; $voir_en_ligne = false;
} }
} }
else { if ($voir_en_ligne) {
echo "<a href='../spip_redirect.php3?id_article=$id_article&recalcul=oui'><img src='IMG2/voirenligne.gif' alt='voir en ligne' width='48' height='48' border='0' align='right'></a>\n"; afficher_icone(newLinkUrl("../spip_redirect.php3?id_article=$id_article&recalcul=oui"),
"Voir en ligne", 'IMG2/voir.gif', 40, 28, 'right');
} }
} }
echo "<font face='Verdana,Arial,Helvetica,sans-serif' size='1'><b>ARTICLE NUM&Eacute;RO&nbsp;:</b></font>\n"; echo "<font face='Verdana,Arial,Helvetica,sans-serif' size='1'><b>ARTICLE NUM&Eacute;RO&nbsp;:</b></font>\n";
echo "<br><font face='Verdana,Arial,Helvetica,sans-serif' size='6'><b>$id_article</b></font>\n"; echo "<br><font face='Verdana,Arial,Helvetica,sans-serif' size='6'><b>$id_article</b></font>\n";
if ($statut_article == 'publie' AND $connect_statut=='0minirezo' AND acces_rubrique($id_rubrique)) {
$req = "SELECT count(*) FROM spip_forum WHERE id_article=$id_article";
if ($row = mysql_fetch_row(mysql_query($req))) {
$nb_forums = $row[0];
if ($nb_forums) {
echo "<br><a ".newLinkHref("articles_forum.php3?id_article=$id_article").">\n";
echo "<b>Forum public&nbsp;: $nb_forums&nbsp;contribution(s)</b></a>\n";
}
}
}
echo "</div>\n"; echo "</div>\n";
fin_boite_info(); fin_boite_info();
...@@ -263,7 +279,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -263,7 +279,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
} }
// boite active ? // boite active ?
if ($change_accepter_forum || $petition) $visible = true; if ($change_accepter_forum) $visible = true;
echo "<center><table width='100%' cellpadding='2' border='1' class='hauteur'>\n"; echo "<center><table width='100%' cellpadding='2' border='1' class='hauteur'>\n";
echo "<tr><td width='100%' align='center' bgcolor='#FFCC66'>\n"; echo "<tr><td width='100%' align='center' bgcolor='#FFCC66'>\n";
...@@ -272,7 +288,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -272,7 +288,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
echo bouton_block_visible("forumarticle"); echo bouton_block_visible("forumarticle");
else else
echo bouton_block_invisible("forumarticle"); echo bouton_block_invisible("forumarticle");
echo "FORUM & P&Eacute;TITION"; echo "CONFIGURER LE FORUM";
echo "</b></font></td></tr></table></center>"; echo "</b></font></td></tr></table></center>";
if ($visible) if ($visible)
...@@ -281,18 +297,9 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -281,18 +297,9 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
echo debut_block_invisible("forumarticle"); echo debut_block_invisible("forumarticle");
echo "\n<form action='articles.php3' method='get'>"; echo "\n<form action='articles.php3' method='get'>";
echo "<font face='Verdana,Arial,Helvetica,sans-serif' size='2'><u><b>FORUM PUBLIC</b></u><br>";
if ($statut_article == 'publie') {
$req = "SELECT count(*) FROM spip_forum WHERE id_article=$id_article";
if ($row = mysql_fetch_row(mysql_query($req))) {
$nbforums = '<br>V&eacute;rifier '.$row[0].' contribution(s).';
if ($row[0]>0) echo "<a href='articles_forum.php3?id_article=$id_article'>$nbforums</a>\n";
}
}
echo "\n<input type='hidden' name='id_article' value='$id_article'>"; echo "\n<input type='hidden' name='id_article' value='$id_article'>";
echo "<i>Mode de mod&eacute;ration&nbsp;:</i>\n"; echo "<br>Mode de mod&eacute;ration du forum&nbsp;:\n";
if ($forums_publics == "pos") { if ($forums_publics == "pos") {
echo "<br><input type='radio' name='change_accepter_forum' value='pos' id='accepterforumpos' checked>"; echo "<br><input type='radio' name='change_accepter_forum' value='pos' id='accepterforumpos' checked>";
echo "<B><label for='accepterforumpos'> mod&eacute;r&eacute; &agrave; posteriori</label></B>"; echo "<B><label for='accepterforumpos'> mod&eacute;r&eacute; &agrave; posteriori</label></B>";
...@@ -316,16 +323,21 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -316,16 +323,21 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
} }
if ($forums_publics == "non") { if ($forums_publics == "non") {
echo "<br><input type='radio' name='change_accepter_forum' value='non' id='accepterforumnon' checked>"; echo "<br><input type='radio' name='change_accepter_forum' value='non' id='accepterforumnon' checked>";
echo "<B><label for='accepterforumnon'>pas de forum</label></B>"; echo "<B><label for='accepterforumnon'> pas de forum</label></B>";
} else { } else {
echo "<br><input type='radio' name='change_accepter_forum' value='non' id='accepterforumnon'>"; echo "<br><input type='radio' name='change_accepter_forum' value='non' id='accepterforumnon'>";
echo "<label for='accepterforumnon'>pas de forum</label>"; echo "<label for='accepterforumnon'> pas de forum</label>";
} }
echo "<p align='right'><input type='submit' name='Changer' class='fondo' value='Changer' STYLE='font-size:10px'></p>\n"; echo "<p align='right'><input type='submit' name='Changer' class='fondo' value='Changer' STYLE='font-size:10px'></p>\n";
echo "</form>"; echo "</form>";
//////////////////////////////////////////////// echo fin_block();
echo "<br>\n";
//
// Petitions // Petitions
// //
...@@ -355,7 +367,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -355,7 +367,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
$result_petition = mysql_query($query_petition); $result_petition = mysql_query($query_petition);
$petition = (mysql_num_rows($result_petition) > 0); $petition = (mysql_num_rows($result_petition) > 0);
while ($row=mysql_fetch_array($result_petition)) { while ($row = mysql_fetch_array($result_petition)) {
$id_rubrique=$row[0]; $id_rubrique=$row[0];
$email_unique=$row[1]; $email_unique=$row[1];
$site_obli=$row[2]; $site_obli=$row[2];
...@@ -364,13 +376,33 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -364,13 +376,33 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
$texte_petition=$row[5]; $texte_petition=$row[5];
} }
if ($petition) $visible = true;
echo "<center><table width='100%' cellpadding='2' border='1' class='hauteur'>\n";
echo "<tr><td width='100%' align='center' bgcolor='#FFCC66'>\n";
echo "<font face='Verdana,Arial,Helvetica,sans-serif' size='2' color='#333333'><b>\n";
if ($visible)
echo bouton_block_visible("petition");
else
echo bouton_block_invisible("petition");
if ($petition)
echo "CONFIGURER LA PETITION";
else
echo "AJOUTER UNE PETITION";
echo "</b></font></td></tr></table></center>";
if ($visible)
echo debut_block_visible("petition");
else
echo debut_block_invisible("petition");
echo "\n<FORM ACTION='articles.php3' METHOD='post'>"; echo "\n<FORM ACTION='articles.php3' METHOD='post'>";
echo "\n<INPUT TYPE='hidden' NAME='id_article' VALUE='$id_article'>"; echo "\n<INPUT TYPE='hidden' NAME='id_article' VALUE='$id_article'>";
echo "<font face='Verdana,Arial,Helvetica,sans-serif' size='2'><u><b>P&Eacute;TITION</b></u></font><br>\n";
if ($petition){ if ($petition){
echo "<br><input type='radio' name='petition' value='on' id='petitionon' checked>"; echo "<input type='radio' name='petition' value='on' id='petitionon' checked>";
echo "<B><label for='petitionon'>Cet article est une p&eacute;tition</label></B>"; echo "<B><label for='petitionon'>Cet article est une p&eacute;tition</label></B>";
echo "<FONT SIZE=1>"; echo "<FONT SIZE=1>";
...@@ -402,8 +434,9 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op ...@@ -402,8 +434,9 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article) AND $op
echo "</FONT>"; echo "</FONT>";
}else{ }
echo "<br><input type='radio' name='petition' value='on' id='petitionon'>"; else {
echo "<input type='radio' name='petition' value='on' id='petitionon'>";
echo "<label for='petitionon'>Ajouter une p&eacute;tition</label>"; echo "<label for='petitionon'>Ajouter une p&eacute;tition</label>";
} }
if (!$petition){ if (!$petition){
......
...@@ -205,6 +205,11 @@ function afficher_document($id_document, $image_link, $redirect_url = "", $depli ...@@ -205,6 +205,11 @@ function afficher_document($id_document, $image_link, $redirect_url = "", $depli
echo "<td width='100%' align='left' valign='top'>\n"; echo "<td width='100%' align='left' valign='top'>\n";
// Si pas image, lien vers le document
if ($type_inclus != "image") {
afficher_icone("../$fichier", 'Voir le document', 'IMG2/voir.gif', 40, 28, 'right');
}
if ($descriptif) { if ($descriptif) {
echo debut_cadre_relief(); echo debut_cadre_relief();
echo "<font face='Georgia, Garamond, Times, sans-serif' size='3'>\n"; echo "<font face='Georgia, Garamond, Times, sans-serif' size='3'>\n";
......
...@@ -110,12 +110,6 @@ function debut_block_visible($nom_block){ ...@@ -110,12 +110,6 @@ function debut_block_visible($nom_block){
$numero_block["$nom_block"] = $compteur_block; $numero_block["$nom_block"] = $compteur_block;
} }
/*$retour = "\n<script language='JavaScript'>\n";
$retour .= "<!--\n";
$retour .= "vis['".$numero_block["$nom_block"]."'] = 'show';\n";
$retour .= "//-->\n";
$retour .= "</script>\n";
*/
$retour .= "<div id='Layer".$numero_block["$nom_block"]."' style='display: block'>"; $retour .= "<div id='Layer".$numero_block["$nom_block"]."' style='display: block'>";
} }
return $retour; return $retour;
...@@ -158,7 +152,7 @@ function bouton_block_invisible($nom_block) { ...@@ -158,7 +152,7 @@ function bouton_block_invisible($nom_block) {
$numero_block["$nom_block"] = $compteur_block; $numero_block["$nom_block"] = $compteur_block;
} }
return "<a href=\"javascript:swap_couche('".$numero_block["$nom_block"]."')\"><IMG name='triangle".$numero_block["$nom_block"]."' SRC='IMG2/deplierhaut.gif' WIDTH=16 HEIGHT=14 border=0></a> "; return "<a href=\"javascript:swap_couche('".$numero_block["$nom_block"]."')\"><img name='triangle".$numero_block["$nom_block"]."' src='IMG2/deplierhaut.gif' alt='D&eacute;plier' title='D&eacute;plier' width='16' height='14' border='0'></a> ";
} }
} }
...@@ -172,7 +166,7 @@ function bouton_block_visible($nom_block){ ...@@ -172,7 +166,7 @@ function bouton_block_visible($nom_block){
$numero_block["$nom_block"] = $compteur_block; $numero_block["$nom_block"] = $compteur_block;
} }
return "<a href=\"javascript:swap_couche('".$numero_block["$nom_block"]."')\"><IMG name='triangle".$numero_block["$nom_block"]."' SRC='IMG2/deplierbas.gif' WIDTH=16 HEIGHT=14 border=0></a> "; return "<a href=\"javascript:swap_couche('".$numero_block["$nom_block"]."')\"><IMG name='triangle".$numero_block["$nom_block"]."' src='IMG2/deplierbas.gif' alt='D&eacute;plier' title='D&eacute;plier' width='16' height='14' border='0'></a> ";
} }
} }
......
...@@ -161,6 +161,37 @@ function bandeau_titre_boite($titre, $afficher_auteurs, $boite_importante = true ...@@ -161,6 +161,37 @@ function bandeau_titre_boite($titre, $afficher_auteurs, $boite_importante = true
} }
//
// Une icone avec lien et legende (texte en-dessous)
//
function afficher_icone_texte($url, $texte, $image, $largeur, $hauteur, $align = "") {
echo "<table";
if ($align) echo " align='$align'";
echo " cellspacing='0' cellpadding='10'>";
echo "<tr><td width='".floor($largeur * 2.0)."' align='center'>\n";
echo "\t<a class='icone' href=\"$url\"><font face='Verdana, Arial, Helvetica, sans-serif' size='1'>\n";
echo "\t<img src='$image' border='0' width='$largeur' height='$hauteur'><br>\n";
echo "\t<b>$texte</b></font></a>\n";
echo "\t</td></tr></table>\n";
}
//
// Une icone avec lien et info-bulle (pas de texte en-dessous)
//
function afficher_icone($url, $texte, $image, $largeur, $hauteur, $align = "") {
echo "<a class='icone' href=\"$url\">\n";
$texte = attribut_html($texte);
echo "\t<img src='$image' border='0' width='$largeur' height='$hauteur' alt=\"$texte\" title=\"$texte\"";
if ($align) echo " align='$align'";
echo "></a>\n";
}
// //
// Fonctions d'affichage // Fonctions d'affichage
// //
...@@ -671,11 +702,14 @@ function debut_html($titre = "") { ...@@ -671,11 +702,14 @@ function debut_html($titre = "") {
.profondeur {border-right-color:white; border-top-color:#666666; border-left-color:#666666; border-bottom-color:white; border-style:solid} .profondeur {border-right-color:white; border-top-color:#666666; border-left-color:#666666; border-bottom-color:white; border-style:solid}
.hauteur {border-right-color:#666666; border-top-color:white; border-left-color:white; border-bottom-color:#666666; border-style:solid} .hauteur {border-right-color:#666666; border-top-color:white; border-left-color:white; border-bottom-color:#666666; border-style:solid}
label {cursor: pointer;} label {cursor: pointer;}
.arial1 {font-family: Arial, Helvetica, sans-serif; font-size: 10px;} .arial1 { font-family: Arial, Helvetica, sans-serif; font-size: 10px; }
.arial2 {font-family: Arial, Helvetica, sans-serif; font-size: 12px;} .arial2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
a { text-decoration: none; }
a:hover { color:#FF9900; text-decoration: underline; }
a.icone { color:#808080; text-decoration: none; border: 1px #707070; }
a.icone:hover { color:#404040; }
a {text-decoration: none;}
a:hover {color:#FF9900; text-decoration: underline;}
a.spip_in {background-color:#eeeeee;} a.spip_in {background-color:#eeeeee;}
a.spip_out {} a.spip_out {}
a.spip_note {} a.spip_note {}
......
...@@ -525,6 +525,11 @@ function newLinkHref($url) { ...@@ -525,6 +525,11 @@ function newLinkHref($url) {
return $link->getHref(); return $link->getHref();
} }
function newLinkUrl($url) {
$link = new Link($url);
return $link->getUrl();
}
// //
// Recuperer la valeur d'une variable de session sur la page courante // Recuperer la valeur d'une variable de session sur la page courante
// //
......
...@@ -4,6 +4,7 @@ include ("inc.php3"); ...@@ -4,6 +4,7 @@ include ("inc.php3");
include_local ("inc_mots.php3"); include_local ("inc_mots.php3");
$query = "SELECT COUNT(*) FROM spip_auteurs_messages WHERE id_auteur=$connect_id_auteur AND id_message=$id_message"; $query = "SELECT COUNT(*) FROM spip_auteurs_messages WHERE id_auteur=$connect_id_auteur AND id_message=$id_message";
$result = mysql_query($query); $result = mysql_query($query);
list($n) = mysql_fetch_array($result); list($n) = mysql_fetch_array($result);
...@@ -221,7 +222,7 @@ while($row = mysql_fetch_array($result_message)) { ...@@ -221,7 +222,7 @@ while($row = mysql_fetch_array($result_message)) {
if ($cherche_auteur) { if ($cherche_auteur) {
echo "<P ALIGN='left'>"; echo "<P ALIGN='left'>";
$query = "SELECT id_auteur, nom FROM spip_auteurs WHERE messagerie<>'non' AND id_auteur<>'$connect_id_auteur' AND en_ligne>DATE_SUB(NOW(),INTERVAL 15 DAY)"; $query = "SELECT id_auteur, nom FROM spip_auteurs WHERE messagerie<>'non' AND id_auteur<>'$connect_id_auteur'";
$result = mysql_query($query); $result = mysql_query($query);
unset($table_auteurs); unset($table_auteurs);
unset($table_ids); unset($table_ids);
...@@ -375,7 +376,7 @@ while($row = mysql_fetch_array($result_message)) { ...@@ -375,7 +376,7 @@ while($row = mysql_fetch_array($result_message)) {
if ($statut == 'redac' OR $forcer_dest) { if ($statut == 'redac' OR $forcer_dest) {
$query_ajout_auteurs = "SELECT * FROM spip_auteurs WHERE "; $query_ajout_auteurs = "SELECT * FROM spip_auteurs WHERE ";
if ($les_auteurs) $query_ajout_auteurs .= "id_auteur NOT IN ($ze_auteurs) AND "; if ($les_auteurs) $query_ajout_auteurs .= "id_auteur NOT IN ($ze_auteurs) AND ";
$query_ajout_auteurs .= " messagerie<>'non' AND statut<>'5poubelle' AND statut<>'nouveau' AND statut<>'6forum' AND nom<>'Nouvel auteur' AND en_ligne>DATE_SUB(NOW(),INTERVAL 15 DAY) ORDER BY statut, nom"; $query_ajout_auteurs .= " messagerie<>'non' AND statut<>'5poubelle' AND statut<>'nouveau' AND statut<>'6forum' AND nom<>'Nouvel auteur' ORDER BY statut, nom";
$result_ajout_auteurs = mysql_query($query_ajout_auteurs); $result_ajout_auteurs = mysql_query($query_ajout_auteurs);
if (mysql_num_rows($result_ajout_auteurs) > 0) { if (mysql_num_rows($result_ajout_auteurs) > 0) {
...@@ -507,7 +508,8 @@ while($row = mysql_fetch_array($result_message)) { ...@@ -507,7 +508,8 @@ while($row = mysql_fetch_array($result_message)) {
echo "<br><font face='Georgia,Garamond,Times,serif' size=3>"; echo "<br><font face='Georgia,Garamond,Times,serif' size=3>";
if ($expediteur == $connect_id_auteur AND ($statut == 'redac' OR $type == 'pb') OR ($type == 'affich' AND $connect_statut == '0minirezo')) { if ($expediteur == $connect_id_auteur AND ($statut == 'redac' OR $type == 'pb') OR ($type == 'affich' AND $connect_statut == '0minirezo')) {
echo "<table align='right' cellpadding=5><tr><td width=90 align='right'><a href='message_edit.php3?id_message=$id_message'><font face='Verdana,Arial,Helvetica,sans-serif' size=1 color='#666666'><img src='IMG2/message-modif.gif' border=0 width=32 height=32><br><b>Modifier ce message</b></font></a></td></tr></table>"; afficher_icone_texte(newLinkUrl("message_edit.php3?id_message=$id_message"),
"Modifier ce message", 'IMG2/message-modif.gif', 32, 32, 'right');
} }
echo "<p>$texte"; echo "<p>$texte";
...@@ -519,22 +521,19 @@ while($row = mysql_fetch_array($result_message)) { ...@@ -519,22 +521,19 @@ while($row = mysql_fetch_array($result_message)) {
echo "<hr noshade size=1>"; echo "<hr noshade size=1>";
echo "<table align='right' cellpadding=5 width='100%'><tr width='100%'>";
if ($expediteur == $connect_id_auteur AND ($statut == 'redac' OR $type == 'pb') OR ($type == 'affich' AND $connect_statut == '0minirezo')) { if ($expediteur == $connect_id_auteur AND ($statut == 'redac' OR $type == 'pb') OR ($type == 'affich' AND $connect_statut == '0minirezo')) {
echo "<td width=90 align='left'><a href='messagerie.php3?detruire_message=$id_message'><font face='Verdana,Arial,Helvetica,sans-serif' size=1 color='#666666'><img src='IMG2/message-efface.gif' border=0 width=32 height=32><br><b>Supprimer ce message</b></font></a></td>"; afficher_icone_texte(newLinkUrl("messagerie.php3?detruire_message=$id_message"),
"Supprimer ce message", 'IMG2/message-efface.gif', 32, 32, 'left');
} }
echo "<td> &nbsp; </td>";
if ($expediteur == $connect_id_auteur AND $statut == 'redac') { if ($expediteur == $connect_id_auteur AND $statut == 'redac') {
if ($type == 'normal' AND $total_dest < 2){ if ($type == 'normal' AND $total_dest < 2){
echo "<td width=180 align='center'><font face='Verdana,Arial,Helvetica,sans-serif' size=1 color='#666666'><b>Vous devez indiquer un destinataire avant d'envoyer ce message.</b></font></td>"; echo "<p align='right'><font face='Verdana,Arial,Helvetica,sans-serif' size='2' color='#666666'><b>Vous devez indiquer un destinataire avant d'envoyer ce message.</b></font></p>";
} }
else { else {
echo "<td width=90 align='right'><a href='message.php3?id_message=$id_message&change_statut=publie'><font face='Verdana,Arial,Helvetica,sans-serif' size=1 color='#666666'><img src='IMG2/message-valide.gif' border=0 width=32 height=32><br><b>Envoyer ce message</b></font></a></td>"; afficher_icone_texte(newLinkUrl("message.php3?id_message=$id_message&change_statut=publie"),
"Envoyer ce message", 'IMG2/message-efface.gif', 32, 32, 'right');
} }
} }
echo "</tr></table>";
} }
......
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