[gosa.git] / gosa-core / plugins / generic / dashBoard / dbChannelStatus / class_dbChannelStatus.inc
1 <?php
3 class dbChannelStatus extends plugin
4 {
5 function __construct($config)
6 {
7 parent::__construct($config, NULL);
9 // Construct the channel list.
10 $this->channelList= new sortableListing();
11 $this->channelList->setDeleteable(false);
12 $this->channelList->setEditable(false);
13 $this->channelList->setColspecs(array('30px','120px','*','100px'));
14 $this->channelList->setHeader(array('?',_("Name"),_("Description"),_("Status")));
15 $this->channelList->setWidth("100%");
16 $this->channelList->setDefaultSortColumn(1);
17 $this->channelList->setHeight("200px");
18 $this->channelList->setAcl("rwcdm");
19 }
21 function execute()
22 {
23 $smarty = get_smarty();
25 $channel = array();
26 $channel[] = array(
27 'icon' => image('images/true.png'),
28 'name' => 'GONICUS support',
29 'desc' => 'GONICUS helps you all time!',
30 'stat' => 'Online'
31 );
32 $channel[] = array(
33 'icon' => image('images/true.png'),
34 'name' => 'Free',
35 'desc' => 'Free channel, basic GOsa plugins!',
36 'stat' => 'Online'
37 );
38 $channel[] = array(
39 'icon' => image('images/small_error.png'),
40 'name' => 'Experimental',
41 'desc' => 'May be down for maintance!',
42 'stat' => 'Offline'
43 );
46 $data = $lData = array();
47 foreach($channel as $key => $ch){
48 $data[$key] = $ch;
49 $lData[$key] = array('data' => array($ch['icon'],$ch['name'], $ch['desc'], $ch['stat']));
50 }
52 $this->channelList->setListData($data,$lData);
53 $this->channelList->update();
54 $smarty->assign('channelList', $this->channelList->render());
55 return($smarty->fetch(get_template_path('dbChannelStatus/contents.tpl', TRUE)));
56 }
58 function save_object()
59 {
60 parent::save_object();
61 }
63 function save()
64 {
65 parent::save();
66 }
68 function check()
69 {
70 return(parent::check());
71 }
73 function remove_from_parent()
74 {
75 parent::remove_from_parent();
76 }
77 }
79 ?>