1 | <?php
|
---|
2 |
|
---|
3 | include_once(dirname(__FILE__).'/../../Base/Controller.php');
|
---|
4 | include_once(dirname(__FILE__).'/../../Application/View/Page.php');
|
---|
5 | include_once(dirname(__FILE__).'/View.php');
|
---|
6 |
|
---|
7 | class ClusterController extends Controller
|
---|
8 | {
|
---|
9 | function ItemList()
|
---|
10 | {
|
---|
11 | $Page = new PageView($this->System);
|
---|
12 | if($this->System->Modules['Permission']->Check('Cluster', 'ItemList'))
|
---|
13 | {
|
---|
14 | $View = new ClusterView($this->System);
|
---|
15 | return($Page->GetOutput($View->ItemList()));
|
---|
16 | } else return($Page->AccessDenied());
|
---|
17 | }
|
---|
18 |
|
---|
19 | function Add()
|
---|
20 | {
|
---|
21 | $Page = new PageView($this->System);
|
---|
22 | if($this->System->Modules['Permission']->Check('Cluster', 'Add'))
|
---|
23 | {
|
---|
24 | $View = new ClusterView($this->System);
|
---|
25 | return($Page->GetOutput($View->Add()));
|
---|
26 | } else return($Page->AccessDenied());
|
---|
27 | }
|
---|
28 |
|
---|
29 | function Remove()
|
---|
30 | {
|
---|
31 | $Page = new PageView($this->System);
|
---|
32 | if($this->System->Modules['Permission']->Check('Cluster', 'Remove'))
|
---|
33 | {
|
---|
34 | $View = new ClusterView($this->System);
|
---|
35 | return($Page->GetOutput($View->Restore()));
|
---|
36 | } else return($Page->AccessDenied());
|
---|
37 | }
|
---|
38 |
|
---|
39 | function Show()
|
---|
40 | {
|
---|
41 | $Page = new PageView($this->System);
|
---|
42 | if($this->System->Modules['Permission']->Check('Cluster', 'Show'))
|
---|
43 | {
|
---|
44 | $View = new ClusterView($this->System);
|
---|
45 | return($Page->GetOutput($View->Show()));
|
---|
46 | } else return($Page->AccessDenied());
|
---|
47 | }
|
---|
48 |
|
---|
49 | function Edit()
|
---|
50 | {
|
---|
51 | $Page = new PageView($this->System);
|
---|
52 | if($this->System->Modules['Permission']->Check('Cluster', 'Edit'))
|
---|
53 | {
|
---|
54 | $View = new ClusterView($this->System);
|
---|
55 | return($Page->GetOutput($View->Edit()));
|
---|
56 | } else return($Page->AccessDenied());
|
---|
57 | }
|
---|
58 | }
|
---|