[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 include ("inc.php"); 20 21 include_ecrire ("inc_agenda.php"); 22 23 function afficher_semaine ($jour_today, $mois_today, $annee_today) { 24 global $spip_lang_rtl, $spip_lang_right, $spip_lang_left; 25 global $connect_id_auteur, $connect_statut; 26 global $spip_lang_rtl; 27 global $spip_ecran; 28 global $couleur_claire, $couleur_foncee; 29 30 // calculer de nouveau la date du jour pour affichage en blanc 31 $ce_jour = date("Y-m-d"); 32 33 $nom = mktime(1, 1, 1, $mois_today, $jour_today, $annee_today); 34 $jour_semaine = date("w", $nom); 35 36 if ($jour_semaine == 0) 37 $jour_semaine = 7; 38 39 $debut = date("Y-m-d", mktime(1, 1, 1, $mois_today, $jour_today - $jour_semaine + 1, $annee_today)); 40 $fin = date("Y-m-d", mktime(1, 1, 1, $mois_today, $jour_today - $jour_semaine + 7, $annee_today)); 41 42 if ($spip_ecran == "large") { 43 $largeur_table = 974; 44 $largeur_gauche = 170; 45 } 46 else { 47 $largeur_table = 750; 48 $largeur_gauche = 100; 49 } 50 51 $largeur_table = $largeur_table - ($largeur_gauche + 20); 52 $largeur_col = round($largeur_table / 7); 53 54 echo "<table cellpadding=0 cellspacing=0 border=0 width='" . ($largeur_table + 10 + $largeur_gauche). "'><tr>"; 55 56 echo "<td width='$largeur_gauche' class='verdana1' valign='top'>"; 57 58 // date du jour 59 $today = getdate(time()); 60 $jour = $today["mday"]; 61 $mois = $today["mon"]; 62 $annee = $today["year"]; 63 $jour_semaine_reel = date("w", mktime(1, 1, 1, $mois, $jour, $annee)); 64 $debut_reel = date("Y-m-d", mktime(1, 1, 1, $mois, $jour - $jour_semaine_reel + 1, $annee)); 65 66 echo "<div> </div>"; 67 echo "<div> </div>"; 68 69 agenda($mois_today - 1, $annee_today, $jour_today, $mois_today, $annee_today, true); 70 agenda($mois_today, $annee_today, $jour_today, $mois_today, $annee_today, true); 71 agenda($mois_today + 1, $annee_today, $jour_today, $mois_today, $annee_today, true); 72 73 afficher_taches(); 74 75 echo "</td>"; 76 echo "<td width='20'> </td>"; 77 78 echo "<td width='$largeur_table' valign='top'>"; 79 echo "<TABLE border=0 CELLSPACING=0 CELLPADDING=0 WIDTH='$largeur_table'>"; 80 81 echo "<TR><TD style='text-align:$spip_lang_left;'><A HREF='calendrier_semaine.php?mois=$mois_today&annee=$annee_today&jour=" . ($jour_today 82 - 7). "'><img src='img_pack/fleche-$spip_lang_left.png' alt='<<<' width='12' height='12' border='0'></A></TD>"; 83 echo "<TD style='text-align:center;' COLSPAN=5>"; 84 85 if ($debut != $debut_reel) { 86 echo "<div style='float: $spip_lang_left; width: 150px; align: left;'>"; 87 icone_horizontale(_T("info_aujourdhui"). "<br>" . affdate_jourcourt("$annee-$mois-$jour"), 88 "calendrier_semaine.php", 89 "calendrier-24.gif", 90 "", 91 "left"); 92 echo "</div>"; 93 } 94 95 echo "<div style='float: $spip_lang_right; width: 120px;'>"; 96 echo "<a href='calendrier_jour.php?jour=$jour_today&mois=$mois_today&annee=$annee_today'><img src='img_pack/cal-jour.gif' alt='jour' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>"; 97 echo " "; 98 echo "<img src='img_pack/cal-semaine.gif' alt='semaine' width='26' height='20' border='0' style='border: 1px solid black'>"; 99 echo " "; 100 echo "<a href='calendrier.php?mois=$mois_today&annee=$annee_today&jour=$jour_today'><img src='img_pack/cal-mois.gif' alt='mois' width='26' height='20' border='0' style='filter: alpha(opacity=50);'></a>"; 101 echo aide("messcalen"); 102 echo "</div>"; 103 104 echo "<FONT FACE='arial,helvetica,sans-serif' SIZE='4'><B>"; 105 106 if (annee($debut) != annee($fin)) 107 echo affdate($debut). " - " . affdate($fin); 108 else if (mois($debut) == mois($fin)) 109 echo journum($debut). " - " . affdate_jourcourt($fin); 110 else 111 echo affdate_jourcourt($debut). " - " . affdate_jourcourt($fin); 112 113 echo "</B></FONT>"; 114 115 echo "</TD>"; 116 echo "<TD style='text-align:$spip_lang_right;'><A HREF='calendrier_semaine.php?mois=$mois_today&annee=$annee_today&jour=" . ($jour_today + 7). "'><img src='img_pack/fleche-$spip_lang_right.png' alt='>>>' width='12' height='12' border='0'></A></TD></TR>"; 117 118 echo "<TR>"; 119 120 for ($j = 0; $j < 7; $j++) { 121 $afficher = date("Y-m-d", mktime(1, 1, 1, $mois_today, $jour_today - $jour_semaine + $j + 1, $annee_today)); 122 123 echo "<TD ALIGN='center' width='$largeur_col' style='border-bottom: 1px solid black; border-right: 1px solid black; border-left: 1px solid $couleur_claire; border-top: 1px solid $couleur_claire;' BGCOLOR='$couleur_foncee'><font class='verdana2' color='#FFFFFF'><B>"; 124 echo "<div style='padding: 3px;'><a href='calendrier_jour.php?jour=" . jour($afficher). "&mois=$mois_today&annee=$annee_today' style='color:white;'>" . nom_jour($afficher). " " . jour($afficher). "</a></div>"; 125 echo "</B></TD>"; 126 } 127 128 echo "</TR><TR>"; 129 130 for ($j = 0; $j < 7; $j++) { 131 echo "<td width='$largeur_col' HEIGHT='100' BGCOLOR='$couleur_fond' VALIGN='top'>"; 132 calendrier_jour($jour_today - $jour_semaine + $j + 1, $mois_today, $annee_today, "etroit"); 133 echo "</td>"; 134 } 135 136 echo "</TR></TABLE>"; 137 echo "</td></tr></table>"; 138 } 139 140 // date du jour 141 $today = getdate(time()); 142 143 // sans arguments => mois courant 144 if (!$mois) { 145 $jour = $today["mday"]; 146 $mois = $today["mon"]; 147 $annee = $today["year"]; 148 } 149 150 $date = date("Y-m-d", mktime(0, 0, 0, $mois, $jour, $annee)); 151 $jour = journum($date); 152 $mois = mois($date); 153 $annee = annee($date); 154 155 debut_page(d_apostrophe(_T('titre_page_calendrier', array('nom_mois' => $nom_mois, 'annee' => $annee))), "redacteurs", "calendrier"); 156 $activer_messagerie = lire_meta("activer_messagerie"); 157 $connect_activer_messagerie = $GLOBALS["connect_activer_messagerie"]; 158 159 echo "<div> </div>"; 160 161 afficher_semaine($jour, $mois, $annee); 162 163 if (strlen($les_breves["0"]) > 0 OR $les_articles["0"] > 0) { 164 echo "<table width=200 background=''><tr width=200><td><FONT FACE='arial,helvetica,sans-serif' SIZE=1>"; 165 echo "<b>" . _T('info_mois_courant'). "</b>"; 166 echo $les_breves["0"]; 167 echo $les_articles["0"]; 168 echo "</font></td></tr></table>"; 169 } 170 171 if ($activer_messagerie == "oui" AND $connect_activer_messagerie != "non") { 172 echo "<br><br><br><table width='700' background=''><tr width='700'><td><FONT FACE='arial,helvetica,sans-serif' SIZE=2>"; 173 echo "<b>" . _T('info_aide'). "</b>"; 174 echo "<br><IMG SRC='img_pack/m_envoi_bleu$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0'> " . _T('info_symbole_bleu'). "\n"; 175 echo "<br><IMG SRC='img_pack/m_envoi$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0'> " . _T('info_symbole_vert'). "\n"; 176 echo "<br><IMG SRC='img_pack/m_envoi_jaune$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0'> " . _T('info_symbole_jaune'). "\n"; 177 echo "</font></td></tr></table>"; 178 } 179 180 // fin_page(); 181 182 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |