4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
//
|
|
|
4 |
// Ce fichier ne sera execute qu'une fois
|
|
|
5 |
if (defined("_ECRIRE_INC_AGENDA")) return;
|
|
|
6 |
define("_ECRIRE_INC_AGENDA", "1");
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
//
|
|
|
11 |
// Afficher un agenda (un mois) sous forme de petit tableau
|
|
|
12 |
//
|
|
|
13 |
|
|
|
14 |
function agenda ($mois, $annee, $jour_ved, $mois_ved, $annee_ved, $semaine = false) {
|
|
|
15 |
global $couleur_foncee, $couleur_claire;
|
|
|
16 |
global $connect_id_auteur;
|
|
|
17 |
global $spip_lang_left, $spip_lang_right;
|
|
|
18 |
|
|
|
19 |
$today=getdate(time());
|
|
|
20 |
$jour_today = $today["mday"];
|
|
|
21 |
$mois_today = $today["mon"];
|
|
|
22 |
$annee_today = $today["year"];
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
$date = date("Y-m-d", mktime(0,0,0,$mois, 1, $annee));
|
|
|
26 |
$mois = mois($date);
|
|
|
27 |
$annee = annee($date);
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
// rendez-vous personnels dans le mois
|
|
|
31 |
$result_messages=spip_query("SELECT messages.* FROM spip_messages AS messages, spip_auteurs_messages AS lien WHERE ((lien.id_auteur='$connect_id_auteur' AND lien.id_message=messages.id_message) OR messages.type='affich') AND messages.rv='oui' AND messages.date_heure >='$annee-$mois-1' AND date_heure < DATE_ADD('$annee-$mois-1', INTERVAL 1 MONTH) AND messages.statut='publie' GROUP BY messages.id_message ORDER BY messages.date_heure");
|
|
|
32 |
while($row=spip_fetch_array($result_messages)){
|
|
|
33 |
$date_heure=$row["date_heure"];
|
|
|
34 |
$lejour=journum($row['date_heure']);
|
|
|
35 |
$les_rv[$lejour] ++;
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
$nom = mktime(1,1,1,$mois,1,$annee);
|
|
|
40 |
$jour_semaine = date("w",$nom);
|
|
|
41 |
$nom_mois = nom_mois('2000-'.sprintf("%02d", $mois).'-01');
|
|
|
42 |
if ($jour_semaine==0) $jour_semaine=7;
|
|
|
43 |
|
|
|
44 |
if ($semaine) {
|
|
|
45 |
$jour_valide = mktime(1,1,1,$mois_ved,$jour_ved,$annee_ved);
|
|
|
46 |
$jour_semaine_valide = date("w",$jour_valide);
|
|
|
47 |
if ($jour_semaine_valide==0) $jour_semaine_valide=7;
|
|
|
48 |
$debut = mktime(1,1,1,$mois_ved,$jour_ved-$jour_semaine_valide+1,$annee_ved);
|
|
|
49 |
$fin = mktime(1,1,1,$mois_ved,$jour_ved-$jour_semaine_valide+7,$annee_ved);
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
echo "<div align='center' style='padding: 5px;'><b class='verdana1'><a href='calendrier.php3?mois=$mois&&annee=$annee' style='color: black;'>".affdate_mois_annee("$annee-$mois-1")."</a></b></div>";
|
|
|
53 |
|
|
|
54 |
echo "<table width='100%' cellspacing='0' cellpadding='0'>";
|
|
|
55 |
|
|
|
56 |
echo "<tr>";
|
|
|
57 |
for ($i=1;$i<$jour_semaine;$i++){
|
|
|
58 |
echo "<td></td>";
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
for ($j=1; $j<32; $j++) {
|
|
|
62 |
$jour_j = sprintf("%02d", $j);
|
|
|
63 |
$nom = mktime(1,1,1,$mois,$jour_j,$annee);
|
|
|
64 |
$jour_semaine = date("w",$nom);
|
|
|
65 |
if ($jour_semaine==0) $jour_semaine=7;
|
|
|
66 |
|
|
|
67 |
if (checkdate($mois,$j,$annee)){
|
|
|
68 |
|
|
|
69 |
if ($j == $jour_ved AND $mois == $mois_ved AND $annee == $annee_ved) {
|
|
|
70 |
if ($semaine) $lien = "calendrier_jour.php3";
|
|
|
71 |
else $lien = "calendrier_semaine.php3";
|
|
|
72 |
echo "<td class='arial2' style='margin: 1px; padding: 2px; background-color: white; border: 1px solid $couleur_foncee; text-align: center; -moz-border-radius: 5px;'>";
|
|
|
73 |
echo "<a href='$lien?jour=$j&mois=$mois&annee=$annee' style='color: black'><b>$j</b></a>";
|
|
|
74 |
echo "</td>";
|
|
|
75 |
} else if ($semaine AND $nom >= $debut AND $nom <= $fin) {
|
|
|
76 |
if ($jour_semaine==1) {
|
|
|
77 |
$style = "-moz-border-radius-top$spip_lang_left: 10px; -moz-border-radius-bottom$spip_lang_left: 10px;";
|
|
|
78 |
}
|
|
|
79 |
else if ($jour_semaine==7) {
|
|
|
80 |
$style = "-moz-border-radius-top$spip_lang_right: 10px; -moz-border-radius-bottom$spip_lang_right: 10px;";
|
|
|
81 |
}
|
|
|
82 |
else {
|
|
|
83 |
$style = "";
|
|
|
84 |
}
|
|
|
85 |
echo "<td class='arial2' style='margin: 0px; padding: 3px; background-color: white; text-align: center; $style'>";
|
|
|
86 |
echo "<a href='calendrier_semaine.php3?jour=$j&mois=$mois&annee=$annee' style='color: black'><b>$j</b></a>";
|
|
|
87 |
echo "</td>";
|
|
|
88 |
} else {
|
|
|
89 |
if ($j == $jour_today AND $mois == $mois_today AND $annee == $annee_today) {
|
|
|
90 |
$couleur_fond = $couleur_foncee;
|
|
|
91 |
$couleur = "white";
|
|
|
92 |
}
|
|
|
93 |
else {
|
|
|
94 |
if ($jour_semaine == 7) {
|
|
|
95 |
$couleur_fond = $couleur_claire;
|
|
|
96 |
$couleur = "#aaaaaa";
|
|
|
97 |
} else {
|
|
|
98 |
$couleur_fond = "#eeeeee";
|
|
|
99 |
$couleur = "#aaaaaa";
|
|
|
100 |
}
|
|
|
101 |
if ($les_rv[$j] > 0) {
|
|
|
102 |
$couleur = "black";
|
|
|
103 |
}
|
|
|
104 |
}
|
|
|
105 |
echo "<td>";
|
|
|
106 |
echo "<div class='arial2' style='margin-left: 1px; margin-top: 1px; padding: 2px; background-color: $couleur_fond; text-align: center; -moz-border-radius: 5px;'>";
|
|
|
107 |
if ($semaine) echo "<a href='calendrier_semaine.php3?jour=$j&mois=$mois&annee=$annee' style='color: $couleur;'>$j</a>";
|
|
|
108 |
else echo "<a href='calendrier_jour.php3?jour=$j&mois=$mois&annee=$annee' style='color: $couleur;'>$j</a>";
|
|
|
109 |
echo "</div>";
|
|
|
110 |
echo "</td>";
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
if ($jour_semaine==7) echo "</tr>\n<tr>";
|
|
|
114 |
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
}
|
|
|
118 |
echo "</tr>\n";
|
|
|
119 |
echo "</table>";
|
|
|
120 |
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
function calendrier_jour($jour,$mois,$annee,$large = "large", $le_message = 0) {
|
|
|
126 |
global $spip_lang_rtl, $spip_lang_right, $spip_lang_left;
|
|
|
127 |
global $connect_id_auteur, $connect_statut;
|
|
|
128 |
global $couleur_claire;
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
$date = date("Y-m-d", mktime(0,0,0,$mois, $jour, $annee));
|
|
|
132 |
$jour = journum($date);
|
|
|
133 |
$mois = mois($date);
|
|
|
134 |
$annee = annee($date);
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
if ($large == "large") {
|
|
|
138 |
$largeur = 300;
|
|
|
139 |
$modif_decalage = 40;
|
|
|
140 |
$debut_gauche = 40;
|
|
|
141 |
} else if ($large == "col") {
|
|
|
142 |
$largeur = 120;
|
|
|
143 |
$modif_decalage = 15;
|
|
|
144 |
$debut_gauche = 20;
|
|
|
145 |
} else {
|
|
|
146 |
$largeur = 80;
|
|
|
147 |
$modif_decalage = 5;
|
|
|
148 |
$debut_gauche = 5;
|
|
|
149 |
}
|
|
|
150 |
|
|
|
151 |
$bgcolor = "white";
|
|
|
152 |
|
|
|
153 |
if ($large == "etroit") {
|
|
|
154 |
$bgcolor = "#eeeeee";
|
|
|
155 |
|
|
|
156 |
$today=getdate(time());
|
|
|
157 |
$jour_today = $today["mday"];
|
|
|
158 |
$mois_today = $today["mon"];
|
|
|
159 |
$annee_today = $today["year"];
|
|
|
160 |
|
|
|
161 |
if ($jour == $jour_today AND $mois == $mois_today AND $annee == $annee_today) $bgcolor = "white";
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
$nom = mktime(1,1,1,$mois,$jour,$annee);
|
|
|
165 |
$jour_semaine = date("w",$nom);
|
|
|
166 |
if ($jour_semaine == 0) $bgcolor = $couleur_claire;
|
|
|
167 |
|
|
|
168 |
if ($large == "col" ) {
|
|
|
169 |
echo "<div align='center' style='padding: 5px;'><b class='verdana1'><a href='calendrier_jour.php3?jour=$jour&mois=$mois&annee=$annee' style='color:black;'>".affdate_jourcourt("$annee-$mois-$jour")."</a></b></div>";
|
|
|
170 |
}
|
|
|
171 |
else if ($large == "large") {
|
|
|
172 |
echo "<div align='center' style='padding: 5px;'>";
|
|
|
173 |
echo " <a href='message_edit.php3?rv=$annee-$mois-$jour&new=oui&type=pb' class='arial1' style='color: blue;'><IMG SRC='img_pack/m_envoi_bleu$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0'> "._T("lien_nouvea_pense_bete")."</a>";
|
|
|
174 |
echo " <a href='message_edit.php3?rv=$annee-$mois-$jour&new=oui&type=normal' class='arial1' style='color: green;'><IMG SRC='img_pack/m_envoi$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0'> "._T("lien_nouveau_message")."</a>";
|
|
|
175 |
|
|
|
176 |
if ($connect_statut == "0minirezo")
|
|
|
177 |
echo " <a href='message_edit.php3?rv=$annee-$mois-$jour&new=oui&type=affich' class='arial1' style='color: #ff9900;'><IMG SRC='img_pack/m_envoi_jaune$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0'> "._T("lien_nouvelle_annonce")."</a>\n";
|
|
|
178 |
echo "</div>";
|
|
|
179 |
}
|
|
|
180 |
if ($large != "etroit") echo "<div style='background-color: $bgcolor; border-left: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa;'>"; // bordure
|
|
|
181 |
else echo "<div style='background-color: $bgcolor;'>"; // bordure
|
|
|
182 |
|
|
|
183 |
echo "<div style='position: relative; width: 100%; height: 450px; background: url(img_pack/fond-calendrier.gif);'>";
|
|
|
184 |
|
|
|
185 |
echo "<div style='position: absolute; $spip_lang_left: 2px; top: 2px; color: #666666;' class='arial0'><b class='arial0'>0:00<br />7:00</b></div>";
|
|
|
186 |
for ($i = 7; $i < 20; $i++) {
|
|
|
187 |
echo "<div style='position: absolute; $spip_lang_left: 2px; top: ".(($i-6)*30+2)."px; color: #666666;' class='arial0'><b class='arial0'>$i:00</b></div>";
|
|
|
188 |
}
|
|
|
189 |
echo "<div style='position: absolute; $spip_lang_left: 2px; top: 422px; color: #666666;' class='arial0'><b class='arial0'>20:00<br />23:59</b></div>";
|
|
|
190 |
|
|
|
191 |
|
|
|
192 |
// articles du jour
|
|
|
193 |
$query="SELECT * FROM spip_articles WHERE statut='publie' AND date >='$annee-$mois-$jour' AND date < DATE_ADD('$annee-$mois-$jour', INTERVAL 1 DAY) ORDER BY date";
|
|
|
194 |
$result=spip_query($query);
|
|
|
195 |
while($row=spip_fetch_array($result)){
|
|
|
196 |
$id_article=$row['id_article'];
|
|
|
197 |
$titre=typo($row['titre']);
|
|
|
198 |
$lejour=journum($row['date']);
|
|
|
199 |
$lemois = mois($row['date']);
|
|
|
200 |
$les_articles.="<div><a href='articles.php3?id_article=$id_article' class='arial1'><img src='img_pack/puce-verte-breve.gif' width='8' height='9' border='0'> $titre</a></div>";
|
|
|
201 |
}
|
|
|
202 |
|
|
|
203 |
// breves du jour
|
|
|
204 |
$query="SELECT * FROM spip_breves WHERE statut='publie' AND date_heure >='$annee-$mois-$jour' AND date_heure < DATE_ADD('$annee-$mois-$jour', INTERVAL 1 DAY) ORDER BY date_heure";
|
|
|
205 |
$result=spip_query($query);
|
|
|
206 |
while($row=spip_fetch_array($result)){
|
|
|
207 |
$id_breve=$row['id_breve'];
|
|
|
208 |
$titre=typo($row['titre']);
|
|
|
209 |
$lejour=journum($row['date_heure']);
|
|
|
210 |
$lemois = mois($row['date_heure']);
|
|
|
211 |
$les_breves.="<div><a href='breves_voir.php3?id_breve=$id_breve' class='arial1'><img src='img_pack/puce-blanche-breve.gif' width='8' height='9' border='0'> $titre</a></div>";
|
|
|
212 |
}
|
|
|
213 |
|
|
|
214 |
if ($large == "large") {
|
|
|
215 |
if ($les_articles OR $les_breves) {
|
|
|
216 |
if ($les_articles) $les_articles = "<div><b class='verdana1'>"._T('info_articles')."</b></div>".$les_articles;
|
|
|
217 |
if ($les_breves) $les_breves = "<div><b class='verdana1'>"._T('info_breves_02')."</b></div>".$les_breves;
|
|
|
218 |
echo "<div style='position: absolute; $spip_lang_left: 355px; top: 32px; width: 140px;'>";
|
|
|
219 |
echo $les_articles;
|
|
|
220 |
echo $les_breves;
|
|
|
221 |
echo "</div>";
|
|
|
222 |
}
|
|
|
223 |
}
|
|
|
224 |
|
|
|
225 |
// rendez-vous personnels
|
|
|
226 |
$result_messages=spip_query("SELECT messages.* FROM spip_messages AS messages, spip_auteurs_messages AS lien WHERE ((lien.id_auteur='$connect_id_auteur' AND lien.id_message=messages.id_message) OR messages.type='affich') AND messages.rv='oui' AND messages.date_heure >='$annee-$mois-$jour' AND messages.date_heure <= '$annee-$mois-$jour 23:59:59' AND messages.statut='publie' GROUP BY messages.id_message ORDER BY messages.date_heure");
|
|
|
227 |
while($row=spip_fetch_array($result_messages)){
|
|
|
228 |
$id_message=$row['id_message'];
|
|
|
229 |
$date_heure=$row["date_heure"];
|
|
|
230 |
$date_fin=$row["date_fin"];
|
|
|
231 |
$titre=propre($row["titre"]);
|
|
|
232 |
$texte = propre($row["texte"]);
|
|
|
233 |
$type=$row["type"];
|
|
|
234 |
$lejour=journum($row['date_heure']);
|
|
|
235 |
|
|
|
236 |
if ($type=="normal") {
|
|
|
237 |
$la_couleur = "#02531B";
|
|
|
238 |
$couleur_fond = "#CFFEDE";
|
|
|
239 |
}
|
|
|
240 |
elseif ($type=="pb") {
|
|
|
241 |
$la_couleur = "#3874B0";
|
|
|
242 |
$couleur_fond = "#EDF3FE";
|
|
|
243 |
}
|
|
|
244 |
elseif ($type=="affich") {
|
|
|
245 |
$la_couleur = "#ccaa00";
|
|
|
246 |
$couleur_fond = "#ffffee";
|
|
|
247 |
}
|
|
|
248 |
else {
|
|
|
249 |
$la_couleur="black";
|
|
|
250 |
$couleur_fond="#aaaaaa";
|
|
|
251 |
}
|
|
|
252 |
|
|
|
253 |
$heure_debut = heures($date_heure);
|
|
|
254 |
$minutes_debut = minutes($date_heure);
|
|
|
255 |
|
|
|
256 |
// En attendant gestion heure de fin...
|
|
|
257 |
$heure_fin = heures($date_fin);
|
|
|
258 |
$minutes_fin = minutes($date_fin);
|
|
|
259 |
|
|
|
260 |
if ($heure_debut < 6) {
|
|
|
261 |
$heure_debut = 6;
|
|
|
262 |
$minutes_debut = 0;
|
|
|
263 |
}
|
|
|
264 |
if ($heure_fin < 7) {
|
|
|
265 |
$heure_fin = 7;
|
|
|
266 |
$minutes_fin = 00;
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
if ($heure_debut > 20) {
|
|
|
270 |
$heure_debut = 20;
|
|
|
271 |
$minutes_debut = 0;
|
|
|
272 |
}
|
|
|
273 |
if ($heure_fin > 20) {
|
|
|
274 |
$heure_fin = 21;
|
|
|
275 |
$minutes_fin = 00;
|
|
|
276 |
}
|
|
|
277 |
|
|
|
278 |
$haut = floor((($heure_debut - 6)*60 + $minutes_debut)/2);
|
|
|
279 |
$bas = floor((($heure_fin - 6)*60 + $minutes_fin)/2);
|
|
|
280 |
|
|
|
281 |
$hauteur = ($bas-$haut) - 7;
|
|
|
282 |
if ($hauteur < 23) $hauteur = 23;
|
|
|
283 |
|
|
|
284 |
if ($bas_prec > $haut) $decalage = $decalage + $modif_decalage;
|
|
|
285 |
else $decalage = $debut_gauche;
|
|
|
286 |
|
|
|
287 |
if ($bas > $bas_prec) $bas_prec = $bas;
|
|
|
288 |
|
|
|
289 |
if ($le_message == $id_message) $couleur_cadre = "black";
|
|
|
290 |
else $couleur_cadre = "$la_couleur";
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
echo "<div class='dessous' style='position: absolute; $spip_lang_left: ".$decalage."px; top: ".$haut."px; height: ".($hauteur+8)."px; width: ".($largeur+8)."px; ' onClick=\"document.location='message.php3?id_message=$id_message'\" onMouseOver=\"changeclass(this, 'dessus');\" onMouseOut=\"changeclass(this, 'dessous');\">";
|
|
|
294 |
echo "<div style='position: absolute; height: ".$hauteur."px; width: ".$largeur."px; border: 1px solid $la_couleur; padding: 3px; background-color: $couleur_fond; -moz-border-radius: 5px;'>";
|
|
|
295 |
echo "</div>";
|
|
|
296 |
echo "<div style='position: absolute; overflow: hidden; height: ".$hauteur."px; width: ".$largeur."px; border: 1px solid $couleur_cadre; padding: 3px; -moz-border-radius: 5px;'>";
|
|
|
297 |
echo "<div><b><a href='message.php3?id_message=$id_message' class='verdana1' style='color: $la_couleur;'>$titre</a></b></div>";
|
|
|
298 |
|
|
|
299 |
if ($type == "normal") {
|
|
|
300 |
$result_auteurs=spip_query("SELECT auteurs.* FROM spip_auteurs AS auteurs, spip_auteurs_messages AS lien WHERE (lien.id_message='$id_message' AND (auteurs.id_auteur!='$connect_id_auteur' AND lien.id_auteur=auteurs.id_auteur))");
|
|
|
301 |
while($row_auteur=spip_fetch_array($result_auteurs)){
|
|
|
302 |
$id_auteur=$row_auteur['id_auteur'];
|
|
|
303 |
$nom_auteur=$row_auteur['nom'];
|
|
|
304 |
$les_auteurs[$id_message][] = $nom_auteur;
|
|
|
305 |
}
|
|
|
306 |
if (count($les_auteurs[$id_message]) > 0) {
|
|
|
307 |
echo "<div><font class='verdana1'>".join($les_auteurs[$id_message],", ")."</font></div>";
|
|
|
308 |
}
|
|
|
309 |
}
|
|
|
310 |
|
|
|
311 |
if ($large) echo "<div><a href='message.php3?id_message=$id_message' class='arial1' style='color: #333333; text-decoration: none;'>$texte</a></div>";
|
|
|
312 |
echo "</div>";
|
|
|
313 |
echo "</div>";
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
echo "</div>";
|
|
|
317 |
echo "</div>";
|
|
|
318 |
|
|
|
319 |
if ($large != "large") {
|
|
|
320 |
if ($les_articles OR $les_breves) {
|
|
|
321 |
if ($les_articles) $les_articles = "<div><b class='verdana1'>"._T('info_articles')."</b></div>".$les_articles;
|
|
|
322 |
if ($les_breves) $les_breves = "<div><b class='verdana1'>"._T('info_breves_02')."</b></div>".$les_breves;
|
|
|
323 |
echo "<div style='padding: 5px;'>";
|
|
|
324 |
echo $les_articles;
|
|
|
325 |
echo $les_breves;
|
|
|
326 |
echo "</div>";
|
|
|
327 |
}
|
|
|
328 |
}
|
|
|
329 |
|
|
|
330 |
|
|
|
331 |
}
|
|
|
332 |
|
|
|
333 |
function liste_rv($query, $type) {
|
|
|
334 |
global $spip_lang_rtl, $spip_lang_left;
|
|
|
335 |
|
|
|
336 |
if ($type == annonces) {
|
|
|
337 |
$titre = _T('info_annonces_generales');
|
|
|
338 |
$couleur_titre = "ccaa00";
|
|
|
339 |
$couleur_texte = "black";
|
|
|
340 |
$couleur_fond = "#ffffee";
|
|
|
341 |
}
|
|
|
342 |
else if ($type == pb) {
|
|
|
343 |
$titre = _T('infos_vos_pense_bete');
|
|
|
344 |
$couleur_titre = "#3874B0";
|
|
|
345 |
$couleur_fond = "#EDF3FE";
|
|
|
346 |
$couleur_texte = "white";
|
|
|
347 |
}
|
|
|
348 |
else if ($type == rv) {
|
|
|
349 |
$titre = _T('info_vos_rendez_vous');
|
|
|
350 |
$couleur_titre = "#666666";
|
|
|
351 |
$couleur_fond = "#eeeeee";
|
|
|
352 |
$couleur_texte = "white";
|
|
|
353 |
}
|
|
|
354 |
|
|
|
355 |
$result = spip_query($query);
|
|
|
356 |
if (spip_num_rows($result) > 0){
|
|
|
357 |
echo "<div> </div><div style='border: 1px solid #999999; background-color: $couleur_fond; -moz-border-radius: 5px;'>";
|
|
|
358 |
echo "<div style='background-color: $couleur_titre; padding: 3px; color: $couleur_texte;'>";
|
|
|
359 |
echo "<b class='verdana1'>$titre</b>";
|
|
|
360 |
echo "</div>";
|
|
|
361 |
echo "<div style='padding: 3px;'>";
|
|
|
362 |
while ($row = spip_fetch_object($result)) {
|
|
|
363 |
if (ereg("^=([^[:space:]]+)$",$row->texte,$match))
|
|
|
364 |
$url = $match[1];
|
|
|
365 |
else
|
|
|
366 |
$url = "message.php3?id_message=".$row->id_message;
|
|
|
367 |
$type=$row->type;
|
|
|
368 |
$rv = $row->rv;
|
|
|
369 |
$date = $row->date_heure;
|
|
|
370 |
|
|
|
371 |
if ($type=="normal") $bouton = "m_envoi";
|
|
|
372 |
elseif ($type=="pb") $bouton = "m_envoi_bleu";
|
|
|
373 |
elseif ($type=="affich") $bouton = "m_envoi_jaune";
|
|
|
374 |
else $bouton = "m_envoi";
|
|
|
375 |
|
|
|
376 |
$titre = typo($row->titre);
|
|
|
377 |
|
|
|
378 |
echo "<div style='margin: 5px; padding-$spip_lang_left: 20px; background: url(img_pack/$bouton$spip_lang_rtl.gif) $spip_lang_left center no-repeat;'>";
|
|
|
379 |
if ($rv == "oui") {
|
|
|
380 |
echo "<b class='arial0'>".affdate_jourcourt($date)."</b><br />";
|
|
|
381 |
}
|
|
|
382 |
echo "<b><a href='$url' class='arial1'>$titre</a></b>";
|
|
|
383 |
echo "</div>\n";
|
|
|
384 |
}
|
|
|
385 |
echo "</div>";
|
|
|
386 |
|
|
|
387 |
echo "</div>";
|
|
|
388 |
}
|
|
|
389 |
}
|
|
|
390 |
|
|
|
391 |
function afficher_taches () {
|
|
|
392 |
global $connect_id_auteur, $options;
|
|
|
393 |
$query = "SELECT * FROM spip_messages WHERE type = 'affich' AND rv != 'oui' AND statut = 'publie' ORDER BY date_heure DESC";
|
|
|
394 |
liste_rv($query, "annonces");
|
|
|
395 |
|
|
|
396 |
$query = "SELECT * FROM spip_messages AS messages WHERE id_auteur=$connect_id_auteur AND statut='publie' AND type='pb' AND rv!='oui'";
|
|
|
397 |
liste_rv($query, "pb");
|
|
|
398 |
|
|
|
399 |
$query = "SELECT messages.* FROM spip_messages AS messages, spip_auteurs_messages AS lien WHERE ((lien.id_auteur='$connect_id_auteur' AND lien.id_message=messages.id_message) OR messages.type='affich') AND messages.rv='oui' AND messages.date_heure > DATE_SUB(NOW(), INTERVAL 1 DAY) AND messages.date_heure < DATE_ADD(NOW(), INTERVAL 1 MONTH) AND messages.statut='publie' GROUP BY messages.id_message ORDER BY messages.date_heure";
|
|
|
400 |
liste_rv($query, "rv");
|
|
|
401 |
}
|
|
|
402 |
|
|
|
403 |
// afficher l'encadre "lien iCal"
|
|
|
404 |
function afficher_ical($id) {
|
|
|
405 |
echo debut_cadre_enfonce();
|
|
|
406 |
echo "<div class='verdana1'>"._T("calendrier_synchro")."</div>";
|
|
|
407 |
icone_horizontale (_T("icone_suivi_activite"), "synchro.php3", "synchro-24.gif");
|
|
|
408 |
echo fin_cadre_enfonce();
|
|
|
409 |
}
|
|
|
410 |
|
|
|
411 |
?>
|