Accéder au contenu.
Menu Sympa

devel - [Devel] r85 - trunk

Objet : devel-adl

Archives de la liste

[Devel] r85 - trunk


Chronologique Discussions 
  • From: thomas AT lolut.utbm.info
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r85 - trunk
  • Date: Wed, 17 Aug 2005 21:35:22 +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:35:20 +0200 (Wed, 17 Aug 2005)
New Revision: 85

Modified:
trunk/calendar.css
trunk/funcs.inc.php
trunk/index.php
trunk/moderate.php
Log:
Fermeture du <a name>

Modified: trunk/calendar.css
===================================================================
--- trunk/calendar.css 2005-08-10 09:29:43 UTC (rev 84)
+++ trunk/calendar.css 2005-08-17 19:35:20 UTC (rev 85)
@@ -52,6 +52,10 @@
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-10 09:29:43 UTC (rev 84)
+++ trunk/funcs.inc.php 2005-08-17 19:35:20 UTC (rev 85)
@@ -271,6 +271,70 @@
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-10 09:29:43 UTC (rev 84)
+++ trunk/index.php 2005-08-17 19:35:20 UTC (rev 85)
@@ -35,41 +35,23 @@
/*
* Compute the month to be displayed in the agenda
*/
-if($_GET['month'] && $_GET['year'])
+if($_GET['year'] && !$_GET['month'])
{
+ $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

Modified: trunk/moderate.php
===================================================================
--- trunk/moderate.php 2005-08-10 09:29:43 UTC (rev 84)
+++ trunk/moderate.php 2005-08-17 19:35:20 UTC (rev 85)
@@ -351,7 +351,7 @@

while ($row = mysql_fetch_object($ret))
{
- echo "<a name=\"" . $row->id . "\">\n";
+ echo "<a name=\"" . $row->id . "\"></a>\n";
echo "<form action=\"?id=" . $row->id . "\" method=\"post\">\n";
echo format_event ($db,
$row->title,





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

Archives gérées par MHonArc 2.6.16.

Haut de le page