#include <infodrom.style>
#include <debian.style>
#include <calendar.style>

<page title="Debian Events -- Past Events Calendar">

<h1 align=center>Past Events Calendar</h1>

<p>This calendar shows past events with Free Software, GNU/Linux or
Debian affiliation.

<p>Please check out <a
href="http://www.debian.org/events/">www.debian.org</a> and the links
(if any) of each event to find out whether Debian involvement is
already planned.  If you want to help out at a location or negotiate
with the administration, please contact events@debian.org who should
have contact information.

<?
  $query = "SELECT $event_cols FROM events WHERE cancelled = 0 AND (start + delta + '23:59' <= 'now') ORDER BY start,name";

  $dbh = event_connect ();

  $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");

  $year = 0;
  for ($i=0; $i < pg_NumRows ($sth); $i++) {
    $row = pg_fetch_array ($sth, $i);

    $date = explode (" ", $row['start']);
    $date = explode ("-", $date[0]);
    $end = explode (" ", $row[2]);
    $end = explode ("-", $end[0]);
    $thisyear = $date[0];

    $date = format_date ($date, $end);

    if ($thisyear != $year) {
      if ($year > 0) {
        echo ($event_table_end);
        echo ($event_border_end);
      }
      $color = "<cold>";
      printf ("<h3>Past events in %s</h3>", $thisyear);
      echo ($event_border_start);
      echo ($event_table_start);
      $year = $thisyear;
    }

    $row['name'] = str_replace (" ", "&nbsp;", $row['name']);
    $row['country'] = str_replace (" ", "&nbsp;", $row['country']);

    $name = encode_name ($row, "debian");

    $color = $color == "<cold>"?"<coln>" : "<cold>";
    printf ($event_trow, $color, $date, $name, $row['city'], $row['country'],
	    $row['conference']==1?"x":"&nbsp;",
	    $row['exhibition']==1?"x":"&nbsp;");

  }
  echo ($event_table_end);
  echo ($event_border_end);
?>

</page>

# Local variables:
# mode: html
# mode: auto-fill
# mode: iso-accents
# end:
