| 1 | <?php |
| 2 | require_once 'diogenes.common.inc.php'; |
| 3 | require_once 'diogenes.barrel.inc.php'; |
| 4 | require_once 'Barrel/Events.php'; |
| 5 | $page = new $globals->barrel; |
| 6 | $events = new Diogenes_Barrel_Events($page->barrel); |
| 7 | |
| 8 | // assignments |
| 9 | $page->assign('version', $globals->version); |
| 10 | $page->assign('site_title', stripslashes($page->barrel->options->title)); |
| 11 | $page->assign('site_link', $page->urlBarrel($page->barrel->alias, $page->barrel->vhost, '')); |
| 12 | |
| 13 | // retrieve recent events |
| 14 | $event_arr = $events->getEvents($page); |
| 15 | foreach($event_arr as $event) |
| 16 | { |
| 17 | //$page->assign('events', $event_arr); |
| 18 | if ($event['flags'] & EVENT_FLAG_PUBLIC) |
| 19 | { |
| 20 | $item = $event; |
| 21 | $item['date'] = gmstrftime("%a, %d %b %Y %T %Z", strtotime($event['stamp'])); |
| 22 | $item['title'] .= " : ". $item['opfile']; |
| 23 | $page->append('items', $item); |
| 24 | } |
| 25 | } |
| 26 | header("Content-Type: application/rss+xml"); |
| 27 | $page->display('', 'admin-rss.tpl'); |
| 28 | ?> |