Code

Updated feed list
[gosa.git] / gosa-core / plugins / generic / dashBoard / dbInformation / class_dbInformation.inc
1 <?php
3 class dbInformation extends plugin
4 {
5     function __construct($config)
6     {
7         parent::__construct($config, NULL);
9         // Construct the plugin list.
10         $this->feedList = new sortableListing();
11         $this->feedList->setDeleteable(false);
12         $this->feedList->setEditable(false);
13         #$this->feedList->setColspecs(array('130px','*'));
14         #$this->feedList->setHeader(array(_("Date"),_("Description")));
15         $this->feedList->setWidth("100%");
16         #$this->feedList->setDefaultSortColumn(0);
17         $this->feedList->setHeight("200px");
18         $this->feedList->setAcl("rwcdm");
19     }
21     function execute()
22     {
23         $smarty = get_smarty();
24         $feeds = rssReader::feadToArray(array(
25                     'http://www.computerbild.de/rssfeed_2261.html?node=10',
26                     'http://www.charts-portal.de/games/Computerspiele.xml'));
27         $feeds = rssReader::sortFeedResultBy($feeds, 'timestamp');
28         $data = $lData = array();
29         foreach($feeds as $key => $feed){
30             $data[$key] = $feed;
31             $lData[$key] = array('data'=> array($feed['title']));
32         }
34         $this->feedList->setListData($data, $lData);
35         $this->feedList->update();
36         $smarty->assign('feedList', $this->feedList->render());
37         return($smarty->fetch(get_template_path('dbInformation/contents.tpl', TRUE)));
38     }
40     function save_object()
41     {
42         parent::save_object();
43     }
45     function save()
46     {
47         parent::save();
48     }
50     function check()
51     {
52         return(parent::check());
53     }
55     function remove_from_parent()
56     {
57         parent::remove_from_parent();
58     }
59 }
61 ?>