diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/modules/events.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/modules/events.php b/utils/modules/events.php index 6e1218f..be11dcf 100644 --- a/utils/modules/events.php +++ b/utils/modules/events.php @@ -1,5 +1,4 @@ -<?php -/* -*- Mode: php; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +<?php /* -*- Mode: php; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ global $UTIL_DIR, $MODULES_DIR; @@ -19,7 +18,7 @@ class Event { fwrite($fp, " time=\"" . xmlenc($this->time) . "\"\n"); fwrite($fp, " flyer=\"" . xmlenc($this->flyer) . "\">"); fwrite($fp, xmlenc($this->description)); - fwrite($fp, " </event>\n"); + fwrite($fp, "</event>\n"); } public function show() @@ -28,7 +27,7 @@ class Event { $icons = new Icons($ICONS_DIR."/"); $icon = $icons->icons[$this->flyer]; - $content = Markdown(htmlspecialchars_decode($this->description)); + $content = Markdown(htmlspecialchars_decode($this->description)); $str = "<div class=\"event\">\n"; $str .= " <div class=\"event_time\">" . date("D M jS Y", $this->time) . "</div>\n"; @@ -175,8 +174,9 @@ class Events { default: $eventlist = array(); foreach($this->events as $event) { - $eventlist[$event->title] = $event->time; + $eventlist[date("Y-m/d h:i:s", $event->time) . ": " . $event->title] = $event->time; } + krsort($eventlist); $form = new Form("edit"); $form->addWidget(new ComboBox("Edit this event:", "eventid", "", $eventlist)); @@ -212,8 +212,9 @@ class Events { default: $eventlist = array(); foreach($this->events as $event) { - $eventlist[$event->title] = $event->time; + $eventlist[date("Y-m/d h:i:s", $event->time) . ": " . $event->title] = $event->time; } + krsort($eventlist); $form = new Form("confirm"); $form->addWidget(new ComboBox("Delete this event:", "eventid", "", $eventlist)); |