@@ 23-90 (lines=68) @@ | ||
20 | /** |
|
21 | * Default method to render the controller according to the action parameter. |
|
22 | */ |
|
23 | public function render() |
|
24 | { |
|
25 | $this->printHeader(); |
|
26 | $this->printBody(); |
|
27 | ||
28 | switch ($this->action) { |
|
29 | case 'create': |
|
30 | $this->doCreate(); |
|
31 | ||
32 | break; |
|
33 | case 'save_create': |
|
34 | if (isset($_POST['create'])) { |
|
35 | $this->doSaveCreate(); |
|
36 | } else { |
|
37 | $this->doDefault(); |
|
38 | } |
|
39 | ||
40 | break; |
|
41 | case 'alter': |
|
42 | $this->doAlter(); |
|
43 | ||
44 | break; |
|
45 | case 'save_alter': |
|
46 | if (isset($_POST['alter'])) { |
|
47 | $this->doSaveAlter(); |
|
48 | } else { |
|
49 | $this->doDefault(); |
|
50 | } |
|
51 | ||
52 | break; |
|
53 | case 'confirm_drop': |
|
54 | $this->doDrop(true); |
|
55 | ||
56 | break; |
|
57 | case 'drop': |
|
58 | if (isset($_POST['drop'])) { |
|
59 | $this->doDrop(false); |
|
60 | } else { |
|
61 | $this->doDefault(); |
|
62 | } |
|
63 | ||
64 | break; |
|
65 | case 'properties': |
|
66 | $this->doProperties(); |
|
67 | ||
68 | break; |
|
69 | case 'confchangepassword': |
|
70 | $this->doChangePassword(true); |
|
71 | ||
72 | break; |
|
73 | case 'changepassword': |
|
74 | if (isset($_REQUEST['ok'])) { |
|
75 | $this->doChangePassword(false); |
|
76 | } else { |
|
77 | $this->doAccount(); |
|
78 | } |
|
79 | ||
80 | break; |
|
81 | case 'account': |
|
82 | $this->doAccount(); |
|
83 | ||
84 | break; |
|
85 | default: |
|
86 | $this->doDefault(); |
|
87 | } |
|
88 | ||
89 | $this->printFooter(); |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * Show default list of roles in the database. |
@@ 23-88 (lines=66) @@ | ||
20 | /** |
|
21 | * Default method to render the controller according to the action parameter. |
|
22 | */ |
|
23 | public function render() |
|
24 | { |
|
25 | $this->printHeader(); |
|
26 | $this->printBody(); |
|
27 | ||
28 | switch ($this->action) { |
|
29 | case 'changepassword': |
|
30 | if (isset($_REQUEST['ok'])) { |
|
31 | $this->doChangePassword(false); |
|
32 | } else { |
|
33 | $this->doAccount(); |
|
34 | } |
|
35 | ||
36 | break; |
|
37 | case 'confchangepassword': |
|
38 | $this->doChangePassword(true); |
|
39 | ||
40 | break; |
|
41 | case 'account': |
|
42 | $this->doAccount(); |
|
43 | ||
44 | break; |
|
45 | case 'save_create': |
|
46 | if (isset($_REQUEST['cancel'])) { |
|
47 | $this->doDefault(); |
|
48 | } else { |
|
49 | $this->doSaveCreate(); |
|
50 | } |
|
51 | ||
52 | break; |
|
53 | case 'create': |
|
54 | $this->doCreate(); |
|
55 | ||
56 | break; |
|
57 | case 'drop': |
|
58 | if (isset($_REQUEST['cancel'])) { |
|
59 | $this->doDefault(); |
|
60 | } else { |
|
61 | $this->doDrop(false); |
|
62 | } |
|
63 | ||
64 | break; |
|
65 | case 'confirm_drop': |
|
66 | $this->doDrop(true); |
|
67 | ||
68 | break; |
|
69 | case 'save_edit': |
|
70 | if (isset($_REQUEST['cancel'])) { |
|
71 | $this->doDefault(); |
|
72 | } else { |
|
73 | $this->doSaveEdit(); |
|
74 | } |
|
75 | ||
76 | break; |
|
77 | case 'edit': |
|
78 | $this->doEdit(); |
|
79 | ||
80 | break; |
|
81 | default: |
|
82 | $this->doDefault(); |
|
83 | ||
84 | break; |
|
85 | } |
|
86 | ||
87 | $this->printFooter(); |
|
88 | } |
|
89 | ||
90 | /** |
|
91 | * Show default list of users in the database. |