Skip to content
Extraits de code Groupes Projets
Valider c5616e06 rédigé par esj's avatar esj
Parcourir les fichiers

reapparition de l'icone ical dans messagerie; tant qu'à faire je recopie le...

reapparition de l'icone ical dans messagerie; tant qu'à faire je recopie le bout de code plutot que de charger tout inc_calendrier pour si peu; ce dernier va maigrir un peu
parent 37766201
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
\***************************************************************************/ \***************************************************************************/
// ce script peut etre recopie a la racine pour obtenir le calendrier // ce script peut etre recopie a la racine pour obtenir le calendrier
// a partir de l'espace public. // a partir de l'espace public.
// Evidemment les messages internes a la redaction seront absents. // Evidemment les messages internes a la redaction seront absents.
...@@ -26,22 +25,15 @@ if (!_DIR_RESTREINT) ...@@ -26,22 +25,15 @@ if (!_DIR_RESTREINT)
include_ecrire("inc_layer.php3"); include_ecrire("inc_layer.php3");
} }
$today=getdate(time());
$jour_today = $today["mday"];
$mois_today = $today["mon"];
$annee_today = $today["year"];
// sans arguments => mois courant // sans arguments => mois courant
if (!$mois){ if (!$mois){
$jour=$jour_today; $today=getdate(time());
$mois=$mois_today; $jour = $today["mday"];
$annee=$annee_today; $mois = $today["mon"];
} else {if (!isset($jour)) $jour = 1;} $annee = $today["year"];
} else {if (!isset($jour)) {$jour = 1; $type= 'mois';}}
$date = date("Y-m-d", mktime(0,0,0,$mois, $jour, $annee)); $date = date("Y-m-d", mktime(0,0,0,$mois, $jour, $annee));
$jour = journum($date);
$mois = mois($date);
$annee = annee($date);
if (!isset($type)) $type = 'mois'; if (!isset($type)) $type = 'mois';
...@@ -51,21 +43,15 @@ if ($type == 'semaine') { ...@@ -51,21 +43,15 @@ if ($type == 'semaine') {
$afficher_bandeau_calendrier_semaine = true; $afficher_bandeau_calendrier_semaine = true;
$titre = _T('titre_page_calendrier', $titre = _T('titre_page_calendrier',
array('nom_mois' => nom_mois($date), 'annee' => $annee)); array('nom_mois' => nom_mois($date), 'annee' => annee($date)));
} }
elseif ($type == 'jour') { elseif ($type == 'jour') {
$titre = nom_jour("$annee-$mois-$jour")." ". $titre = nom_jour($date)." ". affdate_jourcourt($date);
affdate_jourcourt("$annee-$mois-$jour");
$jour = $jour_today;
$mois = $mois_today;
$annee = $annee_today;
} }
else { else {
$type = 'mois'; $type = 'mois';
$jour = '01';
$titre = _T('titre_page_calendrier', $titre = _T('titre_page_calendrier',
array('nom_mois' => nom_mois($annee . '-' . sprintf("%02d", $mois) . '-01'), array('nom_mois' => nom_mois($date), 'annee' => annee($date)));
'annee' => $annee));
} }
if (!_DIR_RESTREINT) if (!_DIR_RESTREINT)
...@@ -73,8 +59,14 @@ if (!_DIR_RESTREINT) ...@@ -73,8 +59,14 @@ if (!_DIR_RESTREINT)
else debut_html($titre); else debut_html($titre);
$f = 'http_calendrier_init_' . $type; $f = 'http_calendrier_init_' . $type;
echo $f($jour,$mois,$annee, $date, $GLOBALS['PHP_SELF']); echo $f($date, $echelle, $partie_cal, $GLOBALS['PHP_SELF']);
if (!_DIR_RESTREINT) fin_page(); else echo "</body></html>\n"; if (!_DIR_RESTREINT) fin_page(); else echo "</body></html>\n";
// partie_cal est utilisee dans:
// calendrier_navication navi_jour navi_sem
// calendrier_mois calendrier_jour
// calendrier_suite_heures
?> ?>
...@@ -143,7 +143,7 @@ function http_calendrier_ics($evenements, $amj = "") ...@@ -143,7 +143,7 @@ function http_calendrier_ics($evenements, $amj = "")
# affiche un mois en grand, avec des tableau de clics vers d'autres mois # affiche un mois en grand, avec des tableau de clics vers d'autres mois
function http_calendrier_init_mois($premier_jour, $mois, $annee, $date, $script) function http_calendrier_init_mois($date, $echelle, $partie_cal, $script)
{ {
global $spip_lang_left, $largeur_table, $largeur_gauche, $spip_ecran; global $spip_lang_left, $largeur_table, $largeur_gauche, $spip_ecran;
...@@ -155,11 +155,11 @@ function http_calendrier_init_mois($premier_jour, $mois, $annee, $date, $script) ...@@ -155,11 +155,11 @@ function http_calendrier_init_mois($premier_jour, $mois, $annee, $date, $script)
$largeur_table = 730; $largeur_table = 730;
} }
/* $fclic = ((lire_meta("activer_messagerie") == "oui") AND
($GLOBALS["connect_activer_messagerie"] != "non"))?
'http_calendrier_clics' :
'http_calendrier_sans_clics';*/
$fclic = 'http_calendrier_clics'; $fclic = 'http_calendrier_clics';
$premier_jour = '01';
$mois = mois($date);
$annee = annee($date);
$dernier_jour = 31; $dernier_jour = 31;
while (!(checkdate($mois,$dernier_jour,$annee))) $dernier_jour--; while (!(checkdate($mois,$dernier_jour,$annee))) $dernier_jour--;
$today=getdate(time()); $today=getdate(time());
...@@ -182,8 +182,7 @@ function http_calendrier_init_mois($premier_jour, $mois, $annee, $date, $script) ...@@ -182,8 +182,7 @@ function http_calendrier_init_mois($premier_jour, $mois, $annee, $date, $script)
$total = "<div>&nbsp;</div>" . $total = "<div>&nbsp;</div>" .
"<table cellpadding=0 cellspacing=0 border=0 width='$largeur_table'>" . "<table cellpadding=0 cellspacing=0 border=0 width='$largeur_table'>" .
"\n<tr><td width='$largeur_table' valign='top'>" . "\n<tr><td width='$largeur_table' valign='top'>" .
http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, $partie_cal, $echelle, $messages, $fclic);
$GLOBALS['echelle'], $messages, $fclic);
"</td></tr>\n</table>"; "</td></tr>\n</table>";
# messages sans date ? # messages sans date ?
...@@ -214,7 +213,6 @@ function http_calendrier_aide_mess() ...@@ -214,7 +213,6 @@ function http_calendrier_aide_mess()
"</font></td></tr>\n</table>"; "</font></td></tr>\n</table>";
} }
function http_calendrier_retire_args($script, $args) function http_calendrier_retire_args($script, $args)
{ {
foreach($args as $arg) { foreach($args as $arg) {
...@@ -231,7 +229,7 @@ function http_calendrier_retire_args($script, $args) ...@@ -231,7 +229,7 @@ function http_calendrier_retire_args($script, $args)
# 2 fleches appelant le $script sur les periodes $pred/$suiv avec une $ancre # 2 fleches appelant le $script sur les periodes $pred/$suiv avec une $ancre
# et au center le $nom du calendrier # et au center le $nom du calendrier
function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, function http_calendrier_navigation($jour, $mois, $annee, $partie_cal, $echelle, $nom,
$script, $args_pred, $args_suiv, $type, $ancre) $script, $args_pred, $args_suiv, $type, $ancre)
{ {
global $spip_lang_right, $spip_lang_left; global $spip_lang_right, $spip_lang_left;
...@@ -245,13 +243,13 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, ...@@ -245,13 +243,13 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom,
$retour = "<div class='navigation-calendrier'>"; $retour = "<div class='navigation-calendrier'>";
if ($type != "mois") { if ($type != "mois") {
if ($GLOBALS['partie_cal'] == "tout") $img_att = " class='navigation-bouton-desactive'"; if ($partie_cal == "tout") $img_att = " class='navigation-bouton-desactive'";
else $img_att = ""; else $img_att = "";
$retour .= "<span$img_att>" $retour .= "<span$img_att>"
.http_href_img(($script . "type=$type&set_partie_cal=tout&$args"), .http_href_img(($script . "type=$type&set_partie_cal=tout&$args"),
"heures-tout.png", "width='13' height='13' class='format_png'", _T('cal_jour_entier')) . "</span>"; "heures-tout.png", "width='13' height='13' class='format_png'", _T('cal_jour_entier')) . "</span>";
if ($GLOBALS['partie_cal'] == "matin") $img_att = " class='navigation-bouton-desactive'"; if ($partie_cal == "matin") $img_att = " class='navigation-bouton-desactive'";
else $img_att = ""; else $img_att = "";
$retour .= "<span$img_att>" $retour .= "<span$img_att>"
.http_href_img(($script . "type=$type&set_partie_cal=matin&$args"), .http_href_img(($script . "type=$type&set_partie_cal=matin&$args"),
...@@ -260,7 +258,7 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, ...@@ -260,7 +258,7 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom,
_T('cal_matin')) _T('cal_matin'))
. "</span>"; . "</span>";
if ($GLOBALS['partie_cal'] == "soir") $img_att = " class='navigation-bouton-desactive'"; if ($partie_cal == "soir") $img_att = " class='navigation-bouton-desactive'";
else $img_att = ""; else $img_att = "";
$retour .= "<span$img_att>" $retour .= "<span$img_att>"
.http_href_img(($script . "type=$type&set_partie_cal=soir&$args"), .http_href_img(($script . "type=$type&set_partie_cal=soir&$args"),
...@@ -385,7 +383,7 @@ style='position: absolute; padding: 5px; background-color: $couleur_claire; marg ...@@ -385,7 +383,7 @@ style='position: absolute; padding: 5px; background-color: $couleur_claire; marg
# affichage du bandeau d'un calendrier d'une journee # affichage du bandeau d'un calendrier d'une journee
function http_calendrier_navigation_jour($jour,$mois,$annee, $echelle, $script, $nav) function http_calendrier_navigation_jour($jour,$mois,$annee, $partie_cal, $echelle, $script, $nav)
{ {
$today=getdate(time()); $today=getdate(time());
$jour_today = $today["mday"]; $jour_today = $today["mday"];
...@@ -393,7 +391,7 @@ function http_calendrier_navigation_jour($jour,$mois,$annee, $echelle, $script, ...@@ -393,7 +391,7 @@ function http_calendrier_navigation_jour($jour,$mois,$annee, $echelle, $script,
$annee_today = $today["year"]; $annee_today = $today["year"];
// return "<table width='100%'>" . // return "<table width='100%'>" .
return return
http_calendrier_navigation($jour, $mois, $annee, $echelle, http_calendrier_navigation($jour, $mois, $annee, $partie_cal, $echelle,
(nom_jour("$annee-$mois-$jour") . " " . (nom_jour("$annee-$mois-$jour") . " " .
affdate_jourcourt("$annee-$mois-$jour")), affdate_jourcourt("$annee-$mois-$jour")),
$script, $script,
...@@ -406,7 +404,7 @@ function http_calendrier_navigation_jour($jour,$mois,$annee, $echelle, $script, ...@@ -406,7 +404,7 @@ function http_calendrier_navigation_jour($jour,$mois,$annee, $echelle, $script,
# affichage du bandeau d'un calendrier d'une semaine # affichage du bandeau d'un calendrier d'une semaine
function http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today, $echelle, $jour_semaine, $script, $nav) function http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today, $partie_cal, $echelle, $jour_semaine, $script, $nav)
{ {
$debut = date("Y-m-d",mktime (1,1,1,$mois_today, $jour_today-$jour_semaine+1, $annee_today)); $debut = date("Y-m-d",mktime (1,1,1,$mois_today, $jour_today-$jour_semaine+1, $annee_today));
$fin = date("Y-m-d",mktime (1,1,1,$mois_today, $jour_today-$jour_semaine+7, $annee_today)); $fin = date("Y-m-d",mktime (1,1,1,$mois_today, $jour_today-$jour_semaine+7, $annee_today));
...@@ -415,6 +413,7 @@ function http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today ...@@ -415,6 +413,7 @@ function http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today
http_calendrier_navigation($jour_today, http_calendrier_navigation($jour_today,
$mois_today, $mois_today,
$annee_today, $annee_today,
$partie_cal,
$echelle, $echelle,
((annee($debut) != annee($fin)) ? ((annee($debut) != annee($fin)) ?
(affdate($debut)." -<br />".affdate($fin)) : (affdate($debut)." -<br />".affdate($fin)) :
...@@ -434,7 +433,7 @@ function http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today ...@@ -434,7 +433,7 @@ function http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today
# et on place les boutons de navigations vers les autres mois et connexe; # et on place les boutons de navigations vers les autres mois et connexe;
# sinon on considere que c'est un planning ferme et il n'y a pas de navigation # sinon on considere que c'est un planning ferme et il n'y a pas de navigation
function http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, $echelle, $evenements, $fclic) function http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, $partie_cal, $echelle, $evenements, $fclic)
{ {
global $couleur_claire, $couleur_foncee; global $couleur_claire, $couleur_foncee;
...@@ -467,6 +466,7 @@ function http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, $eche ...@@ -467,6 +466,7 @@ function http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, $eche
$nav = http_calendrier_navigation($j, $nav = http_calendrier_navigation($j,
$mois, $mois,
$annee, $annee,
$partie_cal,
$echelle, $echelle,
$periode, $periode,
$script, $script,
...@@ -633,13 +633,11 @@ function http_calendrier_clics($annee, $mois, $jour, $clic) ...@@ -633,13 +633,11 @@ function http_calendrier_clics($annee, $mois, $jour, $clic)
# dispose les evenements d'une semaine # dispose les evenements d'une semaine
function http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, function http_calendrier_suite_heures($jour_today,$mois_today,$annee_today,
$articles, $breves, $evenements, $articles, $breves, $evenements, $partie_cal, $echelle,
$script, $nav) $script, $nav)
{ {
global $couleur_claire, $couleur_foncee, $spip_ecran, $spip_lang_left,$partie_cal; global $couleur_claire, $couleur_foncee, $spip_ecran, $spip_lang_left;
$echelle = $GLOBALS['echelle'];
if ($partie_cal == "soir") { if ($partie_cal == "soir") {
$debut = 12; $debut = 12;
$fin = 23; $fin = 23;
...@@ -720,7 +718,7 @@ function http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, ...@@ -720,7 +718,7 @@ function http_calendrier_suite_heures($jour_today,$mois_today,$annee_today,
} }
return return
"<table border='0' cellspacing='0' cellpadding='0' width='100%'>" . "<table border='0' cellspacing='0' cellpadding='0' width='100%'>" .
http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today, http_calendrier_navigation_semaine($jour_today,$mois_today,$annee_today, $partie_cal,
$echelle, $echelle,
$jour_semaine, $jour_semaine,
$script, $script,
...@@ -1099,12 +1097,16 @@ function http_calendrier_jour_ics($debut, $fin, $largeur, $detcolor, $echelle, $ ...@@ -1099,12 +1097,16 @@ function http_calendrier_jour_ics($debut, $fin, $largeur, $detcolor, $echelle, $
} }
function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date, $script){ function http_calendrier_init_jour($date, $echelle, $partie_cal, $script){
global $largeur_table, $largeur_gauche, $spip_ecran; global $largeur_table, $largeur_gauche, $spip_ecran;
$jour = journum($date); $jour = journum($date);
$mois = mois($date); $mois = mois($date);
$annee = annee($date); $annee = annee($date);
$today=getdate(time());
$jour_today = $today["mday"];
$mois_today = $today["mon"];
$annee_today = $today["year"];
if ($spip_ecran == "large") { if ($spip_ecran == "large") {
$largeur_table = 974; $largeur_table = 974;
$largeur_gauche = 200; $largeur_gauche = 200;
...@@ -1120,21 +1122,21 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date, ...@@ -1120,21 +1122,21 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date,
if ($spip_ecran == "large") { if ($spip_ecran == "large") {
$retour .= "<td width='$largeur_gauche' class='verdana1' valign='top'>" . $retour .= "<td width='$largeur_gauche' class='verdana1' valign='top'>" .
"<div style='height: 29px;'>&nbsp;</div>". "<div style='height: 29px;'>&nbsp;</div>".
http_calendrier_jour($jour-1,$mois,$annee, "col") . http_calendrier_jour($jour-1,$mois,$annee, "col", $partie_cal, $echelle, 0, $script) .
"</td>\n<td width='20'>&nbsp;</td>\n"; "</td>\n<td width='20'>&nbsp;</td>\n";
} }
$retour .= "\n<td width='$largeur_centre' valign='top'>" . $retour .= "\n<td width='$largeur_centre' valign='top'>" .
"<div>" . "<div>" .
http_calendrier_navigation_jour($jour,$mois,$annee, $GLOBALS['echelle'], $script, '') . http_calendrier_navigation_jour($jour,$mois,$annee, $partie_cal, $echelle, $script, '') .
"</div>". "</div>".
http_calendrier_jour($jour,$mois,$annee, "large") . http_calendrier_jour($jour,$mois,$annee, "large", $partie_cal, $echelle, 0, $script) .
'</td>'; '</td>';
# afficher en reduction le tableau du jour suivant # afficher en reduction le tableau du jour suivant
$retour .= "\n<td width='20'>&nbsp;</td>" . $retour .= "\n<td width='20'>&nbsp;</td>" .
"\n<td width='$largeur_gauche' class='verdana1' valign='top'>" . "\n<td width='$largeur_gauche' class='verdana1' valign='top'>" .
"<div style='height: 29px;'>&nbsp;</div>". "<div style='height: 29px;'>&nbsp;</div>".
http_calendrier_jour($jour+1,$mois,$annee, "col") . http_calendrier_jour($jour+1,$mois,$annee, "col", $partie_cal, $echelle, 0, $script) .
'</td>'; '</td>';
$retour .= '</tr></table>'; $retour .= '</tr></table>';
...@@ -1142,9 +1144,9 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date, ...@@ -1142,9 +1144,9 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date,
return $retour; return $retour;
} }
function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date, $script) function http_calendrier_init_semaine($date, $echelle, $partie_cal, $script)
{ {
global $spip_ecran, $spip_lang_left, $couleur_claire; global $spip_ecran, $spip_lang_left, $couleur_claire;
if ($spip_ecran == "large") { if ($spip_ecran == "large") {
$largeur_table = 974; $largeur_table = 974;
...@@ -1155,10 +1157,11 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date ...@@ -1155,10 +1157,11 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date
} }
// $largeur_table = $largeur_table - ($largeur_gauche+20); // $largeur_table = $largeur_table - ($largeur_gauche+20);
$nom = mktime(1,1,1,$mois_today,$jour_today,$annee_today); $jour_today = journum($date);
$jour_semaine = date("w",$nom); $mois_today = mois($date);
$debut = mktime(1,1,1,$mois_today, $jour_today-$jour_semaine+1, $annee_today); $annee_today = annee($date);
$debut = date("Y-m-d",$debut); $jour_semaine = date("w",$date);
$debut = date("Y-m-d",mktime(1,1,1,$mois_today, $jour_today-$jour_semaine+1, $annee_today));
$today=getdate(time()); $today=getdate(time());
$jour = $today["mday"]; $jour = $today["mday"];
...@@ -1172,9 +1175,7 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date ...@@ -1172,9 +1175,7 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date
"<div>&nbsp;</div>" . "<div>&nbsp;</div>" .
"<table cellpadding=0 cellspacing=0 border=0 width='$largeur_table'><tr>" . "<table cellpadding=0 cellspacing=0 border=0 width='$largeur_table'><tr>" .
"<td width='$largeur_table' valign='top'>" . "<td width='$largeur_table' valign='top'>" .
http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, $articles, $breves, $messages, http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, $articles, $breves, $messages, $partie_cal, $echelle, $script, '') .
$script,
'') .
"</td></tr></table>" . "</td></tr></table>" .
(!(strlen($breves["0"]) > 0 OR $articles["0"] > 0) ? '' : (!(strlen($breves["0"]) > 0 OR $articles["0"] > 0) ? '' :
("<table width=400 background=''><tr width=400><td><FONT FACE='arial,helvetica,sans-serif' SIZE=1>" . ("<table width=400 background=''><tr width=400><td><FONT FACE='arial,helvetica,sans-serif' SIZE=1>" .
...@@ -1185,12 +1186,11 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date ...@@ -1185,12 +1186,11 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date
http_calendrier_aide_mess(); http_calendrier_aide_mess();
} }
function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message = 0) { function http_calendrier_jour($jour,$mois,$annee,$large = "large", $partie_cal, $echelle, $le_message = 0, $script = 'calendrier.php3') {
global $spip_lang_rtl, $spip_lang_right, $spip_lang_left, $bleu, $vert,$jaune; global $spip_lang_rtl, $spip_lang_right, $spip_lang_left, $bleu, $vert,$jaune;
global $calendrier_message_fermeture; global $calendrier_message_fermeture;
global $partie_cal;
$script = 'calendrier.php3' ; // ok pour espace de redac, pas pour public
if ($partie_cal == "soir") { if ($partie_cal == "soir") {
$debut_cal = 12; $debut_cal = 12;
$fin_cal = 23; $fin_cal = 23;
...@@ -1266,7 +1266,7 @@ function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message = ...@@ -1266,7 +1266,7 @@ function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message =
} else { } else {
$largeur = 50; $largeur = 50;
} }
$echelle = $GLOBALS['echelle'];
list($dimheure, $dimjour, $fontsize, $padding) = list($dimheure, $dimjour, $fontsize, $padding) =
calendrier_echelle($debut_cal, $fin_cal, $echelle); calendrier_echelle($debut_cal, $fin_cal, $echelle);
// faute de fermeture en PHP... // faute de fermeture en PHP...
...@@ -1302,27 +1302,6 @@ function http_calendrier_message($evenement) ...@@ -1302,27 +1302,6 @@ function http_calendrier_message($evenement)
} }
} }
# Affiche l'encadre "lien iCal"
# avec une simulation de
# icone_horizontale (_T("icone_suivi_activite"), "synchro.php3", "synchro-24.gif")
# qui fait des echo...
function http_calendrier_ical($id) {
$lien = 'synchro.php3';
$fond = 'synchro-24.gif';
$fonction = "rien.gif";
$texte =_T("icone_suivi_activite") ;
return
debut_cadre_enfonce('',true) .
"<div class='verdana1'>"._T("calendrier_synchro") .
"<a href='$lien' class='cellule-h'><table cellpadding='0' valign='middle'><tr>\n" .
"<td><a href='$lien'><div class='cell-i'>"
. http_img_pack($fonction, '', http_style_background($fond, "background-repeat: no-repeat; background-position: center center;"))
. "</div></a></td>\n"
. "<td class='cellule-h-lien'><a href='$lien' class='cellule-h'>$texte</a></td>\n"
. "</tr></table></a>\n" ."</div>" .
fin_cadre_enfonce(true);
}
function http_calendrier_rv($messages, $type) { function http_calendrier_rv($messages, $type) {
global $spip_lang_rtl, $spip_lang_left, $spip_lang_right; global $spip_lang_rtl, $spip_lang_left, $spip_lang_right;
......
...@@ -176,7 +176,7 @@ if ($spip_display != 4) { ...@@ -176,7 +176,7 @@ if ($spip_display != 4) {
"WHERE ((lien.id_auteur='$connect_id_auteur' AND lien.id_message=messages.id_message) OR messages.type='affich') ". "WHERE ((lien.id_auteur='$connect_id_auteur' AND lien.id_message=messages.id_message) OR messages.type='affich') ".
"AND messages.rv='oui' AND messages.date_heure >='$annee_today-$mois_today-$jour_today' AND messages.date_heure < DATE_ADD('$annee_today-$mois_today-$jour_today', INTERVAL 1 DAY) AND messages.statut='publie' LIMIT 0,1"))) { "AND messages.rv='oui' AND messages.date_heure >='$annee_today-$mois_today-$jour_today' AND messages.date_heure < DATE_ADD('$annee_today-$mois_today-$jour_today', INTERVAL 1 DAY) AND messages.statut='publie' LIMIT 0,1"))) {
echo "<p />"; echo "<p />";
echo http_calendrier_jour($jour_today,$mois_today,$annee_today, "col"); echo http_calendrier_jour($jour_today,$mois_today,$annee_today, "col", $partie_cal, $echelle);
} }
} }
......
...@@ -280,7 +280,7 @@ if ($row = spip_fetch_array(spip_query("SELECT * FROM spip_messages WHERE id_mes ...@@ -280,7 +280,7 @@ if ($row = spip_fetch_array(spip_query("SELECT * FROM spip_messages WHERE id_mes
if ($rv != "non") { if ($rv != "non") {
creer_colonne_droite(); creer_colonne_droite();
echo http_calendrier_jour($lejour,$lemois,$lannee, "col", $id_message); echo http_calendrier_jour($lejour,$lemois,$lannee, "col", $partie_cal, $echelle, $id_message);
} }
debut_droite(); debut_droite();
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
include ("inc.php3"); include ("inc.php3");
include_ecrire ("inc_acces.php3"); include_ecrire ("inc_acces.php3");
include_ecrire ("inc_calendrier.php");
if ($supp_dest) { if ($supp_dest) {
spip_query("DELETE FROM spip_auteurs_messages WHERE id_message=$id_message AND id_auteur=$supp_dest"); spip_query("DELETE FROM spip_auteurs_messages WHERE id_message=$id_message AND id_auteur=$supp_dest");
...@@ -65,15 +64,24 @@ debut_cadre_relief("messagerie-24.gif"); ...@@ -65,15 +64,24 @@ debut_cadre_relief("messagerie-24.gif");
fin_cadre_relief(); fin_cadre_relief();
# Affiche l'encadre "lien iCal"
echo http_calendrier_ical($connect_id_auteur); echo
debut_cadre_enfonce('',true) .
"<div class='verdana1'>"._T("calendrier_synchro") .
"<a href='synchro.php3' class='cellule-h'><table cellpadding='0' valign='middle'><tr>\n" .
"<td><a href='synchro.php3'><div class='cell-i'>"
. http_img_pack("rien.gif", '', http_style_background('synchro-24.gif', "; background-repeat: no-repeat; background-position: center center;"))
. "</div></a></td>\n"
. "<td class='cellule-h-lien'><a href='synchro.php3' class='cellule-h'>"
. _T("icone_suivi_activite")
. "</a></td>\n</tr></table></a>\n" ."</div>" .
fin_cadre_enfonce(true);
debut_droite("messagerie"); debut_droite("messagerie");
$messages_vus = ''; $messages_vus = '';
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter