File: rss.php

package info (click to toggle)
diogenes 0.9.20-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,976 kB
  • ctags: 3,271
  • sloc: php: 12,285; sh: 828; perl: 258; makefile: 137; sql: 85
file content (28 lines) | stat: -rw-r--r-- 893 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
require_once 'diogenes.common.inc.php';
require_once 'diogenes.barrel.inc.php';
require_once 'Barrel/Events.php';
$page = new $globals->barrel;
$events = new Diogenes_Barrel_Events($page->barrel);

// assignments
$page->assign('version', $globals->version);
$page->assign('site_title', stripslashes($page->barrel->options->title));
$page->assign('site_link', $page->urlBarrel($page->barrel->alias, $page->barrel->vhost, ''));

// retrieve recent events
$event_arr = $events->getEvents($page);
foreach($event_arr as $event)
{
  //$page->assign('events', $event_arr);
  if ($event['flags'] & EVENT_FLAG_PUBLIC)
  {
    $item = $event;
    $item['date'] = gmstrftime("%a, %d %b %Y %T %Z", strtotime($event['stamp']));
    $item['title'] .= " : ". $item['opfile'];
    $page->append('items', $item);
  }
}
header("Content-Type: application/rss+xml");
$page->display('', 'admin-rss.tpl');
?>