aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-06 20:17:36 -0700
committerFriendika <info@friendika.com>2011-06-06 20:17:36 -0700
commit9f51233451ad6392b61083cf61f5670bcce9d935 (patch)
treec47238cb1e5d66ecee173e80a39aede5023554ef /mod
parent452245d9883c29640fb1bd3a9e0d7cefaed77f23 (diff)
downloadvolse-hubzilla-9f51233451ad6392b61083cf61f5670bcce9d935.tar.gz
volse-hubzilla-9f51233451ad6392b61083cf61f5670bcce9d935.tar.bz2
volse-hubzilla-9f51233451ad6392b61083cf61f5670bcce9d935.zip
event listings
Diffstat (limited to 'mod')
-rw-r--r--mod/events.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/mod/events.php b/mod/events.php
index cca0f2074..d280bc1ed 100644
--- a/mod/events.php
+++ b/mod/events.php
@@ -90,6 +90,8 @@ function events_content(&$a) {
return;
}
+ $o .= '<h2>' . t('Events') . '</h2>';
+
$mode = 'view';
$y = 0;
$m = 0;
@@ -119,7 +121,22 @@ function events_content(&$a) {
$m = intval($thismonth);
- $o .= cal($y,$m,false);
+ $o .= cal($y,$m,false, ' eventcal');
+
+ $dim = get_dim($y,$m);
+ $start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0);
+ $finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59);
+
+
+ $r = q("SELECT * FROM `event` WHERE `start` >= '%s' AND `finish` <= '%s' AND `uid` = %d ",
+ dbesc($start),
+ dbesc($finish),
+ intval(local_user())
+ );
+
+ if(count($r))
+ foreach($r as $rr)
+ $o .= format_event_html($rr);
return $o;
}