summaryrefslogtreecommitdiff
path: root/timeline/timeline.php
diff options
context:
space:
mode:
Diffstat (limited to 'timeline/timeline.php')
-rw-r--r--timeline/timeline.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/timeline/timeline.php b/timeline/timeline.php
index c9e8c67..2499ecf 100644
--- a/timeline/timeline.php
+++ b/timeline/timeline.php
@@ -4,10 +4,9 @@ require_once('DB.php');
Markup("timeline", "directives", "/\\(:timeline(\\s+.*)?\\s*:\\)/e",
"'<:block>'.GetEvents()");
-
function GetEvents() {
-$days = 30;
+$days = 14;
if (isset($_POST['days'])) {
$days = intval($_POST['days']);
}
@@ -17,11 +16,10 @@ $db =& DB::connect($dsn);
if (DB::isError($db)) die("Cannot connect to database");
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$from = time() - ($days * 24 * 60 * 60);
-$sql = "select * from events where event_tstamp >= $from order by event_tstamp desc";
+$sql = "select distinct event_date, event_description, event_notes, event_type, event_time from events where event_tstamp >= $from order by event_tstamp desc";
$res =& $db->Query($sql);
if (DB::isError($res)) die("Query error");
-
$timeline .= '<table cellspacing="0" border="0" cellpadding="0">'."\n";
$currdate = "noway";
while ($evt =& $res->fetchRow()) {

Generated by cgit