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 |
//
|
|
|
15 |
// Ce fichier ne sera execute qu'une fois
|
|
|
16 |
if (defined("_ECRIRE_INC_PRESENTATION")) return;
|
|
|
17 |
define("_ECRIRE_INC_PRESENTATION", "1");
|
|
|
18 |
|
|
|
19 |
include_ecrire("inc_filtres.php3"); # pour les fonctions http_* (normalement deja la)
|
|
|
20 |
include_ecrire ("inc_lang.php3");
|
|
|
21 |
utiliser_langue_visiteur();
|
|
|
22 |
|
|
|
23 |
//
|
|
|
24 |
// Aide
|
|
|
25 |
//
|
|
|
26 |
|
|
|
27 |
// en hebreu le ? ne doit pas etre inverse
|
|
|
28 |
function aide_lang_dir($spip_lang,$spip_lang_rtl) {
|
|
|
29 |
return ($spip_lang<>'he') ? $spip_lang_rtl : '';
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
function aide($aide='') {
|
|
|
33 |
global $couleur_foncee, $spip_lang, $spip_lang_rtl, $spip_display;
|
|
|
34 |
|
|
|
35 |
if (!$aide OR $spip_display == 4) return;
|
|
|
36 |
|
|
|
37 |
return " <a class='aide' href=\"". _DIR_RESTREINT
|
|
|
38 |
. "aide_index.php3?aide=$aide&"
|
|
|
39 |
. "var_lang=$spip_lang\" target=\"spip_aide\" "
|
|
|
40 |
. "onclick=\"javascript:window.open(this.href,"
|
|
|
41 |
. "'spip_aide', 'scrollbars=yes, resizable=yes, width=740, "
|
|
|
42 |
. "height=580'); return false;\">"
|
|
|
43 |
. http_img_pack("aide".aide_lang_dir($spip_lang,$spip_lang_rtl).".gif",
|
|
|
44 |
_T('info_image_aide'), "title=\""._T('titre_image_aide')
|
|
|
45 |
. "\" width=\"12\" height=\"12\" border=\"0\" align=\"middle\"")
|
|
|
46 |
. "</a>";
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
//
|
|
|
51 |
// affiche un bouton imessage
|
|
|
52 |
//
|
|
|
53 |
function bouton_imessage($destinataire, $row = '') {
|
|
|
54 |
// si on passe "force" au lieu de $row, on affiche l'icone sans verification
|
|
|
55 |
global $connect_id_auteur;
|
|
|
56 |
global $spip_lang_rtl;
|
|
|
57 |
global $couche_invisible;
|
|
|
58 |
$couche_invisible ++;
|
|
|
59 |
|
|
|
60 |
$url = new Link("message_edit.php3");
|
|
|
61 |
|
|
|
62 |
// verifier que ce n'est pas un auto-message
|
|
|
63 |
if ($destinataire == $connect_id_auteur)
|
|
|
64 |
return;
|
|
|
65 |
// verifier que le destinataire a un login
|
|
|
66 |
if ($row != "force") {
|
|
|
67 |
$login_req = "select login, messagerie from spip_auteurs where id_auteur=$destinataire AND en_ligne>DATE_SUB(NOW(),INTERVAL 15 DAY)";
|
|
|
68 |
$row = spip_fetch_array(spip_query($login_req));
|
|
|
69 |
|
|
|
70 |
if (($row['login'] == "") OR ($row['messagerie'] == "non")) {
|
|
|
71 |
return;
|
|
|
72 |
}
|
|
|
73 |
}
|
|
|
74 |
$url->addVar('dest',$destinataire);
|
|
|
75 |
$url->addVar('new','oui');
|
|
|
76 |
$url->addVar('type','normal');
|
|
|
77 |
|
|
|
78 |
if ($destinataire) $title = _T('info_envoyer_message_prive');
|
|
|
79 |
else $title = _T('info_ecire_message_prive');
|
|
|
80 |
|
|
|
81 |
$texte_bouton = http_img_pack("m_envoi$spip_lang_rtl.gif", "m>", "width='14' height='7' border='0'", $title);
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
$ret .= "<a href='". $url->getUrl() ."' title=\"$title\">";
|
|
|
85 |
$ret .= "$texte_bouton</a>";
|
|
|
86 |
|
|
|
87 |
return $ret;
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
// Faux HR, avec controle de couleur
|
|
|
93 |
|
|
|
94 |
function hr($color, $retour = false) {
|
|
|
95 |
$ret = "<div style='height: 1px; margin-top: 5px; padding-top: 5px; border-top: 1px solid $color;'></div>";
|
|
|
96 |
|
|
|
97 |
if ($retour) return $ret;
|
|
|
98 |
else echo $ret;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
//
|
|
|
103 |
// Cadres
|
|
|
104 |
//
|
|
|
105 |
|
|
|
106 |
function debut_cadre($style, $icone = "", $fonction = "", $titre = "") {
|
|
|
107 |
global $browser_name;
|
|
|
108 |
global $spip_display, $spip_lang_left;
|
|
|
109 |
static $accesskey = 97; // a
|
|
|
110 |
|
|
|
111 |
if ($spip_display != 1 AND $spip_display != 4 AND strlen($icone) > 1) {
|
|
|
112 |
$style_gauche = " padding-$spip_lang_left: 38px;";
|
|
|
113 |
$style_cadre = " style='margin-top: 14px;'";
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
// accesskey pour accessibilite espace prive
|
|
|
117 |
if ($accesskey <= 122) // z
|
|
|
118 |
{
|
|
|
119 |
$accesskey_c = chr($accesskey++);
|
|
|
120 |
$ret = "<a name='access-$accesskey_c' href='#access-$accesskey_c' accesskey='$accesskey_c'></a>";
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
if ($style == "e") {
|
|
|
124 |
$ret .= "<div class='cadre-e-noir'$style_cadre><div class='cadre-$style'>";
|
|
|
125 |
}
|
|
|
126 |
else {
|
|
|
127 |
$ret .= "<div class='cadre-$style'$style_cadre>";
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
$ret .= "<div style='position: relative;'>";
|
|
|
131 |
|
|
|
132 |
if ($spip_display != 1 AND $spip_display != 4 AND strlen($icone) > 1) {
|
|
|
133 |
$ret .= "<div style='position: absolute; top: -16px; $spip_lang_left: 10px;'>";
|
|
|
134 |
if ($fonction) {
|
|
|
135 |
$ret .= "<div " . http_style_background($icone, "no-repeat; padding: 0px; margin: 0px");
|
|
|
136 |
$ret .= http_img_pack($fonction, "", "");
|
|
|
137 |
$ret .= "</div>";
|
|
|
138 |
}
|
|
|
139 |
else $ret .= http_img_pack("$icone", "", "");
|
|
|
140 |
$ret .= "</div>";
|
|
|
141 |
|
|
|
142 |
$style_cadre = " style='position: relative; top: 15px; margin-bottom: 14px;'";
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
|
|
|
146 |
if (strlen($titre) > 0) {
|
|
|
147 |
if ($spip_display == 4) {
|
|
|
148 |
$ret .= "<h3 class='cadre-titre'>$titre</h3>";
|
|
|
149 |
} else {
|
|
|
150 |
$ret .= "<div class='cadre-titre' style='margin: 0px;$style_gauche'>$titre</div>";
|
|
|
151 |
}
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
$ret .= "</div>";
|
|
|
156 |
|
|
|
157 |
$ret .= "<div class='cadre-padding'>";
|
|
|
158 |
|
|
|
159 |
|
|
|
160 |
return $ret;
|
|
|
161 |
}
|
|
|
162 |
|
|
|
163 |
function fin_cadre($style) {
|
|
|
164 |
|
|
|
165 |
$ret = "</div>";
|
|
|
166 |
$ret .= "</div>";
|
|
|
167 |
if ($style == "e") $ret .= "</div>";
|
|
|
168 |
if ($style != "forum" AND $style != "thread-forum") $ret .= "<div style='height: 5px;'></div>";
|
|
|
169 |
|
|
|
170 |
return $ret;
|
|
|
171 |
}
|
|
|
172 |
|
|
|
173 |
|
|
|
174 |
function debut_cadre_relief($icone='', $return = false, $fonction='', $titre = ''){
|
|
|
175 |
$retour_aff = debut_cadre('r', $icone, $fonction, $titre);
|
|
|
176 |
|
|
|
177 |
if ($return) return $retour_aff;
|
|
|
178 |
else echo $retour_aff;
|
|
|
179 |
}
|
|
|
180 |
|
|
|
181 |
function fin_cadre_relief($return = false){
|
|
|
182 |
$retour_aff = fin_cadre('r');
|
|
|
183 |
|
|
|
184 |
if ($return) return $retour_aff;
|
|
|
185 |
else echo $retour_aff;
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
|
|
|
189 |
function debut_cadre_enfonce($icone='', $return = false, $fonction='', $titre = ''){
|
|
|
190 |
$retour_aff = debut_cadre('e', $icone, $fonction, $titre);
|
|
|
191 |
|
|
|
192 |
if ($return) return $retour_aff;
|
|
|
193 |
else echo $retour_aff;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
function fin_cadre_enfonce($return = false){
|
|
|
197 |
|
|
|
198 |
$retour_aff = fin_cadre('e');
|
|
|
199 |
|
|
|
200 |
if ($return) return $retour_aff;
|
|
|
201 |
else echo $retour_aff;
|
|
|
202 |
}
|
|
|
203 |
|
|
|
204 |
|
|
|
205 |
function debut_cadre_sous_rub($icone='', $return = false, $fonction='', $titre = ''){
|
|
|
206 |
$retour_aff = debut_cadre('sous_rub', $icone, $fonction, $titre);
|
|
|
207 |
if ($return) return $retour_aff;
|
|
|
208 |
else echo $retour_aff;
|
|
|
209 |
}
|
|
|
210 |
|
|
|
211 |
function fin_cadre_sous_rub($return = false){
|
|
|
212 |
$retour_aff = fin_cadre('sous_rub');
|
|
|
213 |
if ($return) return $retour_aff;
|
|
|
214 |
else echo $retour_aff;
|
|
|
215 |
}
|
|
|
216 |
|
|
|
217 |
|
|
|
218 |
|
|
|
219 |
function debut_cadre_forum($icone='', $return = false, $fonction='', $titre = ''){
|
|
|
220 |
$retour_aff = debut_cadre('forum', $icone, $fonction, $titre);
|
|
|
221 |
|
|
|
222 |
if ($return) return $retour_aff;
|
|
|
223 |
else echo $retour_aff;
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
function fin_cadre_forum($return = false){
|
|
|
227 |
$retour_aff = fin_cadre('forum');
|
|
|
228 |
|
|
|
229 |
if ($return) return $retour_aff;
|
|
|
230 |
else echo $retour_aff;
|
|
|
231 |
}
|
|
|
232 |
|
|
|
233 |
function debut_cadre_thread_forum($icone='', $return = false, $fonction='', $titre = ''){
|
|
|
234 |
$retour_aff = debut_cadre('thread-forum', $icone, $fonction, $titre);
|
|
|
235 |
|
|
|
236 |
if ($return) return $retour_aff;
|
|
|
237 |
else echo $retour_aff;
|
|
|
238 |
}
|
|
|
239 |
|
|
|
240 |
function fin_cadre_thread_forum($return = false){
|
|
|
241 |
$retour_aff = fin_cadre('thread-forum');
|
|
|
242 |
|
|
|
243 |
if ($return) return $retour_aff;
|
|
|
244 |
else echo $retour_aff;
|
|
|
245 |
}
|
|
|
246 |
|
|
|
247 |
function debut_cadre_gris_clair($icone='', $return = false, $fonction='', $titre = ''){
|
|
|
248 |
$retour_aff = debut_cadre('gris-clair', $icone, $fonction, $titre);
|
|
|
249 |
|
|
|
250 |
if ($return) return $retour_aff;
|
|
|
251 |
else echo $retour_aff;
|
|
|
252 |
}
|
|
|
253 |
|
|
|
254 |
function fin_cadre_gris_clair($return = false){
|
|
|
255 |
$retour_aff = fin_cadre('gris-clair');
|
|
|
256 |
|
|
|
257 |
if ($return) return $retour_aff;
|
|
|
258 |
else echo $retour_aff;
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
function debut_cadre_couleur($icone='', $return = false, $fonction='', $titre=''){
|
|
|
263 |
$retour_aff = debut_cadre('couleur', $icone, $fonction, $titre);
|
|
|
264 |
|
|
|
265 |
if ($return) return $retour_aff;
|
|
|
266 |
else echo $retour_aff;
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
function fin_cadre_couleur($return = false){
|
|
|
270 |
$retour_aff = fin_cadre('couleur');
|
|
|
271 |
|
|
|
272 |
if ($return) return $retour_aff;
|
|
|
273 |
else echo $retour_aff;
|
|
|
274 |
}
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
function debut_cadre_couleur_foncee($icone='', $return = false, $fonction='', $titre=''){
|
|
|
278 |
$retour_aff = debut_cadre('couleur-foncee', $icone, $fonction, $titre);
|
|
|
279 |
|
|
|
280 |
if ($return) return $retour_aff;
|
|
|
281 |
else echo $retour_aff;
|
|
|
282 |
}
|
|
|
283 |
|
|
|
284 |
function fin_cadre_couleur_foncee($return = false){
|
|
|
285 |
$retour_aff = fin_cadre('couleur-foncee');
|
|
|
286 |
|
|
|
287 |
if ($return) return $retour_aff;
|
|
|
288 |
else echo $retour_aff;
|
|
|
289 |
}
|
|
|
290 |
|
|
|
291 |
function debut_cadre_trait_couleur($icone='', $return = false, $fonction='', $titre=''){
|
|
|
292 |
$retour_aff = debut_cadre('trait-couleur', $icone, $fonction, $titre);
|
|
|
293 |
|
|
|
294 |
if ($return) return $retour_aff;
|
|
|
295 |
else echo $retour_aff;
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
function fin_cadre_trait_couleur($return = false){
|
|
|
299 |
$retour_aff = fin_cadre('trait-couleur');
|
|
|
300 |
|
|
|
301 |
if ($return) return $retour_aff;
|
|
|
302 |
else echo $retour_aff;
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
//
|
|
|
308 |
// une boite alerte
|
|
|
309 |
//
|
|
|
310 |
function debut_boite_alerte() {
|
|
|
311 |
echo "<p><table cellpadding='6' border='0'><tr><td width='100%' bgcolor='red'>";
|
|
|
312 |
echo "<table width='100%' cellpadding='12' border='0'><tr><td width='100%' bgcolor='white'>";
|
|
|
313 |
}
|
|
|
314 |
|
|
|
315 |
function fin_boite_alerte() {
|
|
|
316 |
echo "</td></tr></table>";
|
|
|
317 |
echo "</td></tr></table>";
|
|
|
318 |
}
|
|
|
319 |
|
|
|
320 |
|
|
|
321 |
//
|
|
|
322 |
// une boite info
|
|
|
323 |
//
|
|
|
324 |
function debut_boite_info() {
|
|
|
325 |
/* global $couleur_claire, $couleur_foncee;
|
|
|
326 |
echo " <p><div style='border: 1px dashed #666666;'><table cellpadding='5' cellspacing='0' border='0' width='100%' style='border-left: 1px solid $couleur_foncee; border-top: 1px solid $couleur_foncee; border-bottom: 1px solid white; border-bottom: 1px solid white' background=''>";
|
|
|
327 |
echo "<tr><td bgcolor='$couleur_claire' width='100%'>";
|
|
|
328 |
echo "<font face='Verdana,Arial,Sans,sans-serif' size='2' color='#333333'>";
|
|
|
329 |
*/
|
|
|
330 |
|
|
|
331 |
echo "<div class='cadre-info verdana1'>";
|
|
|
332 |
}
|
|
|
333 |
|
|
|
334 |
function fin_boite_info() {
|
|
|
335 |
//echo "</font></td></tr></table></div>\n\n";
|
|
|
336 |
echo "</div>";
|
|
|
337 |
}
|
|
|
338 |
|
|
|
339 |
//
|
|
|
340 |
// une autre boite
|
|
|
341 |
//
|
|
|
342 |
function bandeau_titre_boite($titre, $afficher_auteurs, $boite_importante = true) {
|
|
|
343 |
global $couleur_foncee;
|
|
|
344 |
if ($boite_importante) {
|
|
|
345 |
$couleur_fond = $couleur_foncee;
|
|
|
346 |
$couleur_texte = '#FFFFFF';
|
|
|
347 |
}
|
|
|
348 |
else {
|
|
|
349 |
$couleur_fond = '#EEEECC';
|
|
|
350 |
$couleur_texte = '#000000';
|
|
|
351 |
}
|
|
|
352 |
echo "<tr bgcolor='$couleur_fond'><td width=\"100%\"><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='$couleur_texte'>";
|
|
|
353 |
echo "<B>$titre</B></FONT></TD>";
|
|
|
354 |
if ($afficher_auteurs){
|
|
|
355 |
echo "<TD WIDTH='100'>";
|
|
|
356 |
echo http_img_pack("rien.gif", " ", "width='100' height='12' border='0'");
|
|
|
357 |
echo "</TD>";
|
|
|
358 |
}
|
|
|
359 |
echo "<TD WIDTH='90'>";
|
|
|
360 |
echo http_img_pack("rien.gif", " ", "width='90' height='12' border='0'");
|
|
|
361 |
echo "</TD>";
|
|
|
362 |
echo "</TR>";
|
|
|
363 |
}
|
|
|
364 |
//
|
|
|
365 |
// une autre boite
|
|
|
366 |
//
|
|
|
367 |
function bandeau_titre_boite2($titre, $logo="", $fond="white", $texte="black", $echo = true) {
|
|
|
368 |
global $spip_lang_left, $spip_display;
|
|
|
369 |
|
|
|
370 |
$retour = '';
|
|
|
371 |
|
|
|
372 |
if (strlen($logo) > 0 AND $spip_display != 1 AND $spip_display != 4) {
|
|
|
373 |
$retour .= "<div style='position: relative;'>";
|
|
|
374 |
$retour .= "<div style='position: absolute; top: -12px; $spip_lang_left: 3px;'>" .
|
|
|
375 |
http_img_pack("$logo", "", "") . "</div>";
|
|
|
376 |
$retour .= "<div style='background-color: $fond; color: $texte; padding: 3px; padding-$spip_lang_left: 30px; border-bottom: 1px solid #444444;' class='verdana2'><b>$titre</b></div>";
|
|
|
377 |
|
|
|
378 |
$retour .= "</div>";
|
|
|
379 |
} else {
|
|
|
380 |
$retour .= "<h3 style='background-color: $fond; color: $texte; padding: 3px; border-bottom: 1px solid #444444; margin: 0px;' class='verdana2'><b>$titre</b></h3>";
|
|
|
381 |
}
|
|
|
382 |
|
|
|
383 |
if ($echo) echo $retour;
|
|
|
384 |
return $retour;
|
|
|
385 |
}
|
|
|
386 |
|
|
|
387 |
|
|
|
388 |
//
|
|
|
389 |
// La boite raccourcis
|
|
|
390 |
//
|
|
|
391 |
|
|
|
392 |
function debut_raccourcis() {
|
|
|
393 |
global $spip_display;
|
|
|
394 |
echo "<div> </div>";
|
|
|
395 |
creer_colonne_droite();
|
|
|
396 |
|
|
|
397 |
debut_cadre_enfonce();
|
|
|
398 |
if ($spip_display != 4) {
|
|
|
399 |
echo "<font face='Verdana,Arial,Sans,sans-serif' size=1>";
|
|
|
400 |
echo "<b>"._T('titre_cadre_raccourcis')."</b><p />";
|
|
|
401 |
} else {
|
|
|
402 |
echo "<h3>"._T('titre_cadre_raccourcis')."</h3>";
|
|
|
403 |
echo "<ul>";
|
|
|
404 |
}
|
|
|
405 |
}
|
|
|
406 |
|
|
|
407 |
function fin_raccourcis() {
|
|
|
408 |
global $spip_display;
|
|
|
409 |
|
|
|
410 |
if ($spip_display != 4) echo "</font>";
|
|
|
411 |
else echo "</ul>";
|
|
|
412 |
|
|
|
413 |
fin_cadre_enfonce();
|
|
|
414 |
}
|
|
|
415 |
|
|
|
416 |
|
|
|
417 |
// Afficher un petit "+" pour lien vers autre page
|
|
|
418 |
|
|
|
419 |
function afficher_plus($lien) {
|
|
|
420 |
global $options, $spip_lang_right, $browser_name;
|
|
|
421 |
|
|
|
422 |
if ($options == "avancees" AND $spip_display != 4) {
|
|
|
423 |
if ($browser_name == "MSIE")
|
|
|
424 |
return "<a href='$lien'>" .
|
|
|
425 |
http_img_pack("plus.gif", "+", "border='0'"). "</a> ";
|
|
|
426 |
else
|
|
|
427 |
return "<div style='float:$spip_lang_right; padding-top: 2px;'><a href='$lien'>" .
|
|
|
428 |
http_img_pack("plus.gif", "+", "border='0'") ."</a></div>";
|
|
|
429 |
}
|
|
|
430 |
}
|
|
|
431 |
|
|
|
432 |
|
|
|
433 |
|
|
|
434 |
//
|
|
|
435 |
// Fonctions d'affichage
|
|
|
436 |
//
|
|
|
437 |
|
|
|
438 |
function afficher_liste($largeurs, $table, $styles = '') {
|
|
|
439 |
global $couleur_claire;
|
|
|
440 |
global $browser_name;
|
|
|
441 |
global $spip_display;
|
|
|
442 |
global $spip_lang_left;
|
|
|
443 |
|
|
|
444 |
if (!is_array($table)) return;
|
|
|
445 |
reset($table);
|
|
|
446 |
echo "\n";
|
|
|
447 |
if ($spip_display != 4) {
|
|
|
448 |
while (list(, $t) = each($table)) {
|
|
|
449 |
if (eregi("msie", $browser_name)) $msover = " onMouseOver=\"changeclass(this,'tr_liste_over');\" onMouseOut=\"changeclass(this,'tr_liste');\"";
|
|
|
450 |
echo "<tr class='tr_liste'$msover>";
|
|
|
451 |
reset($largeurs);
|
|
|
452 |
if ($styles) reset($styles);
|
|
|
453 |
while (list(, $texte) = each($t)) {
|
|
|
454 |
$style = $largeur = "";
|
|
|
455 |
list(, $largeur) = each($largeurs);
|
|
|
456 |
if ($styles) list(, $style) = each($styles);
|
|
|
457 |
if (!trim($texte)) $texte .= " ";
|
|
|
458 |
echo "<td";
|
|
|
459 |
if ($largeur) echo " width=\"$largeur\"";
|
|
|
460 |
if ($style) echo " class=\"$style\"";
|
|
|
461 |
echo ">$texte</td>";
|
|
|
462 |
}
|
|
|
463 |
echo "</tr>\n";
|
|
|
464 |
}
|
|
|
465 |
} else {
|
|
|
466 |
echo "<ul style='text-align: $spip_lang_left;'>";
|
|
|
467 |
while (list(, $t) = each($table)) {
|
|
|
468 |
echo "<li>";
|
|
|
469 |
reset($largeurs);
|
|
|
470 |
if ($styles) reset($styles);
|
|
|
471 |
while (list(, $texte) = each($t)) {
|
|
|
472 |
$style = $largeur = "";
|
|
|
473 |
list(, $largeur) = each($largeurs);
|
|
|
474 |
|
|
|
475 |
if (!$largeur) {
|
|
|
476 |
echo $texte." ";
|
|
|
477 |
}
|
|
|
478 |
}
|
|
|
479 |
echo "</li>\n";
|
|
|
480 |
}
|
|
|
481 |
echo "</ul>";
|
|
|
482 |
}
|
|
|
483 |
echo "\n";
|
|
|
484 |
}
|
|
|
485 |
|
|
|
486 |
function afficher_tranches_requete(&$query, $colspan) {
|
|
|
487 |
static $ancre = 0;
|
|
|
488 |
global $spip_lang_right, $spip_display;
|
|
|
489 |
|
|
|
490 |
$query = trim($query);
|
|
|
491 |
$query_count = eregi_replace('^(SELECT)[[:space:]].*[[:space:]](FROM)[[:space:]]', '\\1 COUNT(*) \\2 ', $query);
|
|
|
492 |
|
|
|
493 |
list($num_rows) = spip_fetch_array(spip_query($query_count));
|
|
|
494 |
if (!$num_rows) return;
|
|
|
495 |
|
|
|
496 |
$nb_aff = 10;
|
|
|
497 |
// Ne pas couper pour trop peu
|
|
|
498 |
if ($num_rows <= 1.5 * $nb_aff) $nb_aff = $num_rows;
|
|
|
499 |
if (ereg('LIMIT .*,([0-9]+)', $query, $regs)) {
|
|
|
500 |
if ($num_rows > $regs[1]) $num_rows = $regs[1];
|
|
|
501 |
}
|
|
|
502 |
|
|
|
503 |
$texte = "\n";
|
|
|
504 |
|
|
|
505 |
if ($num_rows > $nb_aff) {
|
|
|
506 |
$tmp_var = 't_'.substr(md5($query), 0, 4);
|
|
|
507 |
$deb_aff = intval($GLOBALS[$tmp_var]);
|
|
|
508 |
$ancre++;
|
|
|
509 |
|
|
|
510 |
$texte .= "<a name='a$ancre'></a>";
|
|
|
511 |
if ($spip_display != 4) $texte .= "<tr style='background-color: #dddddd;'><td class=\"arial2\" style='border-bottom: 1px solid #444444;' colspan=\"".($colspan - 1)."\">";
|
|
|
512 |
|
|
|
513 |
for ($i = 0; $i < $num_rows; $i += $nb_aff){
|
|
|
514 |
$deb = $i + 1;
|
|
|
515 |
$fin = $i + $nb_aff;
|
|
|
516 |
if ($fin > $num_rows) $fin = $num_rows;
|
|
|
517 |
if ($deb > 1) $texte .= " | ";
|
|
|
518 |
if ($deb_aff + 1 >= $deb AND $deb_aff + 1 <= $fin) {
|
|
|
519 |
$texte .= "<B>$deb</B>";
|
|
|
520 |
}
|
|
|
521 |
else {
|
|
|
522 |
$link = new Link;
|
|
|
523 |
$link->addVar($tmp_var, strval($deb - 1));
|
|
|
524 |
$texte .= "<a href=\"".$link->getUrl()."#a$ancre\">$deb</a>";
|
|
|
525 |
}
|
|
|
526 |
}
|
|
|
527 |
if ($spip_display != 4) {
|
|
|
528 |
$texte .= "</td>\n";
|
|
|
529 |
$texte .= "<td class=\"arial2\" style='border-bottom: 1px solid #444444; text-align: $spip_lang_right;' colspan=\"1\" align=\"right\" valign=\"top\">";
|
|
|
530 |
} else {
|
|
|
531 |
$texte .= " | ";
|
|
|
532 |
}
|
|
|
533 |
|
|
|
534 |
if ($deb_aff == -1) {
|
|
|
535 |
$texte .= "<B>"._T('info_tout_afficher')."</B>";
|
|
|
536 |
} else {
|
|
|
537 |
$link = new Link;
|
|
|
538 |
$link->addVar($tmp_var, -1);
|
|
|
539 |
$texte .= "<A HREF=\"".$link->getUrl()."#a$ancre\">"._T('lien_tout_afficher')."</A>";
|
|
|
540 |
}
|
|
|
541 |
|
|
|
542 |
if ($spip_display != 4) $texte .= "</td>\n";
|
|
|
543 |
if ($spip_display != 4) $texte .= "</tr>\n";
|
|
|
544 |
|
|
|
545 |
|
|
|
546 |
if ($deb_aff != -1) {
|
|
|
547 |
$query = eregi_replace('LIMIT[[:space:]].*$', '', $query);
|
|
|
548 |
$query .= " LIMIT $deb_aff, $nb_aff";
|
|
|
549 |
}
|
|
|
550 |
}
|
|
|
551 |
|
|
|
552 |
return $texte;
|
|
|
553 |
}
|
|
|
554 |
|
|
|
555 |
|
|
|
556 |
function afficher_liste_debut_tableau() {
|
|
|
557 |
global $spip_display;
|
|
|
558 |
|
|
|
559 |
if ($spip_display != 4) return "<table width='100%' cellpadding='2' cellspacing='0' border='0'>";
|
|
|
560 |
}
|
|
|
561 |
|
|
|
562 |
function afficher_liste_fin_tableau() {
|
|
|
563 |
global $spip_display;
|
|
|
564 |
if ($spip_display != 4) return "</table>";
|
|
|
565 |
}
|
|
|
566 |
|
|
|
567 |
|
|
|
568 |
function puce_statut_article($id, $statut, $id_rubrique) {
|
|
|
569 |
global $spip_lang_left, $dir_lang, $connect_statut, $options, $browser_name;
|
|
|
570 |
|
|
|
571 |
switch ($statut) {
|
|
|
572 |
case 'publie':
|
|
|
573 |
$clip = 2;
|
|
|
574 |
$puce = 'verte';
|
|
|
575 |
$title = _T('info_article_publie');
|
|
|
576 |
break;
|
|
|
577 |
case 'prepa':
|
|
|
578 |
$clip = 0;
|
|
|
579 |
$puce = 'blanche';
|
|
|
580 |
$title = _T('info_article_redaction');
|
|
|
581 |
break;
|
|
|
582 |
case 'prop':
|
|
|
583 |
$clip = 1;
|
|
|
584 |
$puce = 'orange';
|
|
|
585 |
$title = _T('info_article_propose');
|
|
|
586 |
break;
|
|
|
587 |
case 'refuse':
|
|
|
588 |
$clip = 3;
|
|
|
589 |
$puce = 'rouge';
|
|
|
590 |
$title = _T('info_article_refuse');
|
|
|
591 |
break;
|
|
|
592 |
case 'poubelle':
|
|
|
593 |
$clip = 4;
|
|
|
594 |
$puce = 'poubelle';
|
|
|
595 |
$title = _T('info_article_supprime');
|
|
|
596 |
break;
|
|
|
597 |
}
|
|
|
598 |
$puce = "puce-$puce.gif";
|
|
|
599 |
|
|
|
600 |
if ($connect_statut == '0minirezo' AND $options == 'avancees' AND acces_rubrique($id_rubrique)) {
|
|
|
601 |
// les versions de MSIE ne font pas toutes pareil sur alt/title
|
|
|
602 |
// la combinaison suivante semble ok pour tout le monde.
|
|
|
603 |
$titles = array(
|
|
|
604 |
"blanche" => _T('texte_statut_en_cours_redaction'),
|
|
|
605 |
"orange" => _T('texte_statut_propose_evaluation'),
|
|
|
606 |
"verte" => _T('texte_statut_publie'),
|
|
|
607 |
"rouge" => _T('texte_statut_refuse'),
|
|
|
608 |
"poubelle" => _T('texte_statut_poubelle'));
|
|
|
609 |
$action = "onmouseover=\"montrer('statutdecalarticle$id');\"";
|
|
|
610 |
$inser_puce = "<div class='puce_article' id='statut$id'$dir_lang>"
|
|
|
611 |
. "<div class='puce_article_fixe' $action>" .
|
|
|
612 |
http_img_pack("$puce", "", "id='imgstatutarticle$id' border='0' style='margin: 1px;'") ."</div>"
|
|
|
613 |
. "<div class='puce_article_popup' id='statutdecalarticle$id' onmouseout=\"cacher('statutdecalarticle$id');\" style=' margin-left: -".((11*$clip)+1)."px;'>"
|
|
|
614 |
. http_href_img("javascript:selec_statut($id, 'article', -1,'" . _DIR_IMG_PACK . "puce-blanche.gif', 'prepa');",
|
|
|
615 |
"puce-blanche.gif",
|
|
|
616 |
"title=\"$titles[blanche]\"",
|
|
|
617 |
"",'','',
|
|
|
618 |
$action)
|
|
|
619 |
. http_href_img("javascript:selec_statut($id, 'article', -12,'" . _DIR_IMG_PACK . "puce-orange.gif', 'prop');",
|
|
|
620 |
"puce-orange.gif",
|
|
|
621 |
"title=\"$titles[orange]\"",
|
|
|
622 |
"",'','',
|
|
|
623 |
$action)
|
|
|
624 |
. http_href_img("javascript:selec_statut($id, 'article', -23,'" . _DIR_IMG_PACK . "puce-verte.gif', 'publie');",
|
|
|
625 |
"puce-verte.gif",
|
|
|
626 |
"title=\"$titles[verte]\"",
|
|
|
627 |
"",'','',
|
|
|
628 |
$action)
|
|
|
629 |
. http_href_img("javascript:selec_statut($id, 'article', -34,'" . _DIR_IMG_PACK . "puce-rouge.gif', 'refuse');",
|
|
|
630 |
"puce-rouge.gif",
|
|
|
631 |
"title=\"$titles[rouge]\"",
|
|
|
632 |
"",'','',
|
|
|
633 |
$action)
|
|
|
634 |
. http_href_img("javascript:selec_statut($id, 'article', -45,'" . _DIR_IMG_PACK . "puce-poubelle.gif', 'poubelle');",
|
|
|
635 |
"puce-poubelle.gif",
|
|
|
636 |
"title=\"$titles[poubelle]\"",
|
|
|
637 |
"",'','',
|
|
|
638 |
$action)
|
|
|
639 |
. "</div></div>";
|
|
|
640 |
} else {
|
|
|
641 |
$inser_puce = http_img_pack("$puce", "", "id='imgstatutarticle$id' border='0' style='margin: 1px;'");
|
|
|
642 |
}
|
|
|
643 |
return $inser_puce;
|
|
|
644 |
}
|
|
|
645 |
|
|
|
646 |
function puce_statut_breve($id, $statut, $type, $id_rubrique=0) {
|
|
|
647 |
global $spip_lang_left, $dir_lang, $connect_statut, $options;
|
|
|
648 |
|
|
|
649 |
$puces = array(
|
|
|
650 |
|
|
|
651 |
1 => 'puce-verte-breve.gif',
|
|
|
652 |
2 => 'puce-rouge-breve.gif',
|
|
|
653 |
3 => 'puce-blanche-breve.gif');
|
|
|
654 |
|
|
|
655 |
switch ($statut) {
|
|
|
656 |
case 'prop':
|
|
|
657 |
$clip = 0;
|
|
|
658 |
$puce = $puces[0];
|
|
|
659 |
$title = _T('titre_breve_proposee');
|
|
|
660 |
break;
|
|
|
661 |
case 'publie':
|
|
|
662 |
$clip = 1;
|
|
|
663 |
$puce = $puces[1];
|
|
|
664 |
$title = _T('titre_breve_publiee');
|
|
|
665 |
break;
|
|
|
666 |
case 'refuse':
|
|
|
667 |
$clip = 2;
|
|
|
668 |
$puce = $puces[2];
|
|
|
669 |
$title = _T('titre_breve_refusee');
|
|
|
670 |
break;
|
|
|
671 |
default:
|
|
|
672 |
$clip = 0;
|
|
|
673 |
$puce = $puces[3];
|
|
|
674 |
$title = '';
|
|
|
675 |
}
|
|
|
676 |
|
|
|
677 |
$type1 = "statut$type$id";
|
|
|
678 |
$inser_puce = http_img_pack($puce, "", "id='img$type1' border='0' style='margin: 1px;'");
|
|
|
679 |
|
|
|
680 |
if (!($connect_statut == '0minirezo' AND $options == 'avancees' AND acces_rubrique($id_rubrique)))
|
|
|
681 |
return $inser_puce;
|
|
|
682 |
|
|
|
683 |
$type2 = "statutdecal$type$id";
|
|
|
684 |
$action = "onmouseover=\"montrer('$type2');\"\n";
|
|
|
685 |
|
|
|
686 |
// les versions de MSIE ne font pas toutes pareil sur alt/title
|
|
|
687 |
// la combinaison suivante semble ok pour tout le monde.
|
|
|
688 |
|
|
|
689 |
return "<div class='puce_breve' id='$type1'$dir_lang>"
|
|
|
690 |
. "<div class='puce_breve_fixe' $action>"
|
|
|
691 |
. $inser_puce
|
|
|
692 |
. "</div>"
|
|
|
693 |
. "<div class='puce_breve_popup' id='$type2' onmouseout=\"cacher('$type2');\" style=' margin-left: -".((9*$clip)+1)."px;'>"
|
|
|
694 |
. http_href_img("javascript:selec_statut($id, '$type', -1, '" . _DIR_IMG_PACK . $puces[0] . "', 'prop');",
|
|
|
695 |
$puces[0],
|
|
|
696 |
"title=\""._T('texte_statut_propose_evaluation')."\"",
|
|
|
697 |
'','','',
|
|
|
698 |
$action)
|
|
|
699 |
. http_href_img("javascript:selec_statut($id, '$type', -10, '" . _DIR_IMG_PACK .$puces[1] . "', 'publie');",
|
|
|
700 |
$puces[1],
|
|
|
701 |
"title=\""._T('texte_statut_publie')."\"",
|
|
|
702 |
'','','',
|
|
|
703 |
$action)
|
|
|
704 |
. http_href_img("javascript:selec_statut($id, '$type', -19, '" . _DIR_IMG_PACK .$puces[2] . "', 'refuse');",
|
|
|
705 |
$puces[2],
|
|
|
706 |
"title=\""._T('texte_statut_refuse')."\"",
|
|
|
707 |
'','','',
|
|
|
708 |
$action)
|
|
|
709 |
. "</div></div>";
|
|
|
710 |
}
|
|
|
711 |
|
|
|
712 |
|
|
|
713 |
//
|
|
|
714 |
// Afficher tableau d'articles
|
|
|
715 |
//
|
|
|
716 |
function afficher_articles($titre_table, $requete, $afficher_visites = false, $afficher_auteurs = true,
|
|
|
717 |
$toujours_afficher = false, $afficher_cadre = true, $afficher_descriptif = true) {
|
|
|
718 |
|
|
|
719 |
global $connect_id_auteur, $connect_statut, $dir_lang;
|
|
|
720 |
global $options, $spip_display;
|
|
|
721 |
global $spip_lang_left, $spip_lang_right;
|
|
|
722 |
|
|
|
723 |
|
|
|
724 |
$activer_messagerie = "oui";
|
|
|
725 |
$activer_statistiques = lire_meta("activer_statistiques");
|
|
|
726 |
$afficher_visites = ($afficher_visites AND $connect_statut == "0minirezo" AND $activer_statistiques != "non");
|
|
|
727 |
|
|
|
728 |
// Preciser la requete (alleger les requetes)
|
|
|
729 |
if (!ereg("^SELECT", $requete)) {
|
|
|
730 |
$select = "SELECT articles.id_article, articles.titre, articles.id_rubrique, articles.statut, articles.date";
|
|
|
731 |
|
|
|
732 |
if ((lire_meta('multi_rubriques') == 'oui' AND $GLOBALS['id_rubrique'] == 0) OR lire_meta('multi_articles') == 'oui') {
|
|
|
733 |
$afficher_langue = true;
|
|
|
734 |
if ($GLOBALS['langue_rubrique']) $langue_defaut = $GLOBALS['langue_rubrique'];
|
|
|
735 |
else $langue_defaut = lire_meta('langue_site');
|
|
|
736 |
$select .= ", articles.lang";
|
|
|
737 |
}
|
|
|
738 |
if ($afficher_visites)
|
|
|
739 |
$select .= ", articles.visites, articles.popularite";
|
|
|
740 |
if ($afficher_descriptif)
|
|
|
741 |
$select .= ", articles.descriptif";
|
|
|
742 |
$select .= ", petitions.id_article AS petition ";
|
|
|
743 |
$requete = $select . "FROM spip_articles AS articles " . $requete;
|
|
|
744 |
}
|
|
|
745 |
|
|
|
746 |
if ($options == "avancees") $ajout_col = 1;
|
|
|
747 |
else $ajout_col = 0;
|
|
|
748 |
|
|
|
749 |
$tranches = afficher_tranches_requete($requete, $afficher_auteurs ? 4 + $ajout_col : 3 + $ajout_col);
|
|
|
750 |
|
|
|
751 |
$requete = str_replace("FROM spip_articles AS articles ", "FROM spip_articles AS articles LEFT JOIN spip_petitions AS petitions USING (id_article)", $requete);
|
|
|
752 |
|
|
|
753 |
if (strlen($tranches) OR $toujours_afficher) {
|
|
|
754 |
$result = spip_query($requete);
|
|
|
755 |
|
|
|
756 |
// if ($afficher_cadre) debut_cadre_gris_clair("article-24.gif");
|
|
|
757 |
|
|
|
758 |
|
|
|
759 |
echo "<div style='height: 12px;'></div>";
|
|
|
760 |
echo "<div class='liste'>";
|
|
|
761 |
bandeau_titre_boite2($titre_table, "article-24.gif");
|
|
|
762 |
|
|
|
763 |
//echo "<table width='100%' cellpadding='2' cellspacing='0' border='0'>";
|
|
|
764 |
echo afficher_liste_debut_tableau();
|
|
|
765 |
|
|
|
766 |
echo $tranches;
|
|
|
767 |
|
|
|
768 |
while ($row = spip_fetch_array($result)) {
|
|
|
769 |
$vals = '';
|
|
|
770 |
|
|
|
771 |
$id_article = $row['id_article'];
|
|
|
772 |
$tous_id[] = $id_article;
|
|
|
773 |
$titre = $row['titre'];
|
|
|
774 |
$id_rubrique = $row['id_rubrique'];
|
|
|
775 |
$date = $row['date'];
|
|
|
776 |
$statut = $row['statut'];
|
|
|
777 |
$visites = $row['visites'];
|
|
|
778 |
if ($lang = $row['lang']) changer_typo($lang);
|
|
|
779 |
$popularite = ceil(min(100,100 * $row['popularite'] / max(1, 0 + lire_meta('popularite_max'))));
|
|
|
780 |
$descriptif = $row['descriptif'];
|
|
|
781 |
if ($descriptif) $descriptif = ' title="'.attribut_html(typo($descriptif)).'"';
|
|
|
782 |
$petition = $row['petition'];
|
|
|
783 |
|
|
|
784 |
if ($afficher_auteurs) {
|
|
|
785 |
$les_auteurs = "";
|
|
|
786 |
$query2 = "SELECT auteurs.id_auteur, nom, messagerie, login, bio ".
|
|
|
787 |
"FROM spip_auteurs AS auteurs, spip_auteurs_articles AS lien ".
|
|
|
788 |
"WHERE lien.id_article=$id_article AND auteurs.id_auteur=lien.id_auteur";
|
|
|
789 |
$result_auteurs = spip_query($query2);
|
|
|
790 |
|
|
|
791 |
while ($row = spip_fetch_array($result_auteurs)) {
|
|
|
792 |
$id_auteur = $row['id_auteur'];
|
|
|
793 |
$nom_auteur = typo($row['nom']);
|
|
|
794 |
$auteur_messagerie = $row['messagerie'];
|
|
|
795 |
|
|
|
796 |
if ($bio = texte_backend(supprimer_tags(couper($row['bio'],50))))
|
|
|
797 |
$bio = " title=\"$bio\"";
|
|
|
798 |
|
|
|
799 |
|
|
|
800 |
$les_auteurs .= ", <a href='auteurs_edit.php3?id_auteur=$id_auteur'$bio>$nom_auteur</a>";
|
|
|
801 |
if ($id_auteur != $connect_id_auteur AND $auteur_messagerie != "non") {
|
|
|
802 |
$les_auteurs .= " ".bouton_imessage($id_auteur, $row);
|
|
|
803 |
}
|
|
|
804 |
}
|
|
|
805 |
$les_auteurs = substr($les_auteurs, 2);
|
|
|
806 |
}
|
|
|
807 |
|
|
|
808 |
|
|
|
809 |
$les_auteurs = "$les_auteurs";
|
|
|
810 |
|
|
|
811 |
// La petite puce de changement de statut
|
|
|
812 |
$vals[] = puce_statut_article($id_article, $statut, $id_rubrique);
|
|
|
813 |
|
|
|
814 |
// Le titre (et la langue)
|
|
|
815 |
$s = "<div>";
|
|
|
816 |
|
|
|
817 |
if (acces_restreint_rubrique($id_rubrique))
|
|
|
818 |
$s .= http_img_pack("admin-12.gif", "", "width='12' height='12'", _T('titre_image_admin_article'));
|
|
|
819 |
|
|
|
820 |
$s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif$dir_lang style=\"display:block;\">";
|
|
|
821 |
|
|
|
822 |
if ($spip_display != 1 AND $spip_display != 4 AND lire_meta('image_process') != "non") {
|
|
|
823 |
include_ecrire("inc_logos.php3");
|
|
|
824 |
$logo = decrire_logo("arton$id_article");
|
|
|
825 |
if ($logo) {
|
|
|
826 |
$fichier = $logo[0];
|
|
|
827 |
$s .= "<div style='float: $spip_lang_right; margin-top: -2px; margin-bottom: -2px;'>";
|
|
|
828 |
$s .= reduire_image_logo(_DIR_IMG.$fichier, 26, 20);
|
|
|
829 |
$s .= "</div>";
|
|
|
830 |
}
|
|
|
831 |
}
|
|
|
832 |
|
|
|
833 |
$s .= typo($titre);
|
|
|
834 |
if ($afficher_langue AND $lang != $langue_defaut)
|
|
|
835 |
$s .= " <font size='1' color='#666666'$dir_lang>(".traduire_nom_langue($lang).")</font>";
|
|
|
836 |
if ($petition) $s .= " <font size=1 color='red'>"._T('lien_petitions')."</font>";
|
|
|
837 |
$s .= "</a>";
|
|
|
838 |
$s .= "</div>";
|
|
|
839 |
|
|
|
840 |
$vals[] = $s;
|
|
|
841 |
|
|
|
842 |
// Les auteurs
|
|
|
843 |
if ($afficher_auteurs) $vals[] = $les_auteurs;
|
|
|
844 |
|
|
|
845 |
// La date
|
|
|
846 |
$s = affdate_jourcourt($date);
|
|
|
847 |
$vals[] = $s;
|
|
|
848 |
|
|
|
849 |
// Le numero (moche)
|
|
|
850 |
if ($options == "avancees") {
|
|
|
851 |
$vals[] = "<b>"._T('info_numero_abbreviation')."$id_article</b>";
|
|
|
852 |
}
|
|
|
853 |
|
|
|
854 |
|
|
|
855 |
$table[] = $vals;
|
|
|
856 |
}
|
|
|
857 |
spip_free_result($result);
|
|
|
858 |
|
|
|
859 |
if ($options == "avancees") { // Afficher le numero (JMB)
|
|
|
860 |
if ($afficher_auteurs) {
|
|
|
861 |
$largeurs = array(11, '', 80, 100, 35);
|
|
|
862 |
$styles = array('', 'arial2', 'arial1', 'arial1', 'arial1');
|
|
|
863 |
} else {
|
|
|
864 |
$largeurs = array(11, '', 100, 35);
|
|
|
865 |
$styles = array('', 'arial2', 'arial1', 'arial1');
|
|
|
866 |
}
|
|
|
867 |
} else {
|
|
|
868 |
if ($afficher_auteurs) {
|
|
|
869 |
$largeurs = array(11, '', 100, 100);
|
|
|
870 |
$styles = array('', 'arial2', 'arial1', 'arial1');
|
|
|
871 |
} else {
|
|
|
872 |
$largeurs = array(11, '', 100);
|
|
|
873 |
$styles = array('', 'arial2', 'arial1');
|
|
|
874 |
}
|
|
|
875 |
}
|
|
|
876 |
afficher_liste($largeurs, $table, $styles);
|
|
|
877 |
|
|
|
878 |
//echo "</table>";
|
|
|
879 |
echo afficher_liste_fin_tableau();
|
|
|
880 |
echo "</div>";
|
|
|
881 |
//if ($afficher_cadre) fin_cadre_gris_clair();
|
|
|
882 |
|
|
|
883 |
}
|
|
|
884 |
|
|
|
885 |
return $tous_id;
|
|
|
886 |
}
|
|
|
887 |
|
|
|
888 |
|
|
|
889 |
|
|
|
890 |
//
|
|
|
891 |
// Afficher tableau de breves
|
|
|
892 |
//
|
|
|
893 |
|
|
|
894 |
function afficher_breves($titre_table, $requete, $affrub=false) {
|
|
|
895 |
global $connect_id_auteur, $spip_lang_right, $spip_lang_left, $dir_lang, $couleur_claire, $couleur_foncee;
|
|
|
896 |
global $options;
|
|
|
897 |
|
|
|
898 |
|
|
|
899 |
|
|
|
900 |
if ((lire_meta('multi_rubriques') == 'oui' AND $GLOBALS['id_rubrique'] == 0) OR lire_meta('multi_articles') == 'oui') {
|
|
|
901 |
$afficher_langue = true;
|
|
|
902 |
$requete = ereg_replace(" FROM", ", lang FROM", $requete);
|
|
|
903 |
if ($GLOBALS['langue_rubrique']) $langue_defaut = $GLOBALS['langue_rubrique'];
|
|
|
904 |
else $langue_defaut = lire_meta('langue_site');
|
|
|
905 |
}
|
|
|
906 |
|
|
|
907 |
if ($options == "avancees") $tranches = afficher_tranches_requete($requete, 4);
|
|
|
908 |
else $tranches = afficher_tranches_requete($requete, 3);
|
|
|
909 |
|
|
|
910 |
if (strlen($tranches)) {
|
|
|
911 |
|
|
|
912 |
//debut_cadre_relief("breve-24.gif");
|
|
|
913 |
|
|
|
914 |
if ($titre_table) echo "<div style='height: 12px;'></div>";
|
|
|
915 |
echo "<div class='liste'>";
|
|
|
916 |
|
|
|
917 |
if ($titre_table) {
|
|
|
918 |
bandeau_titre_boite2($titre_table, "breve-24.gif", $couleur_foncee, "white");
|
|
|
919 |
}
|
|
|
920 |
|
|
|
921 |
echo "<table width='100%' cellpadding='2' cellspacing='0' border='0' background=''>";
|
|
|
922 |
|
|
|
923 |
echo $tranches;
|
|
|
924 |
|
|
|
925 |
$result = spip_query($requete);
|
|
|
926 |
|
|
|
927 |
$table = '';
|
|
|
928 |
while ($row = spip_fetch_array($result)) {
|
|
|
929 |
$vals = '';
|
|
|
930 |
|
|
|
931 |
$id_breve = $row['id_breve'];
|
|
|
932 |
$tous_id[] = $id_breve;
|
|
|
933 |
$date_heure = $row['date_heure'];
|
|
|
934 |
$titre = $row['titre'];
|
|
|
935 |
$statut = $row['statut'];
|
|
|
936 |
if ($lang = $row['lang']) changer_typo($lang);
|
|
|
937 |
$id_rubrique = $row['id_rubrique'];
|
|
|
938 |
|
|
|
939 |
$vals[] = puce_statut_breve($id_breve, $statut, 'breve', $id_rubrique);
|
|
|
940 |
|
|
|
941 |
$s = "<div>";
|
|
|
942 |
$s .= "<a href='breves_voir.php3?id_breve=$id_breve'$dir_lang style=\"display:block;\">";
|
|
|
943 |
|
|
|
944 |
if ($spip_display != 1 AND $spip_display != 4 AND lire_meta('image_process') != "non") {
|
|
|
945 |
include_ecrire("inc_logos.php3");
|
|
|
946 |
$logo = decrire_logo("breveon$id_breve");
|
|
|
947 |
if ($logo) {
|
|
|
948 |
$fichier = $logo[0];
|
|
|
949 |
$s .= "<div style='float: $spip_lang_right; margin-top: -2px; margin-bottom: -2px;'>";
|
|
|
950 |
$s .= reduire_image_logo(_DIR_IMG.$fichier, 26, 20);
|
|
|
951 |
$s .= "</div>";
|
|
|
952 |
}
|
|
|
953 |
}
|
|
|
954 |
|
|
|
955 |
$s .= typo($titre);
|
|
|
956 |
if ($afficher_langue AND $lang != $langue_defaut)
|
|
|
957 |
$s .= " <font size='1' color='#666666'$dir_lang>(".traduire_nom_langue($lang).")</font>";
|
|
|
958 |
$s .= "</a>";
|
|
|
959 |
|
|
|
960 |
$s .= "</div>";
|
|
|
961 |
$vals[] = $s;
|
|
|
962 |
|
|
|
963 |
$s = "";
|
|
|
964 |
if ($affrub) {
|
|
|
965 |
$rub = spip_fetch_array(spip_query("SELECT id_rubrique, titre FROM spip_rubriques WHERE id_rubrique=$id_rubrique"));
|
|
|
966 |
$id_rubrique = $rub['id_rubrique'];
|
|
|
967 |
$s .= "<a href='naviguer.php3?id_rubrique=$id_rubrique' style=\"display:block;\">".typo($rub['titre'])."</a>";
|
|
|
968 |
} else if ($statut != "prop")
|
|
|
969 |
$s = affdate_jourcourt($date_heure);
|
|
|
970 |
else
|
|
|
971 |
$s .= _T('info_a_valider');
|
|
|
972 |
$vals[] = $s;
|
|
|
973 |
|
|
|
974 |
if ($options == "avancees") {
|
|
|
975 |
$vals[] = "<b>"._T('info_numero_abbreviation')."$id_breve</b>";
|
|
|
976 |
}
|
|
|
977 |
|
|
|
978 |
$table[] = $vals;
|
|
|
979 |
}
|
|
|
980 |
spip_free_result($result);
|
|
|
981 |
|
|
|
982 |
if ($options == "avancees") {
|
|
|
983 |
if ($affrub) $largeurs = array('7', '', '188', '35');
|
|
|
984 |
else $largeurs = array('7','', '100', '35');
|
|
|
985 |
$styles = array('', 'arial11', 'arial1', 'arial1');
|
|
|
986 |
} else {
|
|
|
987 |
if ($affrub) $largeurs = array('7','', '188');
|
|
|
988 |
else $largeurs = array('7','', '100');
|
|
|
989 |
$styles = array('','arial11', 'arial1');
|
|
|
990 |
}
|
|
|
991 |
|
|
|
992 |
afficher_liste($largeurs, $table, $styles);
|
|
|
993 |
|
|
|
994 |
echo "</table></div>";
|
|
|
995 |
//fin_cadre_relief();
|
|
|
996 |
}
|
|
|
997 |
return $tous_id;
|
|
|
998 |
}
|
|
|
999 |
|
|
|
1000 |
|
|
|
1001 |
//
|
|
|
1002 |
// Afficher tableau de rubriques
|
|
|
1003 |
//
|
|
|
1004 |
|
|
|
1005 |
function afficher_rubriques($titre_table, $requete) {
|
|
|
1006 |
global $connect_id_auteur;
|
|
|
1007 |
global $spip_lang_rtl;
|
|
|
1008 |
|
|
|
1009 |
$tranches = afficher_tranches_requete($requete, 2);
|
|
|
1010 |
|
|
|
1011 |
if (strlen($tranches)) {
|
|
|
1012 |
|
|
|
1013 |
if ($titre_table) echo "<div style='height: 12px;'></div>";
|
|
|
1014 |
echo "<div class='liste'>";
|
|
|
1015 |
//debut_cadre_relief("rubrique-24.gif");
|
|
|
1016 |
|
|
|
1017 |
if ($titre_table) {
|
|
|
1018 |
bandeau_titre_boite2($titre_table, "rubrique-24.gif", "#999999", "white");
|
|
|
1019 |
}
|
|
|
1020 |
echo "<table width=100% cellpadding=3 cellspacing=0 border=0 background=''>";
|
|
|
1021 |
|
|
|
1022 |
echo $tranches;
|
|
|
1023 |
|
|
|
1024 |
$result = spip_query($requete);
|
|
|
1025 |
|
|
|
1026 |
$table = '';
|
|
|
1027 |
while ($row = spip_fetch_array($result)) {
|
|
|
1028 |
$vals = '';
|
|
|
1029 |
|
|
|
1030 |
$id_rubrique = $row['id_rubrique'];
|
|
|
1031 |
$id_parent = $row['id_parent'];
|
|
|
1032 |
$tous_id[] = $id_rubrique;
|
|
|
1033 |
$titre = $row['titre'];
|
|
|
1034 |
|
|
|
1035 |
if ($id_parent == 0) $puce = "secteur-12.gif";
|
|
|
1036 |
else $puce = "rubrique-12.gif";
|
|
|
1037 |
|
|
|
1038 |
$s = "<b><a href=\"naviguer.php3?id_rubrique=$id_rubrique\">";
|
|
|
1039 |
$s .= http_img_pack($puce, '- ', "border='0'");
|
|
|
1040 |
$s .= typo($titre);
|
|
|
1041 |
$s .= "</A></b>";
|
|
|
1042 |
$vals[] = $s;
|
|
|
1043 |
|
|
|
1044 |
$s = "<div align=\"right\">";
|
|
|
1045 |
$s .= "</div>";
|
|
|
1046 |
$vals[] = $s;
|
|
|
1047 |
$table[] = $vals;
|
|
|
1048 |
}
|
|
|
1049 |
spip_free_result($result);
|
|
|
1050 |
|
|
|
1051 |
$largeurs = array('', '');
|
|
|
1052 |
$styles = array('arial2', 'arial2');
|
|
|
1053 |
afficher_liste($largeurs, $table, $styles);
|
|
|
1054 |
|
|
|
1055 |
echo "</TABLE>";
|
|
|
1056 |
//fin_cadre_relief();
|
|
|
1057 |
echo "</div>";
|
|
|
1058 |
}
|
|
|
1059 |
return $tous_id;
|
|
|
1060 |
}
|
|
|
1061 |
|
|
|
1062 |
|
|
|
1063 |
//
|
|
|
1064 |
// Afficher des auteurs sur requete SQL
|
|
|
1065 |
//
|
|
|
1066 |
function bonhomme_statut($row) {
|
|
|
1067 |
global $connect_statut;
|
|
|
1068 |
|
|
|
1069 |
switch($row['statut']) {
|
|
|
1070 |
case "0minirezo":
|
|
|
1071 |
return http_img_pack("admin-12.gif", "", "border='0'",
|
|
|
1072 |
_T('titre_image_administrateur'));
|
|
|
1073 |
break;
|
|
|
1074 |
case "1comite":
|
|
|
1075 |
if ($connect_statut == '0minirezo' AND ($row['source'] == 'spip' AND !($row['pass'] AND $row['login'])))
|
|
|
1076 |
return http_img_pack("visit-12.gif",'', "border='0'", _T('titre_image_redacteur'));
|
|
|
1077 |
else
|
|
|
1078 |
return http_img_pack("redac-12.gif",'', "border='0'", _T('titre_image_redacteur_02'));
|
|
|
1079 |
break;
|
|
|
1080 |
case "5poubelle":
|
|
|
1081 |
return http_img_pack("poubelle.gif", '', "border='0'",_T('titre_image_auteur_supprime'));
|
|
|
1082 |
break;
|
|
|
1083 |
case "6forum":
|
|
|
1084 |
return http_img_pack("visit-12.gif", '', "border='0'",_T('titre_image_visiteur'));
|
|
|
1085 |
break;
|
|
|
1086 |
case "nouveau":
|
|
|
1087 |
default:
|
|
|
1088 |
return '';
|
|
|
1089 |
break;
|
|
|
1090 |
}
|
|
|
1091 |
}
|
|
|
1092 |
|
|
|
1093 |
// La couleur du statut
|
|
|
1094 |
function puce_statut($statut, $type='article') {
|
|
|
1095 |
switch ($statut) {
|
|
|
1096 |
case 'publie':
|
|
|
1097 |
return 'verte';
|
|
|
1098 |
case 'prepa':
|
|
|
1099 |
return 'blanche';
|
|
|
1100 |
case 'prop':
|
|
|
1101 |
return 'orange';
|
|
|
1102 |
case 'refuse':
|
|
|
1103 |
return 'rouge';
|
|
|
1104 |
case 'poubelle':
|
|
|
1105 |
return 'poubelle';
|
|
|
1106 |
}
|
|
|
1107 |
}
|
|
|
1108 |
|
|
|
1109 |
|
|
|
1110 |
function afficher_auteurs ($titre_table, $requete) {
|
|
|
1111 |
$tranches = afficher_tranches_requete($requete, 2);
|
|
|
1112 |
|
|
|
1113 |
if (strlen($tranches)) {
|
|
|
1114 |
|
|
|
1115 |
debut_cadre_relief("auteur-24.gif");
|
|
|
1116 |
|
|
|
1117 |
if ($titre_table) {
|
|
|
1118 |
echo "<p><table width=100% cellpadding=0 cellspacing=0 border=0 background=''>";
|
|
|
1119 |
echo "<tr><td width=100% background=''>";
|
|
|
1120 |
echo "<table width=100% cellpadding=3 cellspacing=0 border=0>";
|
|
|
1121 |
echo "<tr bgcolor='#333333'><td width=100% colspan=2><font face='Verdana,Arial,Sans,sans-serif' size=3 color='#FFFFFF'>";
|
|
|
1122 |
echo "<b>$titre_table</b></font></td></tr>";
|
|
|
1123 |
}
|
|
|
1124 |
else {
|
|
|
1125 |
echo "<p><table width=100% cellpadding=3 cellspacing=0 border=0 background=''>";
|
|
|
1126 |
}
|
|
|
1127 |
|
|
|
1128 |
echo $tranches;
|
|
|
1129 |
|
|
|
1130 |
$result = spip_query($requete);
|
|
|
1131 |
|
|
|
1132 |
$table = '';
|
|
|
1133 |
while ($row = spip_fetch_array($result)) {
|
|
|
1134 |
$vals = '';
|
|
|
1135 |
|
|
|
1136 |
$id_auteur = $row['id_auteur'];
|
|
|
1137 |
$tous_id[] = $id_auteur;
|
|
|
1138 |
$nom = $row['nom'];
|
|
|
1139 |
|
|
|
1140 |
$s = bonhomme_statut($row);
|
|
|
1141 |
$s .= "<a href=\"auteurs_edit.php3?id_auteur=$id_auteur\">";
|
|
|
1142 |
$s .= typo($nom);
|
|
|
1143 |
$s .= "</a>";
|
|
|
1144 |
$vals[] = $s;
|
|
|
1145 |
$table[] = $vals;
|
|
|
1146 |
}
|
|
|
1147 |
spip_free_result($result);
|
|
|
1148 |
|
|
|
1149 |
$largeurs = array('');
|
|
|
1150 |
$styles = array('arial2');
|
|
|
1151 |
afficher_liste($largeurs, $table, $styles);
|
|
|
1152 |
|
|
|
1153 |
if ($titre_table) echo "</TABLE></TD></TR>";
|
|
|
1154 |
echo "</TABLE>";
|
|
|
1155 |
fin_cadre_relief();
|
|
|
1156 |
}
|
|
|
1157 |
return $tous_id;
|
|
|
1158 |
}
|
|
|
1159 |
|
|
|
1160 |
/*
|
|
|
1161 |
* Afficher liste de messages
|
|
|
1162 |
*/
|
|
|
1163 |
|
|
|
1164 |
function afficher_messages($titre_table, $query_message, $afficher_auteurs = true, $important = false, $boite_importante = true, $obligatoire = false) {
|
|
|
1165 |
global $messages_vus;
|
|
|
1166 |
global $connect_id_auteur;
|
|
|
1167 |
global $couleur_claire, $couleur_foncee;
|
|
|
1168 |
global $spip_lang_rtl, $spip_lang_left;
|
|
|
1169 |
|
|
|
1170 |
// Interdire l'affichage de message en double
|
|
|
1171 |
if ($messages_vus) {
|
|
|
1172 |
$query_message .= ' AND messages.id_message NOT IN ('.join(',', $messages_vus).')';
|
|
|
1173 |
}
|
|
|
1174 |
|
|
|
1175 |
|
|
|
1176 |
if ($afficher_auteurs) $cols = 4;
|
|
|
1177 |
else $cols = 2;
|
|
|
1178 |
$query_message .= ' ORDER BY date_heure DESC';
|
|
|
1179 |
$tranches = afficher_tranches_requete($query_message, $cols);
|
|
|
1180 |
|
|
|
1181 |
if ($tranches OR $obligatoire) {
|
|
|
1182 |
if ($important) debut_cadre_couleur();
|
|
|
1183 |
|
|
|
1184 |
echo "<div style='height: 12px;'></div>";
|
|
|
1185 |
echo "<div class='liste'>";
|
|
|
1186 |
// bandeau_titre_boite($titre_table, $afficher_auteurs, $boite_importante);
|
|
|
1187 |
bandeau_titre_boite2($titre_table, "messagerie-24.gif", $couleur_foncee, "white");
|
|
|
1188 |
echo "<TABLE WIDTH='100%' CELLPADDING='2' CELLSPACING='0' BORDER='0'>";
|
|
|
1189 |
|
|
|
1190 |
|
|
|
1191 |
echo $tranches;
|
|
|
1192 |
|
|
|
1193 |
$result_message = spip_query($query_message);
|
|
|
1194 |
$num_rows = spip_num_rows($result_message);
|
|
|
1195 |
|
|
|
1196 |
while($row = spip_fetch_array($result_message)) {
|
|
|
1197 |
$vals = '';
|
|
|
1198 |
|
|
|
1199 |
$id_message = $row['id_message'];
|
|
|
1200 |
$date = $row["date_heure"];
|
|
|
1201 |
$date_fin = $row["date_fin"];
|
|
|
1202 |
$titre = $row["titre"];
|
|
|
1203 |
$type = $row["type"];
|
|
|
1204 |
$statut = $row["statut"];
|
|
|
1205 |
$page = $row["page"];
|
|
|
1206 |
$rv = $row["rv"];
|
|
|
1207 |
$vu = $row["vu"];
|
|
|
1208 |
$messages_vus[$id_message] = $id_message;
|
|
|
1209 |
|
|
|
1210 |
//
|
|
|
1211 |
// Titre
|
|
|
1212 |
//
|
|
|
1213 |
|
|
|
1214 |
$s = "<A HREF='message.php3?id_message=$id_message' style='display: block;'>";
|
|
|
1215 |
|
|
|
1216 |
switch ($type) {
|
|
|
1217 |
case 'pb' :
|
|
|
1218 |
$puce = "m_envoi_bleu$spip_lang_rtl.gif";
|
|
|
1219 |
break;
|
|
|
1220 |
case 'memo' :
|
|
|
1221 |
$puce = "m_envoi_jaune$spip_lang_rtl.gif";
|
|
|
1222 |
break;
|
|
|
1223 |
case 'affich' :
|
|
|
1224 |
$puce = "m_envoi_jaune$spip_lang_rtl.gif";
|
|
|
1225 |
break;
|
|
|
1226 |
case 'normal':
|
|
|
1227 |
default:
|
|
|
1228 |
$puce = "m_envoi$spip_lang_rtl.gif";
|
|
|
1229 |
break;
|
|
|
1230 |
}
|
|
|
1231 |
|
|
|
1232 |
$s .= http_img_pack("$puce", "", "width='14' height='7' border='0'");
|
|
|
1233 |
$s .= " ".typo($titre)."</A>";
|
|
|
1234 |
$vals[] = $s;
|
|
|
1235 |
|
|
|
1236 |
//
|
|
|
1237 |
// Auteurs
|
|
|
1238 |
|
|
|
1239 |
if ($afficher_auteurs) {
|
|
|
1240 |
$query_auteurs = "SELECT auteurs.id_auteur, auteurs.nom FROM spip_auteurs AS auteurs, spip_auteurs_messages AS lien WHERE lien.id_message=$id_message AND lien.id_auteur!=$connect_id_auteur AND lien.id_auteur=auteurs.id_auteur";
|
|
|
1241 |
$result_auteurs = spip_query($query_auteurs);
|
|
|
1242 |
$auteurs = '';
|
|
|
1243 |
while ($row_auteurs = spip_fetch_array($result_auteurs)) {
|
|
|
1244 |
$id_auteur = $row_auteurs['id_auteur'];
|
|
|
1245 |
$auteurs[] = "<a href='auteurs_edit.php3?id_auteur=$id_auteur'>".typo($row_auteurs['nom'])."</a>";
|
|
|
1246 |
}
|
|
|
1247 |
|
|
|
1248 |
if ($auteurs AND $type == 'normal') {
|
|
|
1249 |
$s = "<FONT FACE='Arial,Sans,sans-serif' SIZE=1>";
|
|
|
1250 |
$s .= join(', ', $auteurs);
|
|
|
1251 |
$s .= "</FONT>";
|
|
|
1252 |
}
|
|
|
1253 |
else $s = " ";
|
|
|
1254 |
$vals[] = $s;
|
|
|
1255 |
}
|
|
|
1256 |
|
|
|
1257 |
//
|
|
|
1258 |
// Messages de forums
|
|
|
1259 |
|
|
|
1260 |
$query_forum = "SELECT * FROM spip_forum WHERE id_message = $id_message";
|
|
|
1261 |
$total_forum = spip_num_rows(spip_query($query_forum));
|
|
|
1262 |
|
|
|
1263 |
if ($total_forum > 0) $vals[] = "($total_forum)";
|
|
|
1264 |
else $vals[] = "";
|
|
|
1265 |
|
|
|
1266 |
|
|
|
1267 |
|
|
|
1268 |
//
|
|
|
1269 |
// Date
|
|
|
1270 |
//
|
|
|
1271 |
|
|
|
1272 |
$s = affdate($date);
|
|
|
1273 |
if ($rv == 'oui') {
|
|
|
1274 |
$jour=journum($date);
|
|
|
1275 |
$mois=mois($date);
|
|
|
1276 |
$annee=annee($date);
|
|
|
1277 |
|
|
|
1278 |
$heure = heures($date).":".minutes($date);
|
|
|
1279 |
if (affdate($date) == affdate($date_fin))
|
|
|
1280 |
$heure_fin = heures($date_fin).":".minutes($date_fin);
|
|
|
1281 |
else
|
|
|
1282 |
$heure_fin = "...";
|
|
|
1283 |
|
|
|
1284 |
$s = "<div " .
|
|
|
1285 |
http_style_background('rv-12.gif', "$spip_lang_left center no-repeat; padding-$spip_lang_left: 15px") .
|
|
|
1286 |
"><a href='calendrier.php3?type=jour&jour=$jour&mois=$mois&annee=$annee'><b style='color: black;'>$s</b><br />$heure-$heure_fin</a></div>";
|
|
|
1287 |
} else {
|
|
|
1288 |
$s = "<font color='#999999'>$s</font>";
|
|
|
1289 |
}
|
|
|
1290 |
|
|
|
1291 |
$vals[] = $s;
|
|
|
1292 |
|
|
|
1293 |
$table[] = $vals;
|
|
|
1294 |
}
|
|
|
1295 |
|
|
|
1296 |
if ($afficher_auteurs) {
|
|
|
1297 |
$largeurs = array('', 130, 20, 120);
|
|
|
1298 |
$styles = array('arial2', 'arial1', 'arial1', 'arial1');
|
|
|
1299 |
}
|
|
|
1300 |
else {
|
|
|
1301 |
$largeurs = array('', 20, 120);
|
|
|
1302 |
$styles = array('arial2', 'arial1', 'arial1');
|
|
|
1303 |
}
|
|
|
1304 |
afficher_liste($largeurs, $table, $styles);
|
|
|
1305 |
|
|
|
1306 |
echo "</TABLE>";
|
|
|
1307 |
echo "</div>\n\n";
|
|
|
1308 |
spip_free_result($result_message);
|
|
|
1309 |
if ($important) fin_cadre_couleur();
|
|
|
1310 |
}
|
|
|
1311 |
}
|
|
|
1312 |
|
|
|
1313 |
|
|
|
1314 |
//
|
|
|
1315 |
// Afficher les forums
|
|
|
1316 |
//
|
|
|
1317 |
|
|
|
1318 |
function afficher_forum($request, $adresse_retour, $controle_id_article = 0) {
|
|
|
1319 |
global $debut;
|
|
|
1320 |
static $compteur_forum;
|
|
|
1321 |
static $nb_forum;
|
|
|
1322 |
static $i;
|
|
|
1323 |
global $couleur_foncee;
|
|
|
1324 |
global $connect_id_auteur, $connect_activer_messagerie;
|
|
|
1325 |
global $mots_cles_forums;
|
|
|
1326 |
global $spip_lang_rtl, $spip_lang_left, $spip_lang_right, $spip_display;
|
|
|
1327 |
|
|
|
1328 |
$activer_messagerie = "oui";
|
|
|
1329 |
|
|
|
1330 |
$compteur_forum++;
|
|
|
1331 |
|
|
|
1332 |
$nb_forum[$compteur_forum] = spip_num_rows($request);
|
|
|
1333 |
$i[$compteur_forum] = 1;
|
|
|
1334 |
|
|
|
1335 |
if ($spip_display == 4) echo "<ul>";
|
|
|
1336 |
|
|
|
1337 |
while($row = spip_fetch_array($request)) {
|
|
|
1338 |
$id_forum=$row['id_forum'];
|
|
|
1339 |
$id_parent=$row['id_parent'];
|
|
|
1340 |
$id_rubrique=$row['id_rubrique'];
|
|
|
1341 |
$id_article=$row['id_article'];
|
|
|
1342 |
$id_breve=$row['id_breve'];
|
|
|
1343 |
$id_message=$row['id_message'];
|
|
|
1344 |
$id_syndic=$row['id_syndic'];
|
|
|
1345 |
$date_heure=$row['date_heure'];
|
|
|
1346 |
$titre=$row['titre'];
|
|
|
1347 |
$texte=$row['texte'];
|
|
|
1348 |
$auteur=$row['auteur'];
|
|
|
1349 |
$email_auteur=$row['email_auteur'];
|
|
|
1350 |
$nom_site=$row['nom_site'];
|
|
|
1351 |
$url_site=$row['url_site'];
|
|
|
1352 |
$statut=$row['statut'];
|
|
|
1353 |
$ip=$row["ip"];
|
|
|
1354 |
$id_auteur=$row["id_auteur"];
|
|
|
1355 |
|
|
|
1356 |
$forum_stat = $statut;
|
|
|
1357 |
if ($forum_stat == "prive") $logo = "forum-interne-24.gif";
|
|
|
1358 |
else if ($forum_stat == "privadm") $logo = "forum-admin-24.gif";
|
|
|
1359 |
else if ($forum_stat == "privrac") $logo = "forum-interne-24.gif";
|
|
|
1360 |
else $logo = "forum-public-24.gif";
|
|
|
1361 |
|
|
|
1362 |
if ($compteur_forum==1) echo "\n<br /><br />";
|
|
|
1363 |
$afficher = ($controle_id_article) ? ($statut!="perso") :
|
|
|
1364 |
(($statut=="prive" OR $statut=="privrac" OR $statut=="privadm" OR $statut=="perso")
|
|
|
1365 |
OR ($statut=="publie" AND $id_parent > 0));
|
|
|
1366 |
|
|
|
1367 |
if ($afficher) {
|
|
|
1368 |
echo "<a id='$id_forum'></a>";
|
|
|
1369 |
if ($spip_display != 4) echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
|
|
|
1370 |
for ($count=2;$count<=$compteur_forum AND $count<20;$count++){
|
|
|
1371 |
$fond[$count]=_DIR_IMG_PACK . 'rien.gif';
|
|
|
1372 |
if ($i[$count]!=$nb_forum[$count]){
|
|
|
1373 |
$fond[$count]=_DIR_IMG_PACK . 'forum-vert.gif';
|
|
|
1374 |
}
|
|
|
1375 |
$fleche='rien.gif';
|
|
|
1376 |
if ($count==$compteur_forum){
|
|
|
1377 |
$fleche="forum-droite$spip_lang_rtl.gif";
|
|
|
1378 |
}
|
|
|
1379 |
if ($spip_display != 4) echo "<td width='10' valign='top' background=$fond[$count]>" .
|
|
|
1380 |
http_img_pack($fleche, " ", "width='10' height='13' border='0'"). "</td>\n";
|
|
|
1381 |
}
|
|
|
1382 |
|
|
|
1383 |
if ($spip_display != 4) echo "\n<td width=100% valign='top'>";
|
|
|
1384 |
|
|
|
1385 |
$titre_boite = $titre;
|
|
|
1386 |
if ($id_auteur AND $spip_display != 1 AND $spip_display!=4 AND lire_meta('image_process') != "non") {
|
|
|
1387 |
include_ecrire("inc_logos.php3");
|
|
|
1388 |
$logo_auteur = decrire_logo("auton$id_auteur");
|
|
|
1389 |
if ($logo_auteur) {
|
|
|
1390 |
$fichier = $logo_auteur[0];
|
|
|
1391 |
|
|
|
1392 |
$s = "<div style='position: absolute; $spip_lang_right: 0px; margin: 0px; margin-top: -3px; margin-$spip_lang_right: 0px;'>";
|
|
|
1393 |
$s .= reduire_image_logo(_DIR_IMG.$fichier, 48, 48);
|
|
|
1394 |
$s .= "</div>";
|
|
|
1395 |
$titre_boite = $s.typo($titre_boite);
|
|
|
1396 |
}
|
|
|
1397 |
}
|
|
|
1398 |
|
|
|
1399 |
if ($spip_display == 4) {
|
|
|
1400 |
echo "<li>".typo($titre)."<br>";
|
|
|
1401 |
} else {
|
|
|
1402 |
if ($compteur_forum == 1) echo debut_cadre_forum($logo, false, "", $titre_boite);
|
|
|
1403 |
else echo debut_cadre_thread_forum("", false, "", $titre_boite);
|
|
|
1404 |
}
|
|
|
1405 |
|
|
|
1406 |
// Si refuse, cadre rouge
|
|
|
1407 |
if ($statut=="off") {
|
|
|
1408 |
echo "<div style='border: 2px dashed red; padding: 5px;'>";
|
|
|
1409 |
}
|
|
|
1410 |
// Si propose, cadre jaune
|
|
|
1411 |
else if ($statut=="prop") {
|
|
|
1412 |
echo "<div style='border: 1px solid yellow; padding: 5px;'>";
|
|
|
1413 |
}
|
|
|
1414 |
|
|
|
1415 |
|
|
|
1416 |
|
|
|
1417 |
echo "<span class='arial2'>";
|
|
|
1418 |
// echo affdate_court($date_heure);
|
|
|
1419 |
// echo ", ";
|
|
|
1420 |
// echo heures($date_heure).":".minutes($date_heure);
|
|
|
1421 |
|
|
|
1422 |
echo date_relative($date_heure);
|
|
|
1423 |
|
|
|
1424 |
echo "</span>";
|
|
|
1425 |
|
|
|
1426 |
echo " <a href='auteurs_edit.php3?id_auteur=$id_auteur'>".typo($auteur)."</a>";
|
|
|
1427 |
|
|
|
1428 |
if ($id_auteur AND $connect_activer_messagerie != "non") {
|
|
|
1429 |
$bouton = bouton_imessage($id_auteur,$row_auteur);
|
|
|
1430 |
if ($bouton) echo " ".$bouton;
|
|
|
1431 |
}
|
|
|
1432 |
|
|
|
1433 |
// boutons de moderation
|
|
|
1434 |
if ($controle_id_article)
|
|
|
1435 |
echo boutons_controle_forum($id_forum, $statut, $id_auteur, "id_article=$controle_id_article", $ip);
|
|
|
1436 |
|
|
|
1437 |
echo justifier(propre($texte));
|
|
|
1438 |
|
|
|
1439 |
if (strlen($url_site) > 10 AND $nom_site) {
|
|
|
1440 |
echo "<div align='left' class='verdana2'><b><a href='$url_site'>$nom_site</a></b></div>";
|
|
|
1441 |
}
|
|
|
1442 |
|
|
|
1443 |
if (!$controle_id_article) {
|
|
|
1444 |
echo "<div align='right' class='verdana1'>";
|
|
|
1445 |
$url = "forum_envoi.php3?id_parent=$id_forum&adresse_retour=".rawurlencode($adresse_retour)
|
|
|
1446 |
."&titre_message=".rawurlencode($titre);
|
|
|
1447 |
echo "<b><a href=\"$url\">"._T('lien_repondre_message')."</a></b></div>";
|
|
|
1448 |
}
|
|
|
1449 |
|
|
|
1450 |
if ($mots_cles_forums == "oui"){
|
|
|
1451 |
|
|
|
1452 |
$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";
|
|
|
1453 |
$result_mots = spip_query($query_mots);
|
|
|
1454 |
|
|
|
1455 |
while ($row_mots = spip_fetch_array($result_mots)) {
|
|
|
1456 |
$id_mot = $row_mots['id_mot'];
|
|
|
1457 |
$titre_mot = propre($row_mots['titre']);
|
|
|
1458 |
$type_mot = propre($row_mots['type']);
|
|
|
1459 |
echo "<li> <b>$type_mot :</b> $titre_mot";
|
|
|
1460 |
}
|
|
|
1461 |
|
|
|
1462 |
}
|
|
|
1463 |
|
|
|
1464 |
if ($statut == "off" OR $statut == "prop") echo "</div>";
|
|
|
1465 |
|
|
|
1466 |
if ($spip_display != 4) {
|
|
|
1467 |
if ($compteur_forum == 1) echo fin_cadre_forum();
|
|
|
1468 |
else echo fin_cadre_thread_forum();
|
|
|
1469 |
}
|
|
|
1470 |
|
|
|
1471 |
if ($spip_display != 4) echo "</td></tr></table>\n";
|
|
|
1472 |
|
|
|
1473 |
afficher_thread_forum($id_forum,$adresse_retour,$controle_id_article);
|
|
|
1474 |
|
|
|
1475 |
}
|
|
|
1476 |
$i[$compteur_forum]++;
|
|
|
1477 |
}
|
|
|
1478 |
if ($spip_display == 4) echo "</ul>";
|
|
|
1479 |
spip_free_result($request);
|
|
|
1480 |
$compteur_forum--;
|
|
|
1481 |
}
|
|
|
1482 |
|
|
|
1483 |
function afficher_thread_forum($le_forum, $adresse_retour, $controle = 0) {
|
|
|
1484 |
|
|
|
1485 |
if ($controle) {
|
|
|
1486 |
$query_forum2 = "SELECT * FROM spip_forum WHERE id_parent='$le_forum' ORDER BY date_heure";
|
|
|
1487 |
}
|
|
|
1488 |
else {
|
|
|
1489 |
$query_forum2 = "SELECT * FROM spip_forum WHERE id_parent='$le_forum' AND statut<>'off' ORDER BY date_heure";
|
|
|
1490 |
}
|
|
|
1491 |
$result_forum2 = spip_query($query_forum2);
|
|
|
1492 |
afficher_forum($result_forum2, $adresse_retour, $controle);
|
|
|
1493 |
|
|
|
1494 |
}
|
|
|
1495 |
|
|
|
1496 |
|
|
|
1497 |
//
|
|
|
1498 |
// un bouton (en POST) a partir d'un URL en format GET
|
|
|
1499 |
//
|
|
|
1500 |
function bouton($titre,$lien) {
|
|
|
1501 |
$lapage=substr($lien,0,strpos($lien,"?"));
|
|
|
1502 |
$lesvars=substr($lien,strpos($lien,"?")+1,strlen($lien));
|
|
|
1503 |
|
|
|
1504 |
echo "\n<form action='$lapage' method='get'>\n";
|
|
|
1505 |
$lesvars=explode("&",$lesvars);
|
|
|
1506 |
|
|
|
1507 |
for($i=0;$i<count($lesvars);$i++){
|
|
|
1508 |
$var_loc=explode("=",$lesvars[$i]);
|
|
|
1509 |
echo "<input type='Hidden' name='$var_loc[0]' value=\"$var_loc[1]\">\n";
|
|
|
1510 |
}
|
|
|
1511 |
echo "<input type='submit' name='Submit' class='fondo' value=\"$titre\">\n";
|
|
|
1512 |
echo "</form>";
|
|
|
1513 |
}
|
|
|
1514 |
|
|
|
1515 |
//
|
|
|
1516 |
// Presentation de l'interface privee, debut du HTML
|
|
|
1517 |
//
|
|
|
1518 |
|
|
|
1519 |
function debut_html($titre = "", $rubrique="", $onLoad="") {
|
|
|
1520 |
global $couleur_foncee, $couleur_claire, $couleur_lien, $couleur_lien_off;
|
|
|
1521 |
global $mode, $spip_lang_rtl, $spip_display;
|
|
|
1522 |
global $connect_statut, $connect_toutes_rubriques;
|
|
|
1523 |
global $browser_name, $browser_rev;
|
|
|
1524 |
|
|
|
1525 |
// hack pour compatibilite spip-lab
|
|
|
1526 |
if (strpos($rubrique, 'script>')) {
|
|
|
1527 |
$code = $rubrique;
|
|
|
1528 |
$rubrique = '';
|
|
|
1529 |
}
|
|
|
1530 |
|
|
|
1531 |
$nom_site_spip = entites_html(textebrut(typo(lire_meta("nom_site"))));
|
|
|
1532 |
$titre = textebrut(typo($titre));
|
|
|
1533 |
|
|
|
1534 |
if (!$nom_site_spip) $nom_site_spip="SPIP";
|
|
|
1535 |
$adresse_site=lire_meta("adresse_site");
|
|
|
1536 |
|
|
|
1537 |
@Header("Expires: 0");
|
|
|
1538 |
@Header("Cache-Control: no-cache,no-store");
|
|
|
1539 |
@Header("Pragma: no-cache");
|
|
|
1540 |
echo debut_entete("[$nom_site_spip] $titre");
|
|
|
1541 |
if ($spip_display != 4) {
|
|
|
1542 |
echo "<link rel='alternate' type='application/rss+xml' title='".addslashes($nom_site_spip)."' href='$adresse_site/backend.php3' />";
|
|
|
1543 |
$activer_breves=lire_meta("activer_breves");
|
|
|
1544 |
if ($activer_breves != "non")
|
|
|
1545 |
echo "<link rel='alternate' type='application/rss+xml' title='".addslashes($nom_site_spip)." ("._T("info_breves_03").")' href='$adresse_site/backend-breves.php3' />";
|
|
|
1546 |
}
|
|
|
1547 |
|
|
|
1548 |
echo "\n",'<link rel="stylesheet" type="text/css" href="', _DIR_RESTREINT;
|
|
|
1549 |
$link = new Link('spip_style.php3');
|
|
|
1550 |
$link->addVar('couleur_claire', $couleur_claire);
|
|
|
1551 |
$link->addVar('couleur_foncee', $couleur_foncee);
|
|
|
1552 |
$link->addVar('left', $GLOBALS['spip_lang_left']);
|
|
|
1553 |
echo $link->getUrl()."\">\n";
|
|
|
1554 |
|
|
|
1555 |
if ($code) echo $code."\n";
|
|
|
1556 |
|
|
|
1557 |
// Supprime pour l'instant: pas de creation mathml
|
|
|
1558 |
// < script type="text/javascript" src="../mathmlinHTML.js"></script>
|
|
|
1559 |
// Supprime pour l'instant: pas de detection des plugin
|
|
|
1560 |
// < script type="text/javascript" src="js_detectplugins.js"></script>
|
|
|
1561 |
|
|
|
1562 |
debut_javascript($connect_statut == "0minirezo" AND $connect_toutes_rubriques, (lire_meta("activer_statistiques") != 'non'));
|
|
|
1563 |
|
|
|
1564 |
// CSS calendrier
|
|
|
1565 |
echo '<link rel="stylesheet" href="', _DIR_RESTREINT, 'calendrier.css" type="text/css">', "\n";
|
|
|
1566 |
|
|
|
1567 |
// CSS imprimante (masque des trucs, a completer)
|
|
|
1568 |
echo '<link rel="stylesheet" href="', _DIR_RESTREINT, 'spip_style_print.css" type="text/css" media="print">', "\n";
|
|
|
1569 |
|
|
|
1570 |
// CSS "visible au chargement", hack necessaire pour garder un depliement
|
|
|
1571 |
// sympathique meme sans javascript (on exagere ?)
|
|
|
1572 |
// Pour l'explication voir http://www.alistapart.com/articles/alternate/
|
|
|
1573 |
echo '<link rel="alternate stylesheet" href="', _DIR_RESTREINT, 'spip_style_invisible.css" type="text/css" title="invisible" />', "\n",
|
|
|
1574 |
'<link rel="stylesheet" href="', _DIR_RESTREINT, 'spip_style_visible.css" type="text/css" title="visible" />', "\n";
|
|
|
1575 |
$onLoadInvisible = " onLoad=\"setActiveStyleSheet('invisible'); ";
|
|
|
1576 |
|
|
|
1577 |
// favicon.ico
|
|
|
1578 |
echo '<link rel="shortcut icon" href="', _DIR_IMG_PACK, 'favicon.ico" />';
|
|
|
1579 |
|
|
|
1580 |
// Fin des entetes
|
|
|
1581 |
echo "\n</head>\n<body text='#000000' bgcolor='#f8f7f3' link='$couleur_lien' vlink='$couleur_lien_off' alink='$couleur_lien_off' topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' frameborder='0'";
|
|
|
1582 |
|
|
|
1583 |
if ($spip_lang_rtl)
|
|
|
1584 |
echo " dir='rtl'";
|
|
|
1585 |
//if ($mode == "wysiwyg") echo " onLoad='debut_editor();'";
|
|
|
1586 |
echo $onLoadInvisible;
|
|
|
1587 |
|
|
|
1588 |
// Hack pour forcer largeur des formo/forml sous Mozilla >= 1.7
|
|
|
1589 |
// meme principe que le behavior win_width.htc pour MSIE
|
|
|
1590 |
if (eregi("mozilla", $browser_name) AND $browser_rev >= 1.7)
|
|
|
1591 |
echo "verifForm();";
|
|
|
1592 |
echo "$onLoad\">";
|
|
|
1593 |
}
|
|
|
1594 |
|
|
|
1595 |
function debut_javascript($admin, $stat)
|
|
|
1596 |
{
|
|
|
1597 |
global $spip_lang_left;
|
|
|
1598 |
global $browser_name, $browser_version;
|
|
|
1599 |
|
|
|
1600 |
// envoi le fichier JS de config si browser ok.
|
|
|
1601 |
echo $GLOBALS['browser_layer'];
|
|
|
1602 |
?>
|
|
|
1603 |
<script type='text/javascript'><!--
|
|
|
1604 |
var admin = <?php echo ($admin ? 1 : 0) ?>;
|
|
|
1605 |
var stat = <?php echo ($stat ? 1 : 0) ?>;
|
|
|
1606 |
var largeur_icone = <?php echo largeur_icone_bandeau_principal(_T('icone_a_suivre')); ?>;
|
|
|
1607 |
var bug_offsetwidth = <?php
|
|
|
1608 |
// uniquement affichage ltr: bug Mozilla dans offsetWidth quand ecran inverse!
|
|
|
1609 |
echo ((($spip_lang_left == "left") &&
|
|
|
1610 |
(($browser_name != "MSIE") ||
|
|
|
1611 |
($browser_version >= 6))) ? 1 : 0) ?> ;
|
|
|
1612 |
|
|
|
1613 |
var confirm_changer_statut = '<?php include_ecrire("inc_charsets.php3"); echo unicode_to_javascript(addslashes(html2unicode(_T("confirm_changer_statut")))); ?>';
|
|
|
1614 |
//--></script>
|
|
|
1615 |
<?php
|
|
|
1616 |
echo http_script('',_DIR_RESTREINT . 'presentation.js');
|
|
|
1617 |
}
|
|
|
1618 |
|
|
|
1619 |
// Fonctions onglets
|
|
|
1620 |
|
|
|
1621 |
function onglet_relief_inter(){
|
|
|
1622 |
global $spip_display;
|
|
|
1623 |
|
|
|
1624 |
echo "<td> </td>";
|
|
|
1625 |
|
|
|
1626 |
}
|
|
|
1627 |
|
|
|
1628 |
function debut_onglet(){
|
|
|
1629 |
global $spip_display;
|
|
|
1630 |
|
|
|
1631 |
echo "\n\n";
|
|
|
1632 |
echo "<div style='padding: 7px;'><table cellpadding='0' cellspacing='0' border='0' align='center'>";
|
|
|
1633 |
echo "<tr>";
|
|
|
1634 |
}
|
|
|
1635 |
|
|
|
1636 |
function fin_onglet(){
|
|
|
1637 |
global $spip_display;
|
|
|
1638 |
echo "</tr>";
|
|
|
1639 |
echo "</table></div>\n\n";
|
|
|
1640 |
}
|
|
|
1641 |
|
|
|
1642 |
function onglet($texte, $lien, $onglet_ref, $onglet, $icone=""){
|
|
|
1643 |
global $spip_display, $spip_lang_left ;
|
|
|
1644 |
|
|
|
1645 |
|
|
|
1646 |
echo "<td>";
|
|
|
1647 |
|
|
|
1648 |
if ($onglet != $onglet_ref) {
|
|
|
1649 |
echo "<div style='position: relative;'>";
|
|
|
1650 |
if ($spip_display != 1) {
|
|
|
1651 |
if (strlen($icone) > 0) {
|
|
|
1652 |
echo "<div style='z-index: 2; position: absolute; top: 0px; $spip_lang_left: 5px;'>" .
|
|
|
1653 |
http_img_pack("$icone", "", "") . "</div>";
|
|
|
1654 |
$style = " top: 7px; padding-$spip_lang_left: 32px; z-index: 1;";
|
|
|
1655 |
} else {
|
|
|
1656 |
$style = " top: 7px;";
|
|
|
1657 |
}
|
|
|
1658 |
}
|
|
|
1659 |
|
|
|
1660 |
echo "<div onMouseOver=\"changeclass(this, 'onglet_on');\" onMouseOut=\"changeclass(this, 'onglet');\" class='onglet' style='position: relative;$style'><a href='$lien'>$texte</a></div>";
|
|
|
1661 |
|
|
|
1662 |
|
|
|
1663 |
echo "</div>";
|
|
|
1664 |
} else {
|
|
|
1665 |
echo "<div style='position: relative;'>";
|
|
|
1666 |
if ($spip_display != 1) {
|
|
|
1667 |
if (strlen($icone) > 0) {
|
|
|
1668 |
echo "<div style='z-index: 2; position: absolute; top: 0px; $spip_lang_left: 5px;'>" .
|
|
|
1669 |
http_img_pack("$icone", "", "") . "</div>";
|
|
|
1670 |
$style = " top: 7px; padding-$spip_lang_left: 32px; z-index: 1;";
|
|
|
1671 |
} else {
|
|
|
1672 |
$style = " top: 7px;";
|
|
|
1673 |
}
|
|
|
1674 |
}
|
|
|
1675 |
|
|
|
1676 |
echo "<div class='onglet_off' style='position: relative;$style'>$texte</div>";
|
|
|
1677 |
|
|
|
1678 |
|
|
|
1679 |
echo "</div>";
|
|
|
1680 |
}
|
|
|
1681 |
echo "</td>";
|
|
|
1682 |
}
|
|
|
1683 |
|
|
|
1684 |
|
|
|
1685 |
function barre_onglets($rubrique, $onglet){
|
|
|
1686 |
global $id_auteur, $connect_id_auteur, $connect_statut, $statut_auteur, $options;
|
|
|
1687 |
|
|
|
1688 |
debut_onglet();
|
|
|
1689 |
|
|
|
1690 |
if ($rubrique == "statistiques") {
|
|
|
1691 |
// onglet(_T('onglet_evolution_visite_mod'), "statistiques_visites.php3", "evolution", $onglet, "statistiques-24.gif");
|
|
|
1692 |
// onglet(_T('titre_liens_entrants'), "statistiques_referers.php3", "referers", $onglet, "referers-24.gif");
|
|
|
1693 |
}
|
|
|
1694 |
if ($rubrique == "repartition") {
|
|
|
1695 |
if (lire_meta('multi_articles') == 'oui' OR lire_meta('multi_rubriques') == 'oui') {
|
|
|
1696 |
onglet(_T('onglet_repartition_rubrique'), "statistiques.php3", "rubriques", $onglet, "rubrique-24.gif");
|
|
|
1697 |
onglet(_T('onglet_repartition_lang'), "statistiques_lang.php3", "langues", $onglet, "langues-24.gif");
|
|
|
1698 |
}
|
|
|
1699 |
}
|
|
|
1700 |
|
|
|
1701 |
if ($rubrique == "rep_depuis") {
|
|
|
1702 |
onglet(_T('icone_repartition_actuelle'), "statistiques_lang.php3", "popularite", $onglet);
|
|
|
1703 |
onglet(_T('onglet_repartition_debut'), "statistiques_lang.php3?critere=debut", "debut", $onglet);
|
|
|
1704 |
|
|
|
1705 |
}
|
|
|
1706 |
|
|
|
1707 |
if ($rubrique == "stat_depuis") {
|
|
|
1708 |
onglet(_T('icone_repartition_actuelle'), "statistiques.php3", "popularite", $onglet);
|
|
|
1709 |
onglet(_T('onglet_repartition_debut'), "statistiques.php3?critere=debut", "debut", $onglet);
|
|
|
1710 |
|
|
|
1711 |
}
|
|
|
1712 |
|
|
|
1713 |
if ($rubrique == "stat_referers") {
|
|
|
1714 |
onglet(ucfirst(_T('date_aujourdhui')), "statistiques_referers.php3", "jour", $onglet);
|
|
|
1715 |
onglet(ucfirst(_T('date_hier')), "statistiques_referers.php3?jour=veille", "veille", $onglet);
|
|
|
1716 |
}
|
|
|
1717 |
|
|
|
1718 |
if ($rubrique == "administration"){
|
|
|
1719 |
onglet(_T('onglet_save_restaur_base'), "admin_tech.php3", "sauver", $onglet, "base-24.gif");
|
|
|
1720 |
onglet(_T('onglet_affacer_base'), "admin_effacer.php3", "effacer", $onglet, "supprimer.gif");
|
|
|
1721 |
}
|
|
|
1722 |
|
|
|
1723 |
if ($rubrique == "auteur"){
|
|
|
1724 |
onglet(_T('onglet_auteur'), "auteurs_edit.php3?id_auteur=$id_auteur", "auteur", $onglet, "auteur-24.gif");
|
|
|
1725 |
onglet(_T('onglet_informations_personnelles'), "auteur_infos.php3?id_auteur=$id_auteur", "infos", $onglet, "fiche-perso-24.gif");
|
|
|
1726 |
}
|
|
|
1727 |
|
|
|
1728 |
if ($rubrique == "configuration"){
|
|
|
1729 |
onglet(_T('onglet_contenu_site'), "configuration.php3", "contenu", $onglet, "racine-site-24.gif");
|
|
|
1730 |
onglet(_T('onglet_interactivite'), "config-contenu.php3", "interactivite", $onglet, "forum-interne-24.gif");
|
|
|
1731 |
onglet(_T('onglet_fonctions_avances'), "config-fonctions.php3", "fonctions", $onglet, "image-24.gif");
|
|
|
1732 |
}
|
|
|
1733 |
|
|
|
1734 |
if ($rubrique == "config_lang") {
|
|
|
1735 |
onglet(_T('info_langue_principale'), "config-lang.php3", "langues", $onglet, "langues-24.gif");
|
|
|
1736 |
onglet(_T('info_multilinguisme'), "config-multilang.php3", "multi", $onglet, "traductions-24.gif");
|
|
|
1737 |
if (lire_meta('multi_articles') == "oui" OR lire_meta('multi_rubriques') == "oui") {
|
|
|
1738 |
onglet(_T('module_fichiers_langues'), "lang_raccourcis.php3", "fichiers", $onglet, "traductions-24.gif");
|
|
|
1739 |
}
|
|
|
1740 |
}
|
|
|
1741 |
|
|
|
1742 |
if ($rubrique == "suivi_forum"){
|
|
|
1743 |
onglet(_T('onglet_messages_publics'), "controle_forum.php3?page=public", "public", $onglet, "forum-public-24.gif");
|
|
|
1744 |
onglet(_T('onglet_messages_internes'), "controle_forum.php3?page=interne", "interne", $onglet, "forum-interne-24.gif");
|
|
|
1745 |
|
|
|
1746 |
$query_forum = "SELECT * FROM spip_forum WHERE statut='publie' AND texte='' LIMIT 0,1";
|
|
|
1747 |
$result_forum = spip_query($query_forum);
|
|
|
1748 |
if ($row = spip_fetch_array($result_forum))
|
|
|
1749 |
onglet(_T('onglet_messages_vide'), "controle_forum.php3?page=vide", "vide", $onglet);
|
|
|
1750 |
|
|
|
1751 |
$query_forum = "SELECT * FROM spip_forum WHERE statut='prop' LIMIT 0,1";
|
|
|
1752 |
$result_forum = spip_query($query_forum);
|
|
|
1753 |
if ($row = spip_fetch_array($result_forum))
|
|
|
1754 |
onglet(_T('texte_statut_attente_validation'), "controle_forum.php3?page=prop", "prop", $onglet);
|
|
|
1755 |
|
|
|
1756 |
}
|
|
|
1757 |
|
|
|
1758 |
fin_onglet();
|
|
|
1759 |
}
|
|
|
1760 |
|
|
|
1761 |
|
|
|
1762 |
function largeur_icone_bandeau_principal($texte) {
|
|
|
1763 |
global $spip_display, $spip_ecran ;
|
|
|
1764 |
global $connect_statut, $connect_toutes_rubriques;
|
|
|
1765 |
|
|
|
1766 |
if ($spip_display == 1){
|
|
|
1767 |
$largeur = 80;
|
|
|
1768 |
}
|
|
|
1769 |
else if ($spip_display == 3){
|
|
|
1770 |
$largeur = 60;
|
|
|
1771 |
}
|
|
|
1772 |
else {
|
|
|
1773 |
if (count(explode(" ", $texte)) > 1) $largeur = 84;
|
|
|
1774 |
else $largeur = 80;
|
|
|
1775 |
}
|
|
|
1776 |
if ($spip_ecran == "large") $largeur = $largeur + 30;
|
|
|
1777 |
|
|
|
1778 |
if (!($connect_statut == "0minirezo" AND $connect_toutes_rubriques)) {
|
|
|
1779 |
$largeur = $largeur + 30;
|
|
|
1780 |
}
|
|
|
1781 |
|
|
|
1782 |
|
|
|
1783 |
return $largeur;
|
|
|
1784 |
}
|
|
|
1785 |
|
|
|
1786 |
function icone_bandeau_principal($texte, $lien, $fond, $rubrique_icone = "vide", $rubrique = "", $lien_noscript = "", $sous_rubrique_icone = "", $sous_rubrique = ""){
|
|
|
1787 |
global $spip_display, $spip_ecran, $couleur_foncee ;
|
|
|
1788 |
global $menu_accesskey, $compteur_survol;
|
|
|
1789 |
|
|
|
1790 |
$largeur = largeur_icone_bandeau_principal($texte);
|
|
|
1791 |
|
|
|
1792 |
|
|
|
1793 |
$alt = '';
|
|
|
1794 |
$title = '';
|
|
|
1795 |
if ($spip_display == 1){
|
|
|
1796 |
}
|
|
|
1797 |
else if ($spip_display == 3){
|
|
|
1798 |
$title = "title=\"$texte\"";
|
|
|
1799 |
$alt = $texte;
|
|
|
1800 |
}
|
|
|
1801 |
else {
|
|
|
1802 |
$alt = ' ';
|
|
|
1803 |
}
|
|
|
1804 |
|
|
|
1805 |
if (!$menu_accesskey) $menu_accesskey = 1;
|
|
|
1806 |
if ($menu_accesskey < 10) {
|
|
|
1807 |
$accesskey = " accesskey='$menu_accesskey'";
|
|
|
1808 |
$menu_accesskey++;
|
|
|
1809 |
}
|
|
|
1810 |
else if ($menu_accesskey == 10) {
|
|
|
1811 |
$accesskey = " accesskey='0'";
|
|
|
1812 |
$menu_accesskey++;
|
|
|
1813 |
}
|
|
|
1814 |
|
|
|
1815 |
if ($sous_rubrique_icone == $sous_rubrique) $class_select = " class='selection'";
|
|
|
1816 |
|
|
|
1817 |
if (eregi("^javascript:",$lien)) {
|
|
|
1818 |
$a_href = "<a$accesskey onClick=\"$lien; return false;\" href='$lien_noscript' target='spip_aide'$class_select>";
|
|
|
1819 |
}
|
|
|
1820 |
else {
|
|
|
1821 |
$a_href = "<a$accesskey href=\"$lien\"$class_select>";
|
|
|
1822 |
}
|
|
|
1823 |
|
|
|
1824 |
$compteur_survol ++;
|
|
|
1825 |
|
|
|
1826 |
if ($spip_display != 1 AND $spip_display != 4) {
|
|
|
1827 |
echo "<td class='cellule48' onMouseOver=\"changestyle('bandeau$rubrique_icone', 'visibility', 'visible');\" width='$largeur'>$a_href" .
|
|
|
1828 |
http_img_pack("$fond", $alt, "$title width='48' height='48'");
|
|
|
1829 |
if ($spip_display != 3) {
|
|
|
1830 |
echo "<span>$texte</span>";
|
|
|
1831 |
}
|
|
|
1832 |
}
|
|
|
1833 |
else echo "<td class='cellule-texte' onMouseOver=\"changestyle('bandeau$rubrique_icone', 'visibility', 'visible');\" width='$largeur'>$a_href".$texte;
|
|
|
1834 |
echo "</a></td>\n";
|
|
|
1835 |
}
|
|
|
1836 |
|
|
|
1837 |
|
|
|
1838 |
|
|
|
1839 |
|
|
|
1840 |
function icone_bandeau_secondaire($texte, $lien, $fond, $rubrique_icone = "vide", $rubrique, $aide=""){
|
|
|
1841 |
global $spip_display;
|
|
|
1842 |
global $menu_accesskey, $compteur_survol;
|
|
|
1843 |
|
|
|
1844 |
$alt = '';
|
|
|
1845 |
$title = '';
|
|
|
1846 |
if ($spip_display == 1) {
|
|
|
1847 |
//$hauteur = 20;
|
|
|
1848 |
$largeur = 80;
|
|
|
1849 |
}
|
|
|
1850 |
else if ($spip_display == 3){
|
|
|
1851 |
//$hauteur = 26;
|
|
|
1852 |
$largeur = 40;
|
|
|
1853 |
$title = "title=\"$texte\"";
|
|
|
1854 |
$alt = $texte;
|
|
|
1855 |
}
|
|
|
1856 |
else {
|
|
|
1857 |
//$hauteur = 68;
|
|
|
1858 |
if (count(explode(" ", $texte)) > 1) $largeur = 80;
|
|
|
1859 |
else $largeur = 70;
|
|
|
1860 |
$alt = " ";
|
|
|
1861 |
}
|
|
|
1862 |
if ($aide AND $spip_display != 3) {
|
|
|
1863 |
$largeur += 50;
|
|
|
1864 |
//$texte .= aide($aide);
|
|
|
1865 |
}
|
|
|
1866 |
if ($spip_display != 3 AND strlen($texte)>16) $largeur += 20;
|
|
|
1867 |
|
|
|
1868 |
if (!$menu_accesskey) $menu_accesskey = 1;
|
|
|
1869 |
if ($menu_accesskey < 10) {
|
|
|
1870 |
$accesskey = " accesskey='$menu_accesskey'";
|
|
|
1871 |
$menu_accesskey++;
|
|
|
1872 |
}
|
|
|
1873 |
else if ($menu_accesskey == 10) {
|
|
|
1874 |
$accesskey = " accesskey='0'";
|
|
|
1875 |
$menu_accesskey++;
|
|
|
1876 |
}
|
|
|
1877 |
if ($spip_display == 3) $accesskey_icone = $accesskey;
|
|
|
1878 |
|
|
|
1879 |
if ($rubrique_icone == $rubrique) $class_select = " class='selection'";
|
|
|
1880 |
$compteur_survol ++;
|
|
|
1881 |
|
|
|
1882 |
$a_href = "<a$accesskey href=\"$lien\"$class_select>";
|
|
|
1883 |
|
|
|
1884 |
if ($spip_display != 1) {
|
|
|
1885 |
echo "<td class='cellule36' style='width: ".$largeur."px;'>";
|
|
|
1886 |
echo "$a_href" .
|
|
|
1887 |
http_img_pack("$fond", $alt, "$title");
|
|
|
1888 |
if ($aide AND $spip_display != 3) echo aide($aide)." ";
|
|
|
1889 |
if ($spip_display != 3) {
|
|
|
1890 |
echo "<span>$texte</span>";
|
|
|
1891 |
}
|
|
|
1892 |
}
|
|
|
1893 |
else echo "<td class='cellule-texte' width='$largeur'>$a_href".$texte;
|
|
|
1894 |
echo "</a>";
|
|
|
1895 |
echo "</td>\n";
|
|
|
1896 |
}
|
|
|
1897 |
|
|
|
1898 |
|
|
|
1899 |
|
|
|
1900 |
function icone($texte, $lien, $fond, $fonction="", $align="", $afficher='oui'){
|
|
|
1901 |
global $spip_display, $couleur_claire, $couleur_foncee, $compteur_survol;
|
|
|
1902 |
|
|
|
1903 |
if (strlen($fonction) < 3) $fonction = "rien.gif";
|
|
|
1904 |
if (strlen($align) > 2) $aligner = " ALIGN='$align' ";
|
|
|
1905 |
|
|
|
1906 |
if ($spip_display == 1){
|
|
|
1907 |
$hauteur = 20;
|
|
|
1908 |
$largeur = 100;
|
|
|
1909 |
$alt = "";
|
|
|
1910 |
}
|
|
|
1911 |
else if ($spip_display == 3){
|
|
|
1912 |
$hauteur = 30;
|
|
|
1913 |
$largeur = 30;
|
|
|
1914 |
$title = "title=\"$texte\"";
|
|
|
1915 |
$alt = $texte;
|
|
|
1916 |
}
|
|
|
1917 |
else {
|
|
|
1918 |
$hauteur = 70;
|
|
|
1919 |
$largeur = 100;
|
|
|
1920 |
$alt = $texte;
|
|
|
1921 |
}
|
|
|
1922 |
|
|
|
1923 |
if ($fonction == "supprimer.gif") {
|
|
|
1924 |
$style = '-danger';
|
|
|
1925 |
} else {
|
|
|
1926 |
$style = '';
|
|
|
1927 |
}
|
|
|
1928 |
|
|
|
1929 |
$compteur_survol ++;
|
|
|
1930 |
$icone .= "\n<table cellpadding='0' class='pointeur' cellspacing='0' border='0' $aligner width='$largeur'>";
|
|
|
1931 |
$icone .= "<tr><td class='icone36$style' style='text-align:center;'><a href='$lien'>";
|
|
|
1932 |
if ($spip_display != 1 AND $spip_display != 4){
|
|
|
1933 |
if ($fonction != "rien.gif"){
|
|
|
1934 |
$icone .= http_img_pack($fonction, $alt, "$title width='24' height='24' border='0'" .
|
|
|
1935 |
http_style_background($fond, "no-repeat center center"));
|
|
|
1936 |
}
|
|
|
1937 |
else {
|
|
|
1938 |
$icone .= http_img_pack($fond, $alt, "$title width='24' height='24' border='0'");
|
|
|
1939 |
}
|
|
|
1940 |
}
|
|
|
1941 |
if ($spip_display != 3){
|
|
|
1942 |
$icone .= "<span>$texte</span>";
|
|
|
1943 |
}
|
|
|
1944 |
$icone .= "</a></td></tr>";
|
|
|
1945 |
$icone .= "</table>";
|
|
|
1946 |
|
|
|
1947 |
if ($afficher == 'oui')
|
|
|
1948 |
echo $icone;
|
|
|
1949 |
else
|
|
|
1950 |
return $icone;
|
|
|
1951 |
}
|
|
|
1952 |
|
|
|
1953 |
function icone_horizontale($texte, $lien, $fond = "", $fonction = "", $echo = true, $javascript='') {
|
|
|
1954 |
global $spip_display, $couleur_claire, $couleur_foncee, $compteur_survol;
|
|
|
1955 |
|
|
|
1956 |
$retour = '';
|
|
|
1957 |
|
|
|
1958 |
|
|
|
1959 |
if ($spip_display != 4) {
|
|
|
1960 |
if (!$fonction) $fonction = "rien.gif";
|
|
|
1961 |
$danger = ($fonction == "supprimer.gif");
|
|
|
1962 |
|
|
|
1963 |
if ($danger) $retour .= "<div class='danger'>";
|
|
|
1964 |
if ($spip_display != 1) {
|
|
|
1965 |
$retour .= "<a href='$lien' class='cellule-h' $javascript><table cellpadding='0' valign='middle'><tr>\n";
|
|
|
1966 |
$retour .= "<td><a href='$lien'><div class='cell-i'>" .
|
|
|
1967 |
http_img_pack($fonction, "", http_style_background($fond, "center center no-repeat")) .
|
|
|
1968 |
"</div></a></td>\n" .
|
|
|
1969 |
"<td class='cellule-h-lien'><a href='$lien' class='cellule-h'>$texte</a></td>\n";
|
|
|
1970 |
$retour .= "</tr></table></a>\n";
|
|
|
1971 |
}
|
|
|
1972 |
else {
|
|
|
1973 |
$retour .= "<a href='$lien' class='cellule-h-texte' $javascript><div>$texte</div></a>\n";
|
|
|
1974 |
}
|
|
|
1975 |
if ($danger) $retour .= "</div>";
|
|
|
1976 |
} else {
|
|
|
1977 |
$retour = "<li><a href='$lien'>$texte</li>";
|
|
|
1978 |
}
|
|
|
1979 |
|
|
|
1980 |
if ($echo) echo $retour;
|
|
|
1981 |
return $retour;
|
|
|
1982 |
}
|
|
|
1983 |
|
|
|
1984 |
|
|
|
1985 |
function bandeau_barre_verticale(){
|
|
|
1986 |
echo "<td class='separateur'></td>\n";
|
|
|
1987 |
}
|
|
|
1988 |
|
|
|
1989 |
|
|
|
1990 |
// lien changement de couleur
|
|
|
1991 |
function lien_change_var($lien, $set, $couleur, $coords, $titre, $mouseOver="") {
|
|
|
1992 |
$lien->addVar($set, $couleur);
|
|
|
1993 |
return "\n<area shape='rect' href='". $lien->getUrl() ."' coords='$coords' title=\"$titre\" $mouseOver>";
|
|
|
1994 |
}
|
|
|
1995 |
|
|
|
1996 |
//
|
|
|
1997 |
// Debut du corps de la page
|
|
|
1998 |
//
|
|
|
1999 |
|
|
|
2000 |
function afficher_menu_rubriques() {
|
|
|
2001 |
global $spip_lang_rtl, $spip_ecran;
|
|
|
2002 |
$date_maj = lire_meta("date_calcul_rubriques");
|
|
|
2003 |
|
|
|
2004 |
echo http_script('',"js_menu_rubriques.php?date=$date_maj&spip_ecran=$spip_ecran&dir=$spip_lang_rtl",'');
|
|
|
2005 |
}
|
|
|
2006 |
|
|
|
2007 |
|
|
|
2008 |
function afficher_javascript ($html) {
|
|
|
2009 |
return http_script("
|
|
|
2010 |
document.write(\"" . addslashes(str_replace("\n", " ", $html))."\")");
|
|
|
2011 |
}
|
|
|
2012 |
|
|
|
2013 |
function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivre", $onLoad = "") {
|
|
|
2014 |
global $couleurs_spip;
|
|
|
2015 |
global $couleur_foncee;
|
|
|
2016 |
global $couleur_claire;
|
|
|
2017 |
global $adresse_site;
|
|
|
2018 |
global $connect_id_auteur;
|
|
|
2019 |
global $connect_statut;
|
|
|
2020 |
global $connect_activer_messagerie;
|
|
|
2021 |
global $connect_toutes_rubriques;
|
|
|
2022 |
global $auth_can_disconnect, $connect_login;
|
|
|
2023 |
global $options, $spip_display, $spip_ecran;
|
|
|
2024 |
global $spip_lang, $spip_lang_rtl, $spip_lang_left, $spip_lang_right;
|
|
|
2025 |
$activer_messagerie = "oui";
|
|
|
2026 |
|
|
|
2027 |
if ($spip_ecran == "large") $largeur = 974;
|
|
|
2028 |
else $largeur = 750;
|
|
|
2029 |
|
|
|
2030 |
if (strlen($adresse_site)<10) $adresse_site="../";
|
|
|
2031 |
|
|
|
2032 |
debut_html($titre, $rubrique, $onLoad);
|
|
|
2033 |
|
|
|
2034 |
$link = new Link;
|
|
|
2035 |
echo "\n<map name='map_layout'>";
|
|
|
2036 |
echo lien_change_var ($link, 'set_disp', 1, '1,0,18,15', _T('lien_afficher_texte_seul'), "onMouseOver=\"changestyle('bandeauvide','visibility', 'visible');\"");
|
|
|
2037 |
echo lien_change_var ($link, 'set_disp', 2, '19,0,40,15', _T('lien_afficher_texte_icones'), "onMouseOver=\"changestyle('bandeauvide','visibility', 'visible');\"");
|
|
|
2038 |
echo lien_change_var ($link, 'set_disp', 3, '41,0,59,15', _T('lien_afficher_icones_seuls'), "onMouseOver=\"changestyle('bandeauvide','visibility', 'visible');\"");
|
|
|
2039 |
echo "\n</map>";
|
|
|
2040 |
|
|
|
2041 |
|
|
|
2042 |
|
|
|
2043 |
if ($spip_display == "4") {
|
|
|
2044 |
// Icones principales
|
|
|
2045 |
echo "<ul>";
|
|
|
2046 |
echo "<li><a href=\"index.php3\">"._T('icone_a_suivre')."</a>";
|
|
|
2047 |
echo "<li><a href=\"naviguer.php3\">"._T('icone_edition_site')."</a>";
|
|
|
2048 |
echo "<li><a href=\"forum.php3\">"._T('titre_forum')."</a>";
|
|
|
2049 |
echo "<li><a href=\"auteurs.php3\">"._T('icone_auteurs')."</a>";
|
|
|
2050 |
echo "<li><a href=\"$adresse_site/\">"._T('icone_visiter_site')."</a>";
|
|
|
2051 |
echo "</ul>";
|
|
|
2052 |
}
|
|
|
2053 |
else {
|
|
|
2054 |
|
|
|
2055 |
// iframe permettant de passer les changements de statut rapides
|
|
|
2056 |
echo "<iframe id='iframe_action' name='iframe_action' width='1' height='1' style='position: absolute; visibility: hidden;'></iframe>";
|
|
|
2057 |
|
|
|
2058 |
// Lien oo
|
|
|
2059 |
echo "<div class='invisible_au_chargement' style='position: absolute; height: 0px; visibility: hidden;'><a href='oo'>"._T("access_mode_texte")."</a></div>";
|
|
|
2060 |
|
|
|
2061 |
echo "<div id='haut-page'>";
|
|
|
2062 |
|
|
|
2063 |
// Icones principales
|
|
|
2064 |
echo "<div class='bandeau-principal' align='center'>\n";
|
|
|
2065 |
echo "<div class='bandeau-icones'>\n";
|
|
|
2066 |
echo "<table width='$largeur' cellpadding='0' cellspacing='0' border='0' align='center'><tr>\n";
|
|
|
2067 |
|
|
|
2068 |
icone_bandeau_principal (_T('icone_a_suivre'), "index.php3", "asuivre-48.png", "asuivre", $rubrique, "", "asuivre", $sous_rubrique);
|
|
|
2069 |
icone_bandeau_principal (_T('icone_edition_site'), "naviguer.php3", "documents-48$spip_lang_rtl.png", "documents", $rubrique, "", "rubriques", $sous_rubrique);
|
|
|
2070 |
icone_bandeau_principal (_T('titre_forum'), "forum.php3", "messagerie-48.png", "redacteurs", $rubrique, "", "forum-interne", $sous_rubrique);
|
|
|
2071 |
icone_bandeau_principal (_T('icone_auteurs'), "auteurs.php3", "redacteurs-48.png", "auteurs", $rubrique, "", "redacteurs", $sous_rubrique);
|
|
|
2072 |
if ($connect_statut == "0minirezo" AND $connect_toutes_rubriques AND lire_meta("activer_statistiques") != 'non') {
|
|
|
2073 |
//bandeau_barre_verticale();
|
|
|
2074 |
icone_bandeau_principal (_T('icone_statistiques_visites'), "statistiques_visites.php3", "statistiques-48.png", "suivi", $rubrique, "", "statistiques", $sous_rubrique);
|
|
|
2075 |
}
|
|
|
2076 |
if ($connect_statut == '0minirezo' and $connect_toutes_rubriques) {
|
|
|
2077 |
icone_bandeau_principal (_T('icone_configuration_site'), "configuration.php3", "administration-48.png", "administration", $rubrique, "", "configuration", $sous_rubrique);
|
|
|
2078 |
}
|
|
|
2079 |
|
|
|
2080 |
echo "<td> </td>";
|
|
|
2081 |
|
|
|
2082 |
|
|
|
2083 |
icone_bandeau_principal (_T('icone_aide_ligne'),
|
|
|
2084 |
"javascript:window.open('aide_index.php3?var_lang=$spip_lang', 'aide_spip', 'scrollbars=yes,resizable=yes,width=740,height=580');",
|
|
|
2085 |
"aide-48".aide_lang_dir($spip_lang,$spip_lang_rtl).".png",
|
|
|
2086 |
"vide", "", "aide_index.php3?var_lang=$spip_lang",
|
|
|
2087 |
"aide-en-ligne", $sous_rubrique);
|
|
|
2088 |
|
|
|
2089 |
icone_bandeau_principal (_T('icone_visiter_site'), "$adresse_site/", "visiter-48$spip_lang_rtl.png", "visiter","", "visiter", $sous_rubrique);
|
|
|
2090 |
|
|
|
2091 |
echo "</tr></table>\n";
|
|
|
2092 |
|
|
|
2093 |
|
|
|
2094 |
|
|
|
2095 |
|
|
|
2096 |
echo "</div>\n";
|
|
|
2097 |
|
|
|
2098 |
echo "<table width='$largeur' cellpadding='0' cellspacing='0' align='center'><tr><td>";
|
|
|
2099 |
echo "<div style='text-align: $spip_lang_left; width: ".$largeur."px; position: relative; z-index: 2000;'>";
|
|
|
2100 |
|
|
|
2101 |
// Icones secondaires
|
|
|
2102 |
$activer_messagerie = "oui";
|
|
|
2103 |
$connect_activer_messagerie = "oui";
|
|
|
2104 |
|
|
|
2105 |
if ($rubrique == "asuivre"){
|
|
|
2106 |
$class = "visible_au_chargement";
|
|
|
2107 |
} else {
|
|
|
2108 |
$class = "invisible_au_chargement";
|
|
|
2109 |
}
|
|
|
2110 |
$decal = largeur_icone_bandeau_principal(_T('icone_a_suivre'));
|
|
|
2111 |
|
|
|
2112 |
|
|
|
2113 |
if ($rubrique == "documents"){
|
|
|
2114 |
$class = "visible_au_chargement";
|
|
|
2115 |
} else {
|
|
|
2116 |
$class = "invisible_au_chargement";
|
|
|
2117 |
}
|
|
|
2118 |
if ($connect_statut == "0minirezo" AND $connect_toutes_rubriques) {
|
|
|
2119 |
echo "<div class='$class' id='bandeaudocuments' style='position: absolute; $spip_lang_left: ".$decal."px;'><div class='bandeau_sec'><table class='gauche'><tr>\n";
|
|
|
2120 |
//icone_bandeau_secondaire (_T('icone_rubriques'), "naviguer.php3", "rubrique-24.gif", "rubriques", $sous_rubrique);
|
|
|
2121 |
|
|
|
2122 |
$nombre_articles = spip_num_rows(spip_query("SELECT art.id_article FROM spip_articles AS art, spip_auteurs_articles AS lien WHERE lien.id_auteur = '$connect_id_auteur' AND art.id_article = lien.id_article LIMIT 0,1"));
|
|
|
2123 |
if ($nombre_articles > 0) {
|
|
|
2124 |
icone_bandeau_secondaire (_T('icone_tous_articles'), "articles_page.php3", "article-24.gif", "articles", $sous_rubrique);
|
|
|
2125 |
}
|
|
|
2126 |
|
|
|
2127 |
/*if ($options == "avancees") {
|
|
|
2128 |
if ($connect_statut == "0minirezo") $req_where = " AND articles.statut IN ('prepa','prop','publie')";
|
|
|
2129 |
else $req_where = " AND articles.statut IN ('prop','publie')";
|
|
|
2130 |
$nombre_versions = spip_num_rows(spip_query("
|
|
|
2131 |
SELECT versions.*, articles.statut, articles.titre
|
|
|
2132 |
FROM spip_versions AS versions, spip_articles AS articles
|
|
|
2133 |
WHERE versions.id_article = articles.id_article AND versions.id_version > 1$req_where LIMIT 0,1"));
|
|
|
2134 |
if ($nombre_versions > 0 OR 1==1) {
|
|
|
2135 |
icone_bandeau_secondaire (_T('icone_suivi_revisions'), "suivi_revisions.php3", "historique-24.gif", "revisions", $sous_rubrique);
|
|
|
2136 |
}
|
|
|
2137 |
}*/
|
|
|
2138 |
|
|
|
2139 |
$activer_breves=lire_meta("activer_breves");
|
|
|
2140 |
if ($activer_breves != "non"){
|
|
|
2141 |
icone_bandeau_secondaire (_T('icone_breves'), "breves.php3", "breve-24.gif", "breves", $sous_rubrique);
|
|
|
2142 |
}
|
|
|
2143 |
|
|
|
2144 |
if ($options == "avancees"){
|
|
|
2145 |
$articles_mots = lire_meta('articles_mots');
|
|
|
2146 |
if ($articles_mots != "non") {
|
|
|
2147 |
icone_bandeau_secondaire (_T('icone_mots_cles'), "mots_tous.php3", "mot-cle-24.gif", "mots", $sous_rubrique);
|
|
|
2148 |
}
|
|
|
2149 |
|
|
|
2150 |
$activer_sites = lire_meta('activer_sites');
|
|
|
2151 |
if ($activer_sites<>'non')
|
|
|
2152 |
icone_bandeau_secondaire (_T('icone_sites_references'), "sites_tous.php3", "site-24.gif", "sites", $sous_rubrique);
|
|
|
2153 |
|
|
|
2154 |
if (@spip_num_rows(spip_query("SELECT * FROM spip_documents_rubriques LIMIT 0,1")) > 0) {
|
|
|
2155 |
icone_bandeau_secondaire (_T('icone_doc_rubrique'), "documents_liste.php3", "doc-24.gif", "documents", $sous_rubrique);
|
|
|
2156 |
}
|
|
|
2157 |
}
|
|
|
2158 |
echo "</tr></table></div></div>";
|
|
|
2159 |
}
|
|
|
2160 |
|
|
|
2161 |
$decal = $decal + largeur_icone_bandeau_principal(_T('icone_edition_site'));
|
|
|
2162 |
|
|
|
2163 |
|
|
|
2164 |
|
|
|
2165 |
|
|
|
2166 |
if ($connect_statut == "0minirezo" AND $connect_toutes_rubriques) {
|
|
|
2167 |
if ($rubrique == "redacteurs") {
|
|
|
2168 |
$class = "visible_au_chargement";
|
|
|
2169 |
} else {
|
|
|
2170 |
$class = "invisible_au_chargement";
|
|
|
2171 |
}
|
|
|
2172 |
|
|
|
2173 |
echo "<div class='$class' id='bandeauredacteurs' style='position: absolute; $spip_lang_left: ".$decal."px;'><div class='bandeau_sec'><table class='gauche'><tr>\n";
|
|
|
2174 |
if (lire_meta('forum_prive_admin') == 'oui') icone_bandeau_secondaire (_T('icone_forum_administrateur'), "forum_admin.php3", "forum-admin-24.gif", "privadm", $sous_rubrique);
|
|
|
2175 |
|
|
|
2176 |
icone_bandeau_secondaire (_T('icone_suivi_forums'), "controle_forum.php3", "suivi-forum-24.gif", "forum-controle", $sous_rubrique);
|
|
|
2177 |
icone_bandeau_secondaire (_T('icone_suivi_pettions'), "controle_petition.php3", "suivi-petition-24.gif", "suivi-petition", $sous_rubrique);
|
|
|
2178 |
|
|
|
2179 |
echo "</tr></table></div></div>";
|
|
|
2180 |
|
|
|
2181 |
}
|
|
|
2182 |
|
|
|
2183 |
$decal = $decal + largeur_icone_bandeau_principal(_T('icone_discussions'));
|
|
|
2184 |
|
|
|
2185 |
if ($connect_statut == "0minirezo" AND $connect_toutes_rubriques) {
|
|
|
2186 |
if ($rubrique == "auteurs") {
|
|
|
2187 |
$class = "visible_au_chargement";
|
|
|
2188 |
} else {
|
|
|
2189 |
$class = "invisible_au_chargement";
|
|
|
2190 |
}
|
|
|
2191 |
echo "<div class='$class' id='bandeauauteurs' style='position: absolute; $spip_lang_left: ".$decal."px;'><div class='bandeau_sec'><table class='gauche'><tr>\n";
|
|
|
2192 |
icone_bandeau_secondaire (_T('icone_informations_personnelles'), "auteurs_edit.php3?id_auteur=$connect_id_auteur", "fiche-perso-24.gif", "perso", $sous_rubrique);
|
|
|
2193 |
icone_bandeau_secondaire (_T('icone_creer_nouvel_auteur'), "auteur_infos.php3?new=oui", "auteur-24.gif", "xxx", $sous_rubrique);
|
|
|
2194 |
|
|
|
2195 |
echo "</tr></table></div></div>";
|
|
|
2196 |
}
|
|
|
2197 |
|
|
|
2198 |
|
|
|
2199 |
|
|
|
2200 |
$decal = $decal + largeur_icone_bandeau_principal(_T('icone_auteurs'));
|
|
|
2201 |
|
|
|
2202 |
// decalage pour barre verticale
|
|
|
2203 |
// $decal = $decal + 11;
|
|
|
2204 |
|
|
|
2205 |
if ($connect_statut == "0minirezo" AND $connect_toutes_rubriques AND lire_meta("activer_statistiques") != 'non') {
|
|
|
2206 |
if ($rubrique == "suivi") {
|
|
|
2207 |
$class = "visible_au_chargement";
|
|
|
2208 |
} else {
|
|
|
2209 |
$class = "invisible_au_chargement";
|
|
|
2210 |
}
|
|
|
2211 |
echo "<div class='$class' id='bandeausuivi' style='position: absolute; $spip_lang_left: ".$decal."px;'><div class='bandeau_sec'><table class='gauche'><tr>\n";
|
|
|
2212 |
if ($connect_toutes_rubriques) bandeau_barre_verticale();
|
|
|
2213 |
|
|
|
2214 |
icone_bandeau_secondaire (_T('icone_repartition_visites'), "statistiques.php3", "rubrique-24.gif", "repartition", $sous_rubrique);
|
|
|
2215 |
if (lire_meta('multi_articles') == 'oui' OR lire_meta('multi_rubriques') == 'oui')
|
|
|
2216 |
icone_bandeau_secondaire (_T('onglet_repartition_lang'), "statistiques_lang.php3", "langues-24.gif", "repartition-langues", $sous_rubrique);
|
|
|
2217 |
icone_bandeau_secondaire (_T('titre_liens_entrants'), "statistiques_referers.php3", "referers-24.gif", "referers", $sous_rubrique);
|
|
|
2218 |
|
|
|
2219 |
echo "</tr></table></div></div>";
|
|
|
2220 |
|
|
|
2221 |
$decal = $decal + largeur_icone_bandeau_principal(_T('icone_suivi_actualite'));
|
|
|
2222 |
|
|
|
2223 |
}
|
|
|
2224 |
|
|
|
2225 |
|
|
|
2226 |
if ($connect_statut == '0minirezo' and $connect_toutes_rubriques) {
|
|
|
2227 |
if ($rubrique == "administration") {
|
|
|
2228 |
$class = "visible_au_chargement";
|
|
|
2229 |
} else {
|
|
|
2230 |
$class = "invisible_au_chargement";
|
|
|
2231 |
}
|
|
|
2232 |
echo "<div class='$class' id='bandeauadministration' style='position: absolute; $spip_lang_left: ".$decal."px;'><div class='bandeau_sec'><table class='gauche'><tr>\n";
|
|
|
2233 |
icone_bandeau_secondaire (_T('icone_gestion_langues'), "config-lang.php3", "langues-24.gif", "langues", $sous_rubrique);
|
|
|
2234 |
|
|
|
2235 |
bandeau_barre_verticale();
|
|
|
2236 |
if ($options == "avancees") {
|
|
|
2237 |
icone_bandeau_secondaire (_T('icone_maintenance_site'), "admin_tech.php3", "base-24.gif", "base", $sous_rubrique);
|
|
|
2238 |
icone_bandeau_secondaire (_T('onglet_vider_cache'), "admin_vider.php3", "cache-24.gif", "cache", $sous_rubrique);
|
|
|
2239 |
}
|
|
|
2240 |
else {
|
|
|
2241 |
icone_bandeau_secondaire (_T('icone_sauver_site'), "admin_tech.php3", "base-24.gif", "base", $sous_rubrique);
|
|
|
2242 |
}
|
|
|
2243 |
echo "</tr></table></div></div>";
|
|
|
2244 |
|
|
|
2245 |
|
|
|
2246 |
}
|
|
|
2247 |
|
|
|
2248 |
// Refermer tout de suite le bandeau deroule par defaut
|
|
|
2249 |
echo "
|
|
|
2250 |
<script type='text/javascript'><!--
|
|
|
2251 |
changestyle('-', '-', '-');
|
|
|
2252 |
// --></script>\n";
|
|
|
2253 |
|
|
|
2254 |
echo "</div>";
|
|
|
2255 |
|
|
|
2256 |
echo "</td></tr></table>";
|
|
|
2257 |
|
|
|
2258 |
echo "</div>\n";
|
|
|
2259 |
|
|
|
2260 |
// Bandeau
|
|
|
2261 |
if ($rubrique == "administration") {
|
|
|
2262 |
$style = "background: url(" . _DIR_IMG_PACK . "rayures-danger.png); background-color: $couleur_foncee";
|
|
|
2263 |
echo "<style>a.icone26 { color: white; }</style>";
|
|
|
2264 |
}
|
|
|
2265 |
else {
|
|
|
2266 |
$style = "background-color: $couleur_claire";
|
|
|
2267 |
}
|
|
|
2268 |
|
|
|
2269 |
echo "\n<div style=\"max-height: 40px; width: 100%; border-bottom: solid 1px white;$style\">";
|
|
|
2270 |
echo "<table align='center' cellpadding='0' background='' width='$largeur'><tr width='$largeur'>";
|
|
|
2271 |
|
|
|
2272 |
echo "<td valign='middle' class='bandeau_couleur' style='text-align: $spip_lang_left;'>";
|
|
|
2273 |
echo "<a href='articles_tous.php3' class='icone26' onMouseOver=\"changestyle('bandeautoutsite','visibility','visible');\">" .
|
|
|
2274 |
http_img_pack("tout-site.png", "", "width='26' height='20' border='0'") . "</a>";
|
|
|
2275 |
|
|
|
2276 |
$id_rubrique = $GLOBALS['id_rubrique'];
|
|
|
2277 |
if ($id_rubrique > 0) echo "<a href='brouteur.php3?id_rubrique=$id_rubrique' class='icone26' onMouseOver=\"changestyle('bandeaunavrapide','visibility','visible');\">" .
|
|
|
2278 |
http_img_pack("naviguer-site.png", "", "width='26' height='20' border='0'") ."</a>";
|
|
|
2279 |
else echo "<a href='brouteur.php3' class='icone26' onMouseOver=\"changestyle('bandeaunavrapide','visibility','visible');\" >" .
|
|
|
2280 |
http_img_pack("naviguer-site.png", "", "width='26' height='20' border='0'") . "</a>";
|
|
|
2281 |
|
|
|
2282 |
echo "<a href='recherche.php3' class='icone26' onMouseOver=\"changestyle('bandeaurecherche','visibility','visible');\" >" .
|
|
|
2283 |
http_img_pack("loupe.png", "", "width='26' height='20' border='0'") ."</a>";
|
|
|
2284 |
|
|
|
2285 |
echo http_img_pack("rien.gif", " ", "width='10'");
|
|
|
2286 |
|
|
|
2287 |
echo "<a href='calendrier.php3?type=semaine' class='icone26' onMouseOver=\"changestyle('bandeauagenda','visibility','visible');\">" .
|
|
|
2288 |
http_img_pack("cal-rv.png", "", "width='26' height='20' border='0'") ."</a>";
|
|
|
2289 |
echo "<a href='messagerie.php3' class='icone26' onMouseOver=\"changestyle('bandeaumessagerie','visibility','visible');\">" .
|
|
|
2290 |
http_img_pack("cal-messagerie.png", "", "width='26' height='20' border='0'") ."</a>";
|
|
|
2291 |
echo "<a href='synchro.php3' class='icone26' onMouseOver=\"changestyle('bandeausynchro','visibility','visible');\">" .
|
|
|
2292 |
http_img_pack("cal-suivi.png", "", "width='26' height='20' border='0'") . "</a>";
|
|
|
2293 |
|
|
|
2294 |
|
|
|
2295 |
if (!($connect_statut == "0minirezo" AND $connect_toutes_rubriques)) {
|
|
|
2296 |
echo http_img_pack("rien.gif", " ", "width='10'");
|
|
|
2297 |
echo "<a href='auteurs_edit.php3?id_auteur=$connect_id_auteur' class='icone26' onMouseOver=\"changestyle('bandeauinfoperso','visibility','visible');\">" .
|
|
|
2298 |
http_img_pack("fiche-perso.png", "", "border='0' onMouseOver=\"changestyle('bandeauvide','visibility', 'visible');\"");
|
|
|
2299 |
echo "</a>";
|
|
|
2300 |
}
|
|
|
2301 |
|
|
|
2302 |
echo "</td>";
|
|
|
2303 |
echo "<td valign='middle' class='bandeau_couleur' style='text-align: $spip_lang_left;'>";
|
|
|
2304 |
// overflow pour masquer les noms tres longs (et eviter debords, notamment en ecran etroit)
|
|
|
2305 |
if ($spip_ecran == "large") $largeur_nom = 300;
|
|
|
2306 |
else $largeur_nom= 110;
|
|
|
2307 |
echo "<div style='width: ".$largeur_nom."px; height: 14px; overflow: hidden;'>";
|
|
|
2308 |
// Redacteur connecte
|
|
|
2309 |
echo typo($GLOBALS["connect_nom"]);
|
|
|
2310 |
echo "</div>";
|
|
|
2311 |
|
|
|
2312 |
echo "</td>";
|
|
|
2313 |
|
|
|
2314 |
echo "<td> </td>";
|
|
|
2315 |
|
|
|
2316 |
|
|
|
2317 |
echo "<td class='bandeau_couleur' style='text-align: $spip_lang_right;' valign='middle'>";
|
|
|
2318 |
|
|
|
2319 |
// Choix display
|
|
|
2320 |
// echo"<img src=_DIR_IMG_PACK . 'rien.gif' width='10' />";
|
|
|
2321 |
if ($options != "avancees") {
|
|
|
2322 |
$lien = new Link;
|
|
|
2323 |
$lien->addVar('set_options', 'avancees');
|
|
|
2324 |
$simple = "<b>"._T('icone_interface_simple')."</b>/<a href='".$lien->getUrl()."' class='lien_sous'>"._T('icone_interface_complet')."</a>";
|
|
|
2325 |
$icone = "interface-display-comp.png";
|
|
|
2326 |
} else {
|
|
|
2327 |
$lien = new Link;
|
|
|
2328 |
$lien->addVar('set_options', 'basiques');
|
|
|
2329 |
$simple = "<a href='".$lien->getUrl()."' class='lien_sous'>"._T('icone_interface_simple')."</a>/<b>"._T('icone_interface_complet')."</b>";
|
|
|
2330 |
$icone = "interface-display.png";
|
|
|
2331 |
}
|
|
|
2332 |
echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeaudisplay','visibility', 'visible');\">" .
|
|
|
2333 |
http_img_pack("$icone", "", "width='26' height='20' border='0'")."</a>";
|
|
|
2334 |
|
|
|
2335 |
echo http_img_pack("rien.gif", " ", "width='10' height='1'");
|
|
|
2336 |
echo http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".png", "abc", "class='format_png' valign='middle' width='59' height='15' usemap='#map_layout' border='0'");
|
|
|
2337 |
|
|
|
2338 |
|
|
|
2339 |
echo http_img_pack("rien.gif", " ", "width='10' height='1'");
|
|
|
2340 |
// grand ecran
|
|
|
2341 |
$lien = new Link;
|
|
|
2342 |
if ($spip_ecran == "large") {
|
|
|
2343 |
$lien->addVar('set_ecran', 'etroit');
|
|
|
2344 |
$i = _T('info_petit_ecran');
|
|
|
2345 |
echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeauecran','visibility', 'visible');\" title=\"$i\">" .
|
|
|
2346 |
http_img_pack("set-ecran-etroit.png", $i, "width='26' height='20' border='0'") . "</a>";
|
|
|
2347 |
$ecran = "<div><a href='".$lien->getUrl()."' class='lien_sous'>"._T('info_petit_ecran')."</a>/<b>"._T('info_grand_ecran')."</b></div>";
|
|
|
2348 |
}
|
|
|
2349 |
else {
|
|
|
2350 |
$lien->addVar('set_ecran', 'large');
|
|
|
2351 |
$i = _T('info_grand_ecran');
|
|
|
2352 |
echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeauecran','visibility', 'visible');\" title=\"$i\">" .
|
|
|
2353 |
http_img_pack("set-ecran.png", $i, "width='26' height='20' border='0'") ."</a>";
|
|
|
2354 |
$ecran = "<div><b>"._T('info_petit_ecran')."</b>/<a href='".$lien->getUrl()."' class='lien_sous'>"._T('info_grand_ecran')."</a></div>";
|
|
|
2355 |
}
|
|
|
2356 |
|
|
|
2357 |
echo "</td>";
|
|
|
2358 |
|
|
|
2359 |
echo "<td class='bandeau_couleur' style='width: 60px; text-align:$spip_lang_left;' valign='middle'>";
|
|
|
2360 |
// Choix de la couleur: automatique en fonction de $couleurs_spip
|
|
|
2361 |
|
|
|
2362 |
$link = new Link;
|
|
|
2363 |
if ($couleurs_spip) {
|
|
|
2364 |
ksort($couleurs_spip);
|
|
|
2365 |
while (list($key,$val) = each($couleurs_spip)) {
|
|
|
2366 |
$link->delVar('set_couleur');
|
|
|
2367 |
$link->addVar('set_couleur', $key);
|
|
|
2368 |
|
|
|
2369 |
echo "<a href=\"".$link->getUrl()."\">" .
|
|
|
2370 |
http_img_pack("rien.gif", " ", "width='8' height='8' border='0' style='margin: 1px; background-color: ".$couleurs_spip[$key]['couleur_claire'].";' onMouseOver=\"changestyle('bandeauinterface','visibility', 'visible');\""). "</a>";
|
|
|
2371 |
}
|
|
|
2372 |
}
|
|
|
2373 |
echo "</td>";
|
|
|
2374 |
//
|
|
|
2375 |
// choix de la langue
|
|
|
2376 |
//
|
|
|
2377 |
if ($GLOBALS['all_langs']) {
|
|
|
2378 |
echo "<td class='bandeau_couleur' style='width: 100px; text-align: $spip_lang_right;' valign='middle'>";
|
|
|
2379 |
echo menu_langues('var_lang_ecrire');
|
|
|
2380 |
echo "</td>";
|
|
|
2381 |
}
|
|
|
2382 |
|
|
|
2383 |
echo "<td class='bandeau_couleur' style='text-align: $spip_lang_right; width: 28px;' valign='middle'>";
|
|
|
2384 |
|
|
|
2385 |
if ($auth_can_disconnect) {
|
|
|
2386 |
echo "<a href='../spip_cookie.php3?logout=$connect_login' class='icone26' onMouseOver=\"changestyle('bandeaudeconnecter','visibility', 'visible');\">" .
|
|
|
2387 |
http_img_pack("deconnecter-24.gif", "", "border='0'") . "</a>";
|
|
|
2388 |
}
|
|
|
2389 |
echo "</td>";
|
|
|
2390 |
|
|
|
2391 |
|
|
|
2392 |
echo "</tr></table>";
|
|
|
2393 |
|
|
|
2394 |
|
|
|
2395 |
//
|
|
|
2396 |
// Barre des gadgets
|
|
|
2397 |
//
|
|
|
2398 |
|
|
|
2399 |
echo "<table width='$largeur' cellpadding='0' cellspacing='0' align='center'><tr><td>";
|
|
|
2400 |
|
|
|
2401 |
|
|
|
2402 |
// GADGET Menu rubriques
|
|
|
2403 |
echo "<div style='position: relative; z-index: 1000;'>";
|
|
|
2404 |
echo "<div id='bandeautoutsite' class='bandeau_couleur_sous' style='$spip_lang_left: 0px;'>";
|
|
|
2405 |
echo "<a href='articles_tous.php3' class='lien_sous'>"._T('icone_site_entier')."</a>";
|
|
|
2406 |
afficher_menu_rubriques();
|
|
|
2407 |
echo "</div>";
|
|
|
2408 |
// FIN GADGET Menu rubriques
|
|
|
2409 |
|
|
|
2410 |
|
|
|
2411 |
|
|
|
2412 |
|
|
|
2413 |
// GADGET Navigation rapide
|
|
|
2414 |
echo "<div id='bandeaunavrapide' class='bandeau_couleur_sous' style='$spip_lang_left: 30px; width: 300px;'>";
|
|
|
2415 |
|
|
|
2416 |
if ($id_rubrique > 0) echo "<a href='brouteur.php3?id_rubrique=$id_rubrique' class='lien_sous'>";
|
|
|
2417 |
else echo "<a href='brouteur.php3' class='lien_sous'>";
|
|
|
2418 |
echo _T('icone_brouteur');
|
|
|
2419 |
echo "</a>";
|
|
|
2420 |
|
|
|
2421 |
$gadget = '';
|
|
|
2422 |
$vos_articles = spip_query("SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.id_article=lien.id_article ".
|
|
|
2423 |
"AND lien.id_auteur=$connect_id_auteur AND articles.statut='prepa' ORDER BY articles.date DESC LIMIT 0,5");
|
|
|
2424 |
if (spip_num_rows($vos_articles) > 0) {
|
|
|
2425 |
$gadget .= "<div> </div>";
|
|
|
2426 |
$gadget .= "<div class='bandeau_rubriques' style='z-index: 1;'>";
|
|
|
2427 |
$gadget .= bandeau_titre_boite2(afficher_plus("articles_page.php3")._T('info_en_cours_validation'), "article-24.gif", '', '', false);
|
|
|
2428 |
$gadget .= "\n<div class='plan-articles'>\n";
|
|
|
2429 |
while($row = spip_fetch_array($vos_articles)) {
|
|
|
2430 |
$id_article = $row['id_article'];
|
|
|
2431 |
$titre = typo($row['titre']);
|
|
|
2432 |
$statut = $row['statut'];
|
|
|
2433 |
$gadget .= "<a class='$statut' style='font-size: 10px;' href='articles.php3?id_article=$id_article'>$titre</a>\n";
|
|
|
2434 |
}
|
|
|
2435 |
$gadget .= "</div>";
|
|
|
2436 |
$gadget .= "</div>";
|
|
|
2437 |
}
|
|
|
2438 |
|
|
|
2439 |
$vos_articles = spip_query("SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.statut='prop' ".
|
|
|
2440 |
" ORDER BY articles.date DESC LIMIT 0,5");
|
|
|
2441 |
if (spip_num_rows($vos_articles) > 0) {
|
|
|
2442 |
$gadget .= "<div> </div>";
|
|
|
2443 |
$gadget .= "<div class='bandeau_rubriques' style='z-index: 1;'>";
|
|
|
2444 |
$gadget .= bandeau_titre_boite2(afficher_plus("index.php3")._T('info_articles_proposes'), "article-24.gif", '', '', false);
|
|
|
2445 |
$gadget .= "<div class='plan-articles'>";
|
|
|
2446 |
while($row = spip_fetch_array($vos_articles)) {
|
|
|
2447 |
$id_article = $row['id_article'];
|
|
|
2448 |
$titre = typo($row['titre']);
|
|
|
2449 |
$statut = $row['statut'];
|
|
|
2450 |
|
|
|
2451 |
$gadget .= "<a class='$statut' style='font-size: 10px;' href='articles.php3?id_article=$id_article'>$titre</a>";
|
|
|
2452 |
}
|
|
|
2453 |
$gadget .= "</div>";
|
|
|
2454 |
$gadget .= "</div>";
|
|
|
2455 |
}
|
|
|
2456 |
|
|
|
2457 |
$vos_articles = spip_query("SELECT * FROM spip_breves WHERE statut='prop' ".
|
|
|
2458 |
" ORDER BY date_heure DESC LIMIT 0,5");
|
|
|
2459 |
if (spip_num_rows($vos_articles) > 0) {
|
|
|
2460 |
$gadget .= "<div> </div>";
|
|
|
2461 |
$gadget .= "<div class='bandeau_rubriques' style='z-index: 1;'>";
|
|
|
2462 |
$gadget .= bandeau_titre_boite2(afficher_plus("breves.php3")._T('info_breves_valider'), "breve-24.gif", "$couleur_foncee", "white", false);
|
|
|
2463 |
$gadget .= "<div class='plan-articles'>";
|
|
|
2464 |
while($row = spip_fetch_array($vos_articles)) {
|
|
|
2465 |
$id_breve = $row['id_breve'];
|
|
|
2466 |
$titre = typo($row['titre']);
|
|
|
2467 |
$statut = $row['statut'];
|
|
|
2468 |
|
|
|
2469 |
$gadget .= "<a class='$statut' style='font-size: 10px;' href='breves_voir.php3?id_breve=$id_breve'>$titre</a>";
|
|
|
2470 |
}
|
|
|
2471 |
$gadget .= "</div>";
|
|
|
2472 |
$gadget .= "</div>";
|
|
|
2473 |
}
|
|
|
2474 |
|
|
|
2475 |
|
|
|
2476 |
$query = "SELECT id_rubrique FROM spip_rubriques LIMIT 0,1";
|
|
|
2477 |
$result = spip_query($query);
|
|
|
2478 |
|
|
|
2479 |
if (spip_num_rows($result) > 0) {
|
|
|
2480 |
$gadget .= "<div> </div>";
|
|
|
2481 |
$id_rubrique = $GLOBALS['id_rubrique'];
|
|
|
2482 |
if ($id_rubrique > 0) {
|
|
|
2483 |
$dans_rub = "&id_rubrique=$id_rubrique";
|
|
|
2484 |
$dans_parent = "&id_parent=$id_rubrique";
|
|
|
2485 |
}
|
|
|
2486 |
if ($connect_statut == "0minirezo") {
|
|
|
2487 |
$gadget .= "<div style='width: 140px; float: $spip_lang_left;'>";
|
|
|
2488 |
if ($id_rubrique > 0)
|
|
|
2489 |
$gadget .= icone_horizontale(_T('icone_creer_sous_rubrique'), "rubriques_edit.php3?new=oui$dans_parent", "rubrique-24.gif", "creer.gif", false);
|
|
|
2490 |
else
|
|
|
2491 |
$gadget .= icone_horizontale(_T('icone_creer_rubrique'), "rubriques_edit.php3?new=oui", "rubrique-24.gif", "creer.gif", false);
|
|
|
2492 |
$gadget .= "</div>";
|
|
|
2493 |
}
|
|
|
2494 |
$gadget .= "<div style='width: 140px; float: $spip_lang_left;'>";
|
|
|
2495 |
$gadget .= icone_horizontale(_T('icone_ecrire_article'), "articles_edit.php3?new=oui$dans_rub", "article-24.gif","creer.gif", false);
|
|
|
2496 |
$gadget .= "</div>";
|
|
|
2497 |
|
|
|
2498 |
$activer_breves = lire_meta("activer_breves");
|
|
|
2499 |
if ($activer_breves != "non") {
|
|
|
2500 |
$gadget .= "<div style='width: 140px; float: $spip_lang_left;'>";
|
|
|
2501 |
$gadget .= icone_horizontale(_T('icone_nouvelle_breve'), "breves_edit.php3?new=oui$dans_rub", "breve-24.gif","creer.gif", false);
|
|
|
2502 |
$gadget .= "</div>";
|
|
|
2503 |
}
|
|
|
2504 |
|
|
|
2505 |
if (lire_meta("activer_sites") == 'oui') {
|
|
|
2506 |
if ($connect_statut == '0minirezo' OR lire_meta("proposer_sites") > 0) {
|
|
|
2507 |
$gadget .= "<div style='width: 140px; float: $spip_lang_left;'>";
|
|
|
2508 |
$gadget .= icone_horizontale(_T('info_sites_referencer'), "sites_edit.php3?new=oui&target=sites.php3$dans_rub", "site-24.gif","creer.gif", false);
|
|
|
2509 |
$gadget .= "</div>";
|
|
|
2510 |
}
|
|
|
2511 |
}
|
|
|
2512 |
|
|
|
2513 |
}
|
|
|
2514 |
|
|
|
2515 |
$gadget .= "</div>";
|
|
|
2516 |
|
|
|
2517 |
echo afficher_javascript($gadget);
|
|
|
2518 |
// FIN GADGET Navigation rapide
|
|
|
2519 |
|
|
|
2520 |
|
|
|
2521 |
// GADGET Recherche
|
|
|
2522 |
echo "<div id='bandeaurecherche' class='bandeau_couleur_sous' style='width: 100px; $spip_lang_left: 60px;'>";
|
|
|
2523 |
global $recherche;
|
|
|
2524 |
$recherche_aff = _T('info_rechercher');
|
|
|
2525 |
$onfocus = "onfocus=this.value='';";
|
|
|
2526 |
echo "<form method='get' style='margin: 0px;' action='recherche.php3'>";
|
|
|
2527 |
echo '<input type="text" size="10" value="'.$recherche_aff.'" name="recherche" class="formo" accesskey="r" '.$onfocus.'>';
|
|
|
2528 |
echo "</form>";
|
|
|
2529 |
echo "</div>";
|
|
|
2530 |
// FIN GADGET recherche
|
|
|
2531 |
|
|
|
2532 |
|
|
|
2533 |
// GADGET Agenda
|
|
|
2534 |
$gadget = '';
|
|
|
2535 |
$today = getdate(time());
|
|
|
2536 |
$jour_today = $today["mday"];
|
|
|
2537 |
$mois_today = $today["mon"];
|
|
|
2538 |
$annee_today = $today["year"];
|
|
|
2539 |
$date = date("Y-m-d", mktime(0,0,0,$mois_today, 1, $annee_today));
|
|
|
2540 |
$mois = mois($date);
|
|
|
2541 |
$annee = annee($date);
|
|
|
2542 |
$jour = jour($date);
|
|
|
2543 |
|
|
|
2544 |
// Taches (ne calculer que la valeur booleenne...)
|
|
|
2545 |
if (spip_num_rows(spip_query("SELECT type FROM spip_messages AS messages WHERE id_auteur=$connect_id_auteur AND statut='publie' AND type='pb' AND rv!='oui' LIMIT 0,1")) OR
|
|
|
2546 |
spip_num_rows(spip_query("SELECT type 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 LIMIT 0,1"))) {
|
|
|
2547 |
$largeur = "410px";
|
|
|
2548 |
$afficher_cal = true;
|
|
|
2549 |
}
|
|
|
2550 |
else {
|
|
|
2551 |
$largeur = "200px";
|
|
|
2552 |
$afficher_cal = false;
|
|
|
2553 |
}
|
|
|
2554 |
|
|
|
2555 |
|
|
|
2556 |
|
|
|
2557 |
// Calendrier
|
|
|
2558 |
$gadget .= "<div id='bandeauagenda' class='bandeau_couleur_sous' style='width: $largeur; $spip_lang_left: 100px;'>";
|
|
|
2559 |
$gadget .= "<a href='calendrier.php3?type=semaine' class='lien_sous'>";
|
|
|
2560 |
$gadget .= _T('icone_agenda');
|
|
|
2561 |
$gadget .= "</a>";
|
|
|
2562 |
|
|
|
2563 |
$gadget .= "<table><tr>";
|
|
|
2564 |
$gadget .= "<td valign='top' width='200'>";
|
|
|
2565 |
$gadget .= "<div>";
|
|
|
2566 |
$gadget .= http_calendrier_agenda($annee_today, $mois_today, $jour_today, $mois_today, $annee_today, false, 'calendrier.php3');
|
|
|
2567 |
$gadget .= "</div>";
|
|
|
2568 |
$gadget .= "</td>";
|
|
|
2569 |
if ($afficher_cal) {
|
|
|
2570 |
$gadget .= "<td valign='top' width='10'> </td>";
|
|
|
2571 |
$gadget .= "<td valign='top' width='200'>";
|
|
|
2572 |
$gadget .= "<div> </div>";
|
|
|
2573 |
$gadget .= "<div style='color: black;'>";
|
|
|
2574 |
$gadget .= http_calendrier_rv(sql_calendrier_taches_annonces(),"annonces");
|
|
|
2575 |
$gadget .= http_calendrier_rv(sql_calendrier_taches_pb(),"pb");
|
|
|
2576 |
$gadget .= http_calendrier_rv(sql_calendrier_taches_rv(), "rv");
|
|
|
2577 |
$gadget .= "</div>";
|
|
|
2578 |
$gadget .= "</td>";
|
|
|
2579 |
}
|
|
|
2580 |
|
|
|
2581 |
$gadget .= "</tr></table>";
|
|
|
2582 |
$gadget .= "</div>";
|
|
|
2583 |
echo afficher_javascript($gadget);
|
|
|
2584 |
// FIN GADGET Agenda
|
|
|
2585 |
|
|
|
2586 |
|
|
|
2587 |
// GADGET Messagerie
|
|
|
2588 |
$gadget = '';
|
|
|
2589 |
$gadget .= "<div id='bandeaumessagerie' class='bandeau_couleur_sous' style='$spip_lang_left: 130px; width: 200px;'>";
|
|
|
2590 |
$gadget .= "<a href='messagerie.php3' class='lien_sous'>";
|
|
|
2591 |
$gadget .= _T('icone_messagerie_personnelle');
|
|
|
2592 |
$gadget .= "</a>";
|
|
|
2593 |
|
|
|
2594 |
$gadget .= "<div> </div>";
|
|
|
2595 |
$gadget .= icone_horizontale(_T('lien_nouvea_pense_bete'),"message_edit.php3?new=oui&type=pb", "pense-bete.gif", '', false);
|
|
|
2596 |
$gadget .= icone_horizontale(_T('lien_nouveau_message'),"message_edit.php3?new=oui&type=normal", "message.gif", '', false);
|
|
|
2597 |
if ($connect_statut == "0minirezo") {
|
|
|
2598 |
$gadget .= icone_horizontale(_T('lien_nouvelle_annonce'),"message_edit.php3?new=oui&type=affich", "annonce.gif", '', false);
|
|
|
2599 |
}
|
|
|
2600 |
$gadget .= "</div>";
|
|
|
2601 |
|
|
|
2602 |
echo afficher_javascript($gadget);
|
|
|
2603 |
|
|
|
2604 |
// FIN GADGET Messagerie
|
|
|
2605 |
|
|
|
2606 |
|
|
|
2607 |
// Suivi activite
|
|
|
2608 |
echo "<div id='bandeausynchro' class='bandeau_couleur_sous' style='$spip_lang_left: 160px;'>";
|
|
|
2609 |
echo "<a href='synchro.php3' class='lien_sous'>";
|
|
|
2610 |
echo _T('icone_suivi_activite');
|
|
|
2611 |
echo "</a>";
|
|
|
2612 |
echo "</div>";
|
|
|
2613 |
|
|
|
2614 |
// Infos perso
|
|
|
2615 |
echo "<div id='bandeauinfoperso' class='bandeau_couleur_sous' style='width: 200px; $spip_lang_left: 200px;'>";
|
|
|
2616 |
echo "<a href='auteurs_edit.php3?id_auteur=$connect_id_auteur' class='lien_sous'>";
|
|
|
2617 |
echo _T('icone_informations_personnelles');
|
|
|
2618 |
echo "</a>";
|
|
|
2619 |
echo "</div>";
|
|
|
2620 |
|
|
|
2621 |
|
|
|
2622 |
//
|
|
|
2623 |
// -------- Affichage de droite ----------
|
|
|
2624 |
|
|
|
2625 |
// Deconnection
|
|
|
2626 |
echo "<div class='bandeau_couleur_sous' id='bandeaudeconnecter' style='$spip_lang_right: 0px;'>";
|
|
|
2627 |
echo "<a href='../spip_cookie.php3?logout=$connect_login' class='lien_sous'>"._T('icone_deconnecter')."</a>".aide("deconnect");
|
|
|
2628 |
echo "</div>";
|
|
|
2629 |
|
|
|
2630 |
$decal = 0;
|
|
|
2631 |
$decal = $decal + 150;
|
|
|
2632 |
|
|
|
2633 |
echo "<div id='bandeauinterface' class='bandeau_couleur_sous' style='$spip_lang_right: ".$decal."px; text-align: $spip_lang_right;'>";
|
|
|
2634 |
echo _T('titre_changer_couleur_interface');
|
|
|
2635 |
echo "</div>";
|
|
|
2636 |
|
|
|
2637 |
$decal = $decal + 70;
|
|
|
2638 |
|
|
|
2639 |
echo "<div id='bandeauecran' class='bandeau_couleur_sous' style='width: 200px; $spip_lang_right: ".$decal."px; text-align: $spip_lang_right;'>";
|
|
|
2640 |
echo $ecran;
|
|
|
2641 |
echo "</div>";
|
|
|
2642 |
|
|
|
2643 |
$decal = $decal + 110;
|
|
|
2644 |
|
|
|
2645 |
// En interface simplifiee, afficher un permanence l'indication de l'interface
|
|
|
2646 |
if ($options != "avancees") {
|
|
|
2647 |
echo "<div id='displayfond' class='bandeau_couleur_sous' style='$spip_lang_right: ".$decal."px; text-align: $spip_lang_right; visibility: visible; background-color: white; color: $couleur_foncee; z-index: -1000; border: 1px solid $couleur_claire; border-top: 0px;'>";
|
|
|
2648 |
echo "<b>"._T('icone_interface_simple')."</b>";
|
|
|
2649 |
echo "</div>";
|
|
|
2650 |
}
|
|
|
2651 |
echo "<div id='bandeaudisplay' class='bandeau_couleur_sous' style='$spip_lang_right: ".$decal."px; text-align: $spip_lang_right;'>";
|
|
|
2652 |
echo $simple;
|
|
|
2653 |
|
|
|
2654 |
if ($options != "avancees") {
|
|
|
2655 |
echo "<div> </div><div style='width: 250px; text-align: $spip_lang_left;'>"._T('texte_actualite_site_1')."<a href='index.php3?&set_options=avancees'>"._T('texte_actualite_site_2')."</a>"._T('texte_actualite_site_3')."</div>";
|
|
|
2656 |
}
|
|
|
2657 |
|
|
|
2658 |
echo "</div>";
|
|
|
2659 |
|
|
|
2660 |
|
|
|
2661 |
echo "</div>";
|
|
|
2662 |
echo "</td></tr></table>";
|
|
|
2663 |
|
|
|
2664 |
echo "</div>";
|
|
|
2665 |
echo "</div>";
|
|
|
2666 |
|
|
|
2667 |
if ($options != "avancees") echo "<div style='height: 18px;'> </div>";
|
|
|
2668 |
|
|
|
2669 |
}
|
|
|
2670 |
|
|
|
2671 |
// Ouverture de la partie "principale" de la page
|
|
|
2672 |
// Petite verif pour ne pas fermer le formulaire de recherche pendant qu'on l'edite
|
|
|
2673 |
echo "<center onMouseOver=\"if (findObj('bandeaurecherche').style.visibility == 'visible') { ouvrir_recherche = true; } else { ouvrir_recherche = false; } changestyle('bandeauvide', 'visibility', 'hidden'); if (ouvrir_recherche == true) { changestyle('bandeaurecherche','visibility','visible'); }\">";
|
|
|
2674 |
|
|
|
2675 |
$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");
|
|
|
2676 |
$total_messages = @spip_num_rows($result_messages);
|
|
|
2677 |
if ($total_messages == 1) {
|
|
|
2678 |
while($row = @spip_fetch_array($result_messages)) {
|
|
|
2679 |
$ze_message=$row['id_message'];
|
|
|
2680 |
echo "<div class='messages'><a href='message.php3?id_message=$ze_message'><font color='$couleur_foncee'>"._T('info_nouveau_message')."</font></a></div>";
|
|
|
2681 |
}
|
|
|
2682 |
}
|
|
|
2683 |
if ($total_messages > 1) echo "<div class='messages'><a href='messagerie.php3'><font color='$couleur_foncee'>"._T('info_nouveaux_messages', array('total_messages' => $total_messages))."</font></a></div>";
|
|
|
2684 |
|
|
|
2685 |
|
|
|
2686 |
// Afficher les auteurs recemment connectes
|
|
|
2687 |
|
|
|
2688 |
global $changer_config;
|
|
|
2689 |
global $activer_messagerie;
|
|
|
2690 |
global $activer_imessage;
|
|
|
2691 |
global $connect_activer_messagerie;
|
|
|
2692 |
global $connect_activer_imessage;
|
|
|
2693 |
|
|
|
2694 |
if ($changer_config!="oui"){
|
|
|
2695 |
$activer_messagerie = "oui";
|
|
|
2696 |
$activer_imessage = "oui";
|
|
|
2697 |
}
|
|
|
2698 |
|
|
|
2699 |
if ($activer_imessage != "non" AND ($connect_activer_imessage != "non" OR $connect_statut == "0minirezo")) {
|
|
|
2700 |
$query2 = "SELECT id_auteur, nom FROM spip_auteurs WHERE id_auteur!=$connect_id_auteur AND imessage!='non' AND en_ligne>DATE_SUB(NOW(),INTERVAL 15 MINUTE)";
|
|
|
2701 |
$result_auteurs = spip_query($query2);
|
|
|
2702 |
$nb_connectes = spip_num_rows($result_auteurs);
|
|
|
2703 |
}
|
|
|
2704 |
|
|
|
2705 |
$flag_cadre = (($nb_connectes > 0) OR $rubrique == "messagerie");
|
|
|
2706 |
if ($flag_cadre) echo "<div class='messages' style='color: #666666;'>";
|
|
|
2707 |
|
|
|
2708 |
|
|
|
2709 |
if ($nb_connectes > 0) {
|
|
|
2710 |
if ($nb_connectes > 0) {
|
|
|
2711 |
echo "<b>"._T('info_en_ligne')."</b>";
|
|
|
2712 |
while ($row = spip_fetch_array($result_auteurs)) {
|
|
|
2713 |
$id_auteur = $row["id_auteur"];
|
|
|
2714 |
$nom_auteur = typo($row["nom"]);
|
|
|
2715 |
echo " ".bouton_imessage($id_auteur,$row)." <a href='auteurs_edit.php3?id_auteur=$id_auteur' style='color: #666666;'>$nom_auteur</a>";
|
|
|
2716 |
}
|
|
|
2717 |
}
|
|
|
2718 |
}
|
|
|
2719 |
if ($flag_cadre) echo "</div>";
|
|
|
2720 |
}
|
|
|
2721 |
|
|
|
2722 |
|
|
|
2723 |
function gros_titre($titre, $ze_logo=''){
|
|
|
2724 |
global $couleur_foncee, $spip_display;
|
|
|
2725 |
if ($spip_display == 4) {
|
|
|
2726 |
echo "\n<h1>".typo($titre)."</h1> \n";
|
|
|
2727 |
}
|
|
|
2728 |
else {
|
|
|
2729 |
echo "<div class='verdana2' style='font-size: 18px; color: $couleur_foncee; font-weight: bold;'>";
|
|
|
2730 |
if (strlen($ze_logo) > 3) echo http_img_pack("$ze_logo", "", "border=0 align='middle'") . " ";
|
|
|
2731 |
echo typo($titre);
|
|
|
2732 |
echo "</div>\n";
|
|
|
2733 |
}
|
|
|
2734 |
}
|
|
|
2735 |
|
|
|
2736 |
|
|
|
2737 |
//
|
|
|
2738 |
// Cadre centre (haut de page)
|
|
|
2739 |
//
|
|
|
2740 |
|
|
|
2741 |
function debut_grand_cadre(){
|
|
|
2742 |
global $spip_ecran;
|
|
|
2743 |
|
|
|
2744 |
if ($spip_ecran == "large") $largeur = 974;
|
|
|
2745 |
else $largeur = 750;
|
|
|
2746 |
echo "\n<br><br><table width='$largeur' cellpadding='0' cellspacing='0' border='0'>";
|
|
|
2747 |
echo "\n<tr>";
|
|
|
2748 |
echo "<td width='$largeur' class='serif'>";
|
|
|
2749 |
|
|
|
2750 |
}
|
|
|
2751 |
|
|
|
2752 |
function fin_grand_cadre(){
|
|
|
2753 |
echo "\n</td></tr></table>";
|
|
|
2754 |
}
|
|
|
2755 |
|
|
|
2756 |
// Cadre formulaires
|
|
|
2757 |
|
|
|
2758 |
function debut_cadre_formulaire($style=''){
|
|
|
2759 |
echo "\n<div class='cadre-formulaire'" .
|
|
|
2760 |
(!$style ? "" : "style='$style'") .
|
|
|
2761 |
">";
|
|
|
2762 |
}
|
|
|
2763 |
|
|
|
2764 |
function fin_cadre_formulaire(){
|
|
|
2765 |
echo "</div>\n";
|
|
|
2766 |
}
|
|
|
2767 |
|
|
|
2768 |
|
|
|
2769 |
|
|
|
2770 |
//
|
|
|
2771 |
// Debut de la colonne de gauche
|
|
|
2772 |
//
|
|
|
2773 |
|
|
|
2774 |
function debut_gauche($rubrique = "asuivre") {
|
|
|
2775 |
global $connect_statut, $cookie_admin;
|
|
|
2776 |
global $options, $spip_display;
|
|
|
2777 |
global $connect_id_auteur;
|
|
|
2778 |
global $spip_ecran;
|
|
|
2779 |
global $flag_3_colonnes, $flag_centre_large;
|
|
|
2780 |
global $spip_lang_rtl;
|
|
|
2781 |
|
|
|
2782 |
$flag_3_colonnes = false;
|
|
|
2783 |
$largeur = 200;
|
|
|
2784 |
|
|
|
2785 |
// Ecran panoramique ?
|
|
|
2786 |
if ($spip_ecran == "large") {
|
|
|
2787 |
$largeur_ecran = 974;
|
|
|
2788 |
|
|
|
2789 |
// Si edition de texte, formulaires larges
|
|
|
2790 |
if (ereg('((articles|breves|rubriques)_edit|forum_envoi)\.php3', $GLOBALS['REQUEST_URI'])) {
|
|
|
2791 |
$flag_centre_large = true;
|
|
|
2792 |
}
|
|
|
2793 |
|
|
|
2794 |
$flag_3_colonnes = true;
|
|
|
2795 |
$rspan = " rowspan=2";
|
|
|
2796 |
|
|
|
2797 |
}
|
|
|
2798 |
else {
|
|
|
2799 |
$largeur_ecran = 750;
|
|
|
2800 |
}
|
|
|
2801 |
|
|
|
2802 |
echo "<br><table width='$largeur_ecran' cellpadding=0 cellspacing=0 border=0>
|
|
|
2803 |
<tr><td width='$largeur' class='colonne_etroite' valign='top' class='serif' $rspan>
|
|
|
2804 |
<div style='width: ${largeur}px;'>
|
|
|
2805 |
\n";
|
|
|
2806 |
|
|
|
2807 |
if ($spip_display == 4) echo "<!-- ";
|
|
|
2808 |
|
|
|
2809 |
}
|
|
|
2810 |
|
|
|
2811 |
|
|
|
2812 |
//
|
|
|
2813 |
// Presentation de l''interface privee, marge de droite
|
|
|
2814 |
//
|
|
|
2815 |
|
|
|
2816 |
function creer_colonne_droite($rubrique=""){
|
|
|
2817 |
global $deja_colonne_droite;
|
|
|
2818 |
global $changer_config;
|
|
|
2819 |
global $activer_messagerie;
|
|
|
2820 |
global $activer_imessage;
|
|
|
2821 |
global $connect_activer_messagerie;
|
|
|
2822 |
global $connect_activer_imessage;
|
|
|
2823 |
global $connect_statut, $cookie_admin;
|
|
|
2824 |
global $options;
|
|
|
2825 |
global $connect_id_auteur, $spip_ecran;
|
|
|
2826 |
global $flag_3_colonnes, $flag_centre_large;
|
|
|
2827 |
global $spip_lang_rtl, $lang_left;
|
|
|
2828 |
|
|
|
2829 |
if ($flag_3_colonnes AND !$deja_colonne_droite) {
|
|
|
2830 |
$deja_colonne_droite = true;
|
|
|
2831 |
|
|
|
2832 |
if ($flag_centre_large) {
|
|
|
2833 |
$espacement = 17;
|
|
|
2834 |
$largeur = 140;
|
|
|
2835 |
}
|
|
|
2836 |
else {
|
|
|
2837 |
$espacement = 37;
|
|
|
2838 |
$largeur = 200;
|
|
|
2839 |
}
|
|
|
2840 |
|
|
|
2841 |
|
|
|
2842 |
echo "<td width=$espacement rowspan=2 class='colonne_etroite'> </td>";
|
|
|
2843 |
echo "<td rowspan=1 class='colonne_etroite'></td>";
|
|
|
2844 |
echo "<td width=$espacement rowspan=2 class='colonne_etroite'> </td>";
|
|
|
2845 |
echo "<td width=$largeur rowspan=2 align='$lang_left' valign='top' class='colonne_etroite'><p />";
|
|
|
2846 |
|
|
|
2847 |
}
|
|
|
2848 |
|
|
|
2849 |
}
|
|
|
2850 |
|
|
|
2851 |
function debut_droite($rubrique="") {
|
|
|
2852 |
global $options, $spip_ecran, $deja_colonne_droite, $spip_display;
|
|
|
2853 |
global $connect_id_auteur, $connect_statut, $connect_toutes_rubriques;
|
|
|
2854 |
global $flag_3_colonnes, $flag_centre_large, $couleur_foncee, $couleur_claire;
|
|
|
2855 |
global $lang_left;
|
|
|
2856 |
|
|
|
2857 |
if ($spip_display == 4) echo " -->";
|
|
|
2858 |
|
|
|
2859 |
echo "</div>\n"; # largeur fixe, cf. debut_gauche
|
|
|
2860 |
|
|
|
2861 |
if ($options == "avancees") {
|
|
|
2862 |
// liste des articles bloques
|
|
|
2863 |
if (lire_meta("articles_modif") != "non") {
|
|
|
2864 |
$query = "SELECT id_article, titre FROM spip_articles WHERE auteur_modif = '$connect_id_auteur' AND date_modif > DATE_SUB(NOW(), INTERVAL 1 HOUR) ORDER BY date_modif DESC";
|
|
|
2865 |
$result = spip_query($query);
|
|
|
2866 |
$num_articles_ouverts = spip_num_rows($result);
|
|
|
2867 |
if ($num_articles_ouverts) {
|
|
|
2868 |
echo "<p>";
|
|
|
2869 |
debut_cadre_enfonce('article-24.gif');
|
|
|
2870 |
//echo "<font face='Verdana,Arial,Sans,sans-serif' size='2'>";
|
|
|
2871 |
echo "<div class='verdana2' style='padding: 2px; background-color:$couleur_foncee; color: white; font-weight: bold;'>";
|
|
|
2872 |
echo _T('info_cours_edition')." :".aide('artmodif');
|
|
|
2873 |
echo "</div>";
|
|
|
2874 |
while ($row = @spip_fetch_array($result)) {
|
|
|
2875 |
$ze_article = $row['id_article'];
|
|
|
2876 |
$ze_titre = typo($row['titre']);
|
|
|
2877 |
|
|
|
2878 |
|
|
|
2879 |
if ($ifond == 1) {
|
|
|
2880 |
$couleur = $couleur_claire;
|
|
|
2881 |
$ifond = 0;
|
|
|
2882 |
} else {
|
|
|
2883 |
$couleur = "#eeeeee";
|
|
|
2884 |
$ifond = 1;
|
|
|
2885 |
}
|
|
|
2886 |
|
|
|
2887 |
echo "<div style='padding: 3px; background-color: $couleur;'>";
|
|
|
2888 |
echo "<div class='verdana1'><b><a href='articles.php3?id_article=$ze_article'>$ze_titre</a></div></b>";
|
|
|
2889 |
|
|
|
2890 |
// ne pas proposer de debloquer si c'est l'article en cours d'edition
|
|
|
2891 |
if ($ze_article != $GLOBALS['id_article_bloque']) {
|
|
|
2892 |
$nb_liberer ++;
|
|
|
2893 |
$lien = new Link;
|
|
|
2894 |
$lien->addVar('debloquer_article', $ze_article);
|
|
|
2895 |
echo "<div class='arial1' style='text-align:right;'><a href='". $lien->getUrl() ."' title='"._T('lien_liberer')."'>"._T('lien_liberer')." " .
|
|
|
2896 |
http_img_pack("croix-rouge.gif", "X", "width='7' height='7' border='0' align='middle'") . "</a></div>";
|
|
|
2897 |
}
|
|
|
2898 |
|
|
|
2899 |
echo "</div>";
|
|
|
2900 |
}
|
|
|
2901 |
if ($nb_liberer >= 4) {
|
|
|
2902 |
$lien = new Link;
|
|
|
2903 |
$lien->addVar('debloquer_article', 'tous');
|
|
|
2904 |
echo "<div class='arial2' style='text-align:right; padding:2px; border-top: 1px solid $couleur_foncee;'><a href='". $lien->getUrl() ."'>"._T('lien_liberer_tous')." " .
|
|
|
2905 |
http_img_pack("croix-rouge.gif", "", "width='7' height='7' border='0' align='middle'") ."</a></div>";
|
|
|
2906 |
}
|
|
|
2907 |
//echo "</font>";
|
|
|
2908 |
fin_cadre_enfonce();
|
|
|
2909 |
}
|
|
|
2910 |
}
|
|
|
2911 |
|
|
|
2912 |
if (!$deja_colonne_droite) creer_colonne_droite($rubrique);
|
|
|
2913 |
}
|
|
|
2914 |
|
|
|
2915 |
echo "<div> </div></td>";
|
|
|
2916 |
|
|
|
2917 |
if (!$flag_3_colonnes) {
|
|
|
2918 |
echo "<td width=50> </td>";
|
|
|
2919 |
}
|
|
|
2920 |
else {
|
|
|
2921 |
if (!$deja_colonne_droite) {
|
|
|
2922 |
creer_colonne_droite($rubrique);
|
|
|
2923 |
}
|
|
|
2924 |
echo "</td></tr><tr>";
|
|
|
2925 |
}
|
|
|
2926 |
|
|
|
2927 |
if ($spip_ecran == 'large' AND $flag_centre_large)
|
|
|
2928 |
$largeur = 600;
|
|
|
2929 |
else
|
|
|
2930 |
$largeur = 500;
|
|
|
2931 |
|
|
|
2932 |
echo '<td width="'.$largeur.'" valign="top" align="'.$lang_left.'" rowspan="1" class="serif">';
|
|
|
2933 |
|
|
|
2934 |
// touche d'acces rapide au debut du contenu
|
|
|
2935 |
echo "\n<a name='saut' href='#saut' accesskey='s'></a>\n";
|
|
|
2936 |
}
|
|
|
2937 |
|
|
|
2938 |
|
|
|
2939 |
//
|
|
|
2940 |
// Presentation de l'interface privee, fin de page et flush()
|
|
|
2941 |
//
|
|
|
2942 |
|
|
|
2943 |
function fin_html() {
|
|
|
2944 |
|
|
|
2945 |
echo "</font>";
|
|
|
2946 |
|
|
|
2947 |
// rejouer le cookie de session si l'IP a change
|
|
|
2948 |
if ($GLOBALS['spip_session'] && $GLOBALS['auteur_session']['ip_change']) {
|
|
|
2949 |
echo
|
|
|
2950 |
http_img_pack('rien.gif', " ", "name='img_session' width='0' height='0'"),
|
|
|
2951 |
http_script("
|
|
|
2952 |
document.img_session.src='../spip_cookie.php3?change_session=oui'");
|
|
|
2953 |
}
|
|
|
2954 |
|
|
|
2955 |
echo "</body></html>\n";
|
|
|
2956 |
|
|
|
2957 |
}
|
|
|
2958 |
|
|
|
2959 |
function info_copyright() {
|
|
|
2960 |
global $spip_version_affichee;
|
|
|
2961 |
|
|
|
2962 |
echo _T('info_copyright',
|
|
|
2963 |
array('spip' => "<b>SPIP $spip_version_affichee</b> ",
|
|
|
2964 |
'lien_gpl' =>
|
|
|
2965 |
"<a href='aide_index.php3?aide=licence&var_lang=".$GLOBALS['spip_lang']."' target='spip_aide' onClick=\"javascript:window.open(this.href, 'aide_spip', 'scrollbars=yes,resizable=yes,width=740,height=580'); return false;\">" . _T('info_copyright_gpl')."</a>"));
|
|
|
2966 |
|
|
|
2967 |
}
|
|
|
2968 |
|
|
|
2969 |
function fin_page($credits='') {
|
|
|
2970 |
global $spip_display;
|
|
|
2971 |
|
|
|
2972 |
echo "</td></tr></table>";
|
|
|
2973 |
|
|
|
2974 |
debut_grand_cadre();
|
|
|
2975 |
|
|
|
2976 |
# ici on en profite pour glisser une tache de fond
|
|
|
2977 |
echo "<div align='right' class='verdana2' ";
|
|
|
2978 |
echo "style='background: url(\"../spip_background.php3\");' ";
|
|
|
2979 |
echo ">";
|
|
|
2980 |
|
|
|
2981 |
if ($spip_display == 4) {
|
|
|
2982 |
echo "<div><a href=\"index.php3?set_disp=2\">"._T("access_interface_graphique")."</a></div>";
|
|
|
2983 |
} else {
|
|
|
2984 |
echo info_copyright();
|
|
|
2985 |
echo "<br>"._T('info_copyright_doc');
|
|
|
2986 |
echo "</div><p>";
|
|
|
2987 |
}
|
|
|
2988 |
|
|
|
2989 |
fin_grand_cadre();
|
|
|
2990 |
echo "</center>";
|
|
|
2991 |
|
|
|
2992 |
fin_html();
|
|
|
2993 |
}
|
|
|
2994 |
|
|
|
2995 |
|
|
|
2996 |
//
|
|
|
2997 |
// Afficher la hierarchie des rubriques
|
|
|
2998 |
//
|
|
|
2999 |
|
|
|
3000 |
function afficher_hierarchie($id_rubrique, $parents="") {
|
|
|
3001 |
global $couleur_foncee, $spip_lang_left, $lang_dir;
|
|
|
3002 |
|
|
|
3003 |
if ($id_rubrique) {
|
|
|
3004 |
$query = "SELECT id_rubrique, id_parent, titre, lang FROM spip_rubriques WHERE id_rubrique=$id_rubrique";
|
|
|
3005 |
$result = spip_query($query);
|
|
|
3006 |
|
|
|
3007 |
while ($row = spip_fetch_array($result)) {
|
|
|
3008 |
$id_rubrique = $row['id_rubrique'];
|
|
|
3009 |
$id_parent = $row['id_parent'];
|
|
|
3010 |
$titre = $row['titre'];
|
|
|
3011 |
changer_typo($row['lang']);
|
|
|
3012 |
|
|
|
3013 |
if (acces_restreint_rubrique($id_rubrique))
|
|
|
3014 |
$logo = "admin-12.gif";
|
|
|
3015 |
if (!$id_parent)
|
|
|
3016 |
$logo = "secteur-12.gif";
|
|
|
3017 |
else
|
|
|
3018 |
$logo = "rubrique-12.gif";
|
|
|
3019 |
|
|
|
3020 |
|
|
|
3021 |
$parents = "<div class='verdana3' ".
|
|
|
3022 |
http_style_background($logo, "$spip_lang_left center no-repeat; padding-$spip_lang_left: 15px").
|
|
|
3023 |
"><a href='naviguer.php3?id_rubrique=$id_rubrique'>".typo($titre)."</a></div>\n<div style='margin-$spip_lang_left: 15px;'>".$parents."</div>";
|
|
|
3024 |
|
|
|
3025 |
|
|
|
3026 |
}
|
|
|
3027 |
afficher_hierarchie($id_parent, $parents);
|
|
|
3028 |
}
|
|
|
3029 |
else {
|
|
|
3030 |
$logo = "racine-site-12.gif";
|
|
|
3031 |
$parents = "<div class='verdana3' " .
|
|
|
3032 |
http_style_background($logo, "$spip_lang_left center no-repeat; padding-$spip_lang_left: 15px").
|
|
|
3033 |
"><a href='naviguer.php3?id_rubrique=$id_rubrique'><b>"._T('lien_racine_site')."</b></a>".aide ("rubhier")."</div>\n<div style='margin-$spip_lang_left: 15px;'>".$parents."</div>";
|
|
|
3034 |
|
|
|
3035 |
echo $parents;
|
|
|
3036 |
|
|
|
3037 |
}
|
|
|
3038 |
}
|
|
|
3039 |
|
|
|
3040 |
// Pour construire des menu avec SELECTED
|
|
|
3041 |
function mySel($varaut,$variable, $option = NULL) {
|
|
|
3042 |
if (!isset($option))
|
|
|
3043 |
return ' value="'.$varaut.'"'
|
|
|
3044 |
. (($variable==$varaut) ? ' selected' : '');
|
|
|
3045 |
|
|
|
3046 |
return "<option value='$varaut'"
|
|
|
3047 |
. (($variable==$varaut) ? ' selected' : '')
|
|
|
3048 |
. ">$option\n";
|
|
|
3049 |
}
|
|
|
3050 |
|
|
|
3051 |
|
|
|
3052 |
//
|
|
|
3053 |
// Presentation des pages d'installation et d'erreurs
|
|
|
3054 |
//
|
|
|
3055 |
|
|
|
3056 |
function install_debut_html($titre = 'AUTO') {
|
|
|
3057 |
global $spip_lang_rtl;
|
|
|
3058 |
|
|
|
3059 |
if ($titre=='AUTO')
|
|
|
3060 |
$titre=_T('info_installation_systeme_publication');
|
|
|
3061 |
|
|
|
3062 |
echo debut_entete($titre),
|
|
|
3063 |
"<meta http-equiv='Expires' content='0'>
|
|
|
3064 |
<meta http-equiv='cache-control' content='no-cache,no-store'>
|
|
|
3065 |
<meta http-equiv='pragma' content='no-cache'>
|
|
|
3066 |
<style type='text/css'>
|
|
|
3067 |
<!--
|
|
|
3068 |
a {text-decoration: none; }
|
|
|
3069 |
A:Hover {color:#FF9900; text-decoration: underline;}
|
|
|
3070 |
.forml {width: 100%; background-color: #FFCC66; background-position: center bottom; float: none; color: #000000}
|
|
|
3071 |
.formo {width: 100%; background-color: #FFF0E0; background-position: center bottom; weight: bold; float: none; color: #000000}
|
|
|
3072 |
.fondl {background-color: #FFCC66; background-position: center bottom; float: none; color: #000000}
|
|
|
3073 |
.fondo {background-color: #FFF0E0; background-position: center bottom; float: none; color: #000000}
|
|
|
3074 |
.fondf {background-color: #FFFFFF; border-style: solid ; border-width: 1; border-color: #E86519; color: #E86519}
|
|
|
3075 |
.serif { font-family: Georgia, Garamond, Times New Roman, serif; }
|
|
|
3076 |
-->
|
|
|
3077 |
</style>
|
|
|
3078 |
</head>
|
|
|
3079 |
<body bgcolor='#FFFFFF' text='#000000' link='#E86519' vlink='#6E003A' alink='#FF9900'";
|
|
|
3080 |
|
|
|
3081 |
if ($spip_lang_rtl) echo " dir='rtl'";
|
|
|
3082 |
|
|
|
3083 |
echo "><br><br><br>
|
|
|
3084 |
<center>
|
|
|
3085 |
<table width='450'>
|
|
|
3086 |
<tr><td width='450' class='serif'>
|
|
|
3087 |
<font face='Verdana,Arial,Sans,sans-serif' size='4' color='#970038'><B>$titre</b></font>\n<p>";
|
|
|
3088 |
}
|
|
|
3089 |
|
|
|
3090 |
function install_fin_html($suite = '') {
|
|
|
3091 |
|
|
|
3092 |
// bouton retour
|
|
|
3093 |
global $spip_lang_right;
|
|
|
3094 |
if ($suite) {
|
|
|
3095 |
$link = new Link($suite);
|
|
|
3096 |
echo $link->getForm();
|
|
|
3097 |
echo "<DIV align='$spip_lang_right'>"
|
|
|
3098 |
. "<INPUT TYPE='submit' CLASS='fondl' VALUE='"
|
|
|
3099 |
. _T('ecrire:bouton_suivant')." >>'></div>"
|
|
|
3100 |
. "</FORM>";
|
|
|
3101 |
}
|
|
|
3102 |
|
|
|
3103 |
echo '
|
|
|
3104 |
</td></tr></table>
|
|
|
3105 |
</center>
|
|
|
3106 |
</body>
|
|
|
3107 |
</html>
|
|
|
3108 |
';
|
|
|
3109 |
}
|
|
|
3110 |
|
|
|
3111 |
// Voir en ligne, ou apercu, ou rien (renvoie tout le bloc)
|
|
|
3112 |
function voir_en_ligne ($type, $id, $statut=false, $image='racine-24.gif') {
|
|
|
3113 |
global $connect_statut;
|
|
|
3114 |
|
|
|
3115 |
switch ($type) {
|
|
|
3116 |
case 'article':
|
|
|
3117 |
if ($statut == "publie" AND lire_meta("post_dates") == 'non'
|
|
|
3118 |
AND !spip_fetch_array(spip_query("SELECT id_article
|
|
|
3119 |
FROM spip_articles WHERE id_article=$id AND date<=NOW()")))
|
|
|
3120 |
$statut = 'prop';
|
|
|
3121 |
if ($statut == 'publie')
|
|
|
3122 |
$en_ligne = 'calcul';
|
|
|
3123 |
else if ($statut == 'prop')
|
|
|
3124 |
$en_ligne = 'preview';
|
|
|
3125 |
break;
|
|
|
3126 |
case 'rubrique':
|
|
|
3127 |
if ($id > 0)
|
|
|
3128 |
if ($statut == 'publie')
|
|
|
3129 |
$en_ligne = 'calcul';
|
|
|
3130 |
else
|
|
|
3131 |
$en_ligne = 'preview';
|
|
|
3132 |
break;
|
|
|
3133 |
case 'breve':
|
|
|
3134 |
case 'auteur':
|
|
|
3135 |
case 'site':
|
|
|
3136 |
if ($statut == 'publie')
|
|
|
3137 |
$en_ligne = 'calcul';
|
|
|
3138 |
else if ($statut == 'prop')
|
|
|
3139 |
$en_ligne = 'preview';
|
|
|
3140 |
break;
|
|
|
3141 |
case 'mot':
|
|
|
3142 |
$en_ligne = 'calcul';
|
|
|
3143 |
break;
|
|
|
3144 |
}
|
|
|
3145 |
|
|
|
3146 |
if ($en_ligne == 'calcul')
|
|
|
3147 |
$message = _T('icone_voir_en_ligne');
|
|
|
3148 |
else if ($en_ligne == 'preview') {
|
|
|
3149 |
// est-ce autorise ?
|
|
|
3150 |
if ((lire_meta('preview') == 'oui' AND $connect_statut=='0minirezo')
|
|
|
3151 |
OR (lire_meta('preview') == '1comite'))
|
|
|
3152 |
$message = _T('previsualiser');
|
|
|
3153 |
else
|
|
|
3154 |
$message = '';
|
|
|
3155 |
}
|
|
|
3156 |
|
|
|
3157 |
if ($message)
|
|
|
3158 |
icone_horizontale($message, "../spip_redirect.php3?id_$type=$id&var_mode=$en_ligne", $image, "rien.gif");
|
|
|
3159 |
}
|
|
|
3160 |
|
|
|
3161 |
|
|
|
3162 |
function http_style_background($img, $att='')
|
|
|
3163 |
{
|
|
|
3164 |
return " style='background: url(\"" . _DIR_IMG_PACK . $img . '")' .
|
|
|
3165 |
($att ? (' ' . $att) : '') . ";'";
|
|
|
3166 |
}
|
|
|
3167 |
?>
|