4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************\
|
|
|
4 |
* SPIP, Systeme de publication pour l'internet *
|
|
|
5 |
* *
|
|
|
6 |
* Copyright (c) 2001-2005 *
|
|
|
7 |
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
|
8 |
* *
|
|
|
9 |
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
|
10 |
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
|
11 |
\***************************************************************************/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
include ("inc.php3");
|
|
|
15 |
include_ecrire ("inc_acces.php3");
|
|
|
16 |
|
|
|
17 |
if ($supp_dest) {
|
|
|
18 |
spip_query("DELETE FROM spip_auteurs_messages WHERE id_message=$id_message AND id_auteur=$supp_dest");
|
|
|
19 |
}
|
|
|
20 |
|
|
|
21 |
if ($detruire_message) {
|
|
|
22 |
spip_query("DELETE FROM spip_messages WHERE id_message=$detruire_message");
|
|
|
23 |
spip_query("DELETE FROM spip_auteurs_messages WHERE id_message=$detruire_message");
|
|
|
24 |
spip_query("DELETE FROM spip_forum WHERE id_message=$detruire_message");
|
|
|
25 |
}
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
debut_page(_T('titre_page_messagerie'), "redacteurs", "messagerie");
|
|
|
29 |
|
|
|
30 |
//barre_onglets("calendrier", "messagerie");
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
debut_gauche("messagerie");
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
debut_boite_info();
|
|
|
37 |
|
|
|
38 |
echo _T('info_gauche_messagerie');
|
|
|
39 |
|
|
|
40 |
echo "<p>".http_img_pack("m_envoi$spip_lang_rtl.gif", 'V', "WIDTH='14' HEIGHT='7' BORDER='0'") .' ' . _T('info_symbole_vert');
|
|
|
41 |
|
|
|
42 |
echo aide ("messut");
|
|
|
43 |
|
|
|
44 |
echo "<p>".http_img_pack("m_envoi_bleu$spip_lang_rtl.gif", 'B', "WIDTH='14' HEIGHT='7' BORDER='0'") .' ' . _T('info_symbole_bleu');
|
|
|
45 |
|
|
|
46 |
echo aide ("messpense");
|
|
|
47 |
|
|
|
48 |
echo "<p>".http_img_pack("m_envoi_jaune$spip_lang_rtl.gif", 'J', "WIDTH='14' HEIGHT='7' BORDER='0'") .' ' . _T('info_symbole_jaune');
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
fin_boite_info();
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
creer_colonne_droite();
|
|
|
56 |
|
|
|
57 |
debut_cadre_relief("messagerie-24.gif");
|
|
|
58 |
icone_horizontale(_T('lien_nouvea_pense_bete'),"message_edit.php3?new=oui&type=pb", "pense-bete.gif");
|
|
|
59 |
icone_horizontale(_T('lien_nouveau_message'),"message_edit.php3?new=oui&type=normal", "message.gif");
|
|
|
60 |
|
|
|
61 |
if ($connect_statut == "0minirezo") {
|
|
|
62 |
icone_horizontale(_T('lien_nouvelle_annonce'),"message_edit.php3?new=oui&type=affich", "annonce.gif");
|
|
|
63 |
}
|
|
|
64 |
fin_cadre_relief();
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
# Affiche l'encadre "lien iCal"
|
|
|
68 |
|
|
|
69 |
echo
|
|
|
70 |
debut_cadre_enfonce('',true) .
|
|
|
71 |
"<div class='verdana1'>"._T("calendrier_synchro") .
|
|
|
72 |
"<a href='synchro.php3' class='cellule-h'><table cellpadding='0' valign='middle'><tr>\n" .
|
|
|
73 |
"<td><a href='synchro.php3'><div class='cell-i'>"
|
|
|
74 |
. http_img_pack("rien.gif", ' ', http_style_background('synchro-24.gif', "; background-repeat: no-repeat; background-position: center center;"))
|
|
|
75 |
. "</div></a></td>\n"
|
|
|
76 |
. "<td class='cellule-h-lien'><a href='synchro.php3' class='cellule-h'>"
|
|
|
77 |
. _T("icone_suivi_activite")
|
|
|
78 |
. "</a></td>\n</tr></table></a>\n" ."</div>" .
|
|
|
79 |
fin_cadre_enfonce(true);
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
debut_droite("messagerie");
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
$messages_vus = '';
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
$query_message = "SELECT * FROM spip_messages AS messages WHERE id_auteur=$connect_id_auteur AND statut='publie' AND type='pb' AND (date_fin > DATE_SUB(NOW(), INTERVAL 1 DAY) OR rv != 'oui')";
|
|
|
89 |
afficher_messages(_T('infos_vos_pense_bete'), $query_message, false, true);
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
$query_message = "SELECT * FROM spip_messages AS messages, spip_auteurs_messages AS lien ".
|
|
|
93 |
"WHERE lien.id_auteur=$connect_id_auteur AND vu='non' ".
|
|
|
94 |
"AND statut='publie' AND lien.id_message=messages.id_message";
|
|
|
95 |
afficher_messages(_T('info_nouveaux_message'), $query_message, true, true);
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
$query_message = "SELECT * FROM spip_messages AS messages, spip_auteurs_messages AS lien ".
|
|
|
99 |
"WHERE lien.id_auteur=$connect_id_auteur AND statut='publie' AND type='normal' AND lien.id_message=messages.id_message ".
|
|
|
100 |
"AND (date_fin > DATE_SUB(NOW(), INTERVAL 1 DAY) OR rv != 'oui')";
|
|
|
101 |
afficher_messages(_T('info_discussion_cours'), $query_message, true, false);
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
// Afficher le lien RSS
|
|
|
105 |
include_ecrire('inc_rss.php3');
|
|
|
106 |
$op = 'messagerie';
|
|
|
107 |
$args = array(
|
|
|
108 |
'id_auteur' => $connect_id_auteur
|
|
|
109 |
);
|
|
|
110 |
echo "<div style='text-align: "
|
|
|
111 |
. $GLOBALS['spip_lang_right']
|
|
|
112 |
. ";'>"
|
|
|
113 |
. bouton_spip_rss($op, $args)
|
|
|
114 |
."</div>";
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
$query_message = "SELECT * FROM spip_messages AS messages WHERE id_auteur=$connect_id_auteur AND statut='redac'";
|
|
|
120 |
afficher_messages(_T('info_message_en_redaction'), $query_message, true, false, false);
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
$query = "SELECT auteurs.id_auteur, auteurs.nom, COUNT(*) AS total FROM spip_auteurs AS auteurs, spip_auteurs_messages AS lien2, spip_messages AS messages, spip_auteurs_messages AS lien ".
|
|
|
125 |
"WHERE (lien.id_auteur = $connect_id_auteur AND lien.id_message = messages.id_message AND messages.statut = 'publie' AND (messages.rv != 'oui' OR messages.date_fin > NOW() )) ".
|
|
|
126 |
"AND (lien2.id_auteur = lien2.id_auteur AND lien2.id_message = messages.id_message AND lien2.id_auteur != $connect_id_auteur AND auteurs.id_auteur = lien2.id_auteur) ".
|
|
|
127 |
"GROUP BY auteurs.id_auteur ORDER BY total DESC LIMIT 0,10";
|
|
|
128 |
|
|
|
129 |
$result = spip_query($query);
|
|
|
130 |
if (spip_num_rows($result) > 0) {
|
|
|
131 |
|
|
|
132 |
echo "<div style='height: 12px;'></div>";
|
|
|
133 |
echo "<div class='liste'>";
|
|
|
134 |
|
|
|
135 |
bandeau_titre_boite2(_T('info_principaux_correspondants'), "redacteurs-24.gif", "#333333", "white");
|
|
|
136 |
|
|
|
137 |
//echo "<div style='padding: 3px; background-color: $couleur_foncee; color: white;'><b class='verdana2'>"._T('info_principaux_correspondants')."</b></div>";
|
|
|
138 |
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
|
|
|
139 |
echo "<tr><td valign='top' width='50%'>";
|
|
|
140 |
while($row = spip_fetch_array($result)) {
|
|
|
141 |
$count ++;
|
|
|
142 |
if ($i == 1) {
|
|
|
143 |
$bgcolor = "white";
|
|
|
144 |
$i = 0;
|
|
|
145 |
} else {
|
|
|
146 |
$bgcolor = $couleur_claire;
|
|
|
147 |
$i = 1;
|
|
|
148 |
}
|
|
|
149 |
$id_auteur = $row['id_auteur'];
|
|
|
150 |
$nom = typo($row["nom"]);
|
|
|
151 |
$total = $row["total"];
|
|
|
152 |
echo "<div class='tr_liste' onMouseOver=\"changeclass(this,'tr_liste_over');\" onMouseOut=\"changeclass(this,'tr_liste');\" style=' padding: 2px; padding-left: 10px; border-bottom: 1px solid #cccccc;'><div class='verdana1'><img src='" . _DIR_IMG_PACK . "redac-12.gif' border='0'> <a href='auteurs_edit.php3?id_auteur=$id_auteur'>$nom</a> ($total)</div></div>";
|
|
|
153 |
if ($count == ceil(spip_num_rows($result)/2)) echo "</td><td valign='top' width='50%' style='background-color: #eeeeee;'>";
|
|
|
154 |
}
|
|
|
155 |
echo "</td></tr></table>";
|
|
|
156 |
echo "</div>";
|
|
|
157 |
}
|
|
|
158 |
|
|
|
159 |
$query_message = "SELECT * FROM spip_messages AS messages WHERE id_auteur=$connect_id_auteur AND statut='publie' AND type='pb' AND rv!='oui'";
|
|
|
160 |
afficher_messages(_T('info_pense_bete_ancien'), $query_message, false, false, false);
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
$query_message = "SELECT * FROM spip_messages AS messages WHERE statut='publie' AND type='affich' AND (date_fin > DATE_SUB(NOW(), INTERVAL 1 DAY) OR rv != 'oui')";
|
|
|
164 |
afficher_messages(_T('info_tous_redacteurs'), $query_message, false, false, false);
|
|
|
165 |
|
|
|
166 |
fin_page();
|
|
|
167 |
|
|
|
168 |
?>
|