Accéder au contenu.
Menu Sympa

devel - [Devel] r86 - trunk

Objet : devel-adl

Archives de la liste

[Devel] r86 - trunk


Chronologique Discussions 
  • From: thomas AT lolut.utbm.info
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r86 - trunk
  • Date: Wed, 17 Aug 2005 21:39:10 +0200 (CEST)
  • List-archive: <http://lolut.utbm.info/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: thomas
Date: 2005-08-17 21:39:09 +0200 (Wed, 17 Aug 2005)
New Revision: 86

Modified:
trunk/calendar.css
trunk/funcs.inc.php
trunk/index.php
Log:
Fermeture du <a name> apr?\195?\168s rollback du commit 85

Modified: trunk/calendar.css
===================================================================
--- trunk/calendar.css 2005-08-17 19:35:20 UTC (rev 85)
+++ trunk/calendar.css 2005-08-17 19:39:09 UTC (rev 86)
@@ -52,10 +52,6 @@
text-align: center;
}

-h3 {
- text-align: center;
-}
-
a:link, a:visited {
font-weight: bold;
text-decoration: none;

Modified: trunk/funcs.inc.php
===================================================================
--- trunk/funcs.inc.php 2005-08-17 19:35:20 UTC (rev 85)
+++ trunk/funcs.inc.php 2005-08-17 19:39:09 UTC (rev 86)
@@ -271,70 +271,6 @@
echo "</table>\n";
}

-function one_month_calendar ($db, $month, $year)
-{
- /*
- * Compute previous and next months
- */
- $next = get_next_month($month, $year);
- $next_year = $next['year'];
- $next_month = $next['month'];
-
- $prev = get_prev_month($month, $year);
- $prev_year = $prev['year'];
- $prev_month = $prev['month'];
-
- /*
- * Display links for previous and next months
- */
- echo "<h2>\n";
- echo " <a href=\"?year=".$prev_year."&amp;month=".$prev_month."\">
&lt;&lt; </a>\n";
- echo " <span id=\"month_name\">".date_month2string($month)." ";
- echo " <a href=\"?year=".$year."\">".$year."</a>"."</span>\n";
- echo " <a href=\"?year=".$next_year."&amp;month=".$next_month."\">
&gt;&gt; </a>\n";
- echo "</h2>\n\n";
-
- /*
- * Display the calendar
- */
- calendar($db, $month, $year);
-}
-
-function year_calendar($db, $year)
-{
- /*
- * Display links for previous and next years
- */
- $next_year = $year + 1;
- $prev_year = $year - 1;
- echo "<h2>\n";
- echo " <a href=\"?year=".$prev_year."\"> &lt;&lt; </a>\n";
- echo " <span id=\"month_name\">".$year."</span>\n";
- echo " <a href=\"?year=".$next_year."\"> &gt;&gt; </a>\n";
- echo "</h2>\n\n";
-
- /*
- * Display the calendar over 12 months starting from current one
- */
- $num = 0;
- $month = date("n");
- while ($num < 12) {
- // month header, with a link to the single month on a page
- echo "<h3>\n";
- echo " <a href=\"?year=".$year."&amp;month=".$month."\">\n";
- echo " <span id=\"month_name\">".date_month2string($month)."
".$year."</span>\n";
- echo " </a>\n";
- echo "</h3>\n\n";
-
- calendar($db, $month, $year);
-
- $next = get_next_month($month, $year);
- $year = $next['year'];
- $month = $next['month'];
- $num++;
- }
-}
-
function fetch_event($db, $id)
{
$result = $db->query ("select * from events where id=" .
$db->quote_smart($id));

Modified: trunk/index.php
===================================================================
--- trunk/index.php 2005-08-17 19:35:20 UTC (rev 85)
+++ trunk/index.php 2005-08-17 19:39:09 UTC (rev 86)
@@ -35,23 +35,41 @@
/*
* Compute the month to be displayed in the agenda
*/
-if($_GET['year'] && !$_GET['month'])
+if($_GET['month'] && $_GET['year'])
{
- $year = $_GET['year'];
- year_calendar($db, $year);
-}
-else if($_GET['month'] && $_GET['year'])
-{
$month = $_GET['month'];
$year = $_GET['year'];
- one_month_calendar ($db, $month, $year);
}
else
{
$year = date("Y");
$month = date("n");
- one_month_calendar ($db, $month, $year);
}

+/*
+ * Compute previous and next months
+ */
+$next = get_next_month($month, $year);
+$next_year = $next['year'];
+$next_month = $next['month'];
+
+$prev = get_prev_month($month, $year);
+$prev_year = $prev['year'];
+$prev_month = $prev['month'];
+
+/*
+ * Display links for previous and next months
+ */
+echo "<h2>\n";
+echo " <a href=\"?year=".$prev_year."&amp;month=".$prev_month."\"> &lt;&lt;
</a>\n";
+echo " <span id=\"month_name\">". date_month2string($month)."
".$year."</span>\n";
+echo " <a href=\"?year=".$next_year."&amp;month=".$next_month."\"> &gt;&gt;
</a>\n";
+echo "</h2>\n\n";
+
+/*
+ * Display the calendar
+ */
+calendar($db, $month, $year);
+
put_footer();
?>
\ No newline at end of file





  • [Devel] r86 - trunk, thomas, 17/08/2005

Archives gérées par MHonArc 2.6.16.

Haut de le page