[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();
24 $channel = array();
25 $channel[] = array(
26 'icon' => image('images/true.png'),
27 'name' => 'GONICUS support',
28 'desc' => 'GONICUS helps you all time!',
29 'stat' => 'Online'
30 );
31 $channel[] = array(
32 'icon' => image('images/true.png'),
33 'name' => 'Free',
34 'desc' => 'Free channel, basic GOsa plugins!',
35 'stat' => 'Online'
36 );
37 $channel[] = array(
38 'icon' => image('images/small_error.png'),
39 'name' => 'Experimental',
40 'desc' => 'May be down for maintance!',
41 'stat' => 'Offline'
42 );
45 $data = $lData = array();
46 foreach($channel as $key => $ch){
47 $data[$key] = $ch;
48 $lData[$key] = array('data' => array($ch['icon'],$ch['name'], $ch['desc'], $ch['stat']));
49 }
51 $this->channelList->setListData($data,$lData);
52 $this->channelList->update();
53 $smarty->assign('channelList', $this->channelList->render());
54 return($smarty->fetch(get_template_path('dbChannelStatus/contents.tpl', TRUE)));
55 }
57 function save_object()
58 {
59 parent::save_object();
60 }
62 function save()
63 {
64 parent::save();
65 }
67 function check()
68 {
69 return(parent::check());
70 }
72 function remove_from_parent()
73 {
74 parent::remove_from_parent();
75 }
76 }
78 ?>