JSlip  1.0
RootMenuController.php
Go to the documentation of this file.
1 <?php
8 require_once(dirname(__FILE__) . '/../../lib/View.php');
9 require_once(dirname(__FILE__) . '/../../lib/Controller.php');
10 require_once(dirname(__FILE__) . '/RootMenuModel.php');
11 
13 {
14  public $param;
15  public $rest;
16  public $viewName;
17  public $model;
18  public $view;
19  public $err;
20 
21  public function main($param) {
22 
23  if ($_SESSION['minfo']['role'] != 'root') {
24  $this->viewName = 'root_menu_err';
25  return;
26  }
27 
28  $this->rest = '';
29  $this->param = $param;
30  $this->model = new RootMenuModel();
31  $this->view = new View();
32 
33  $this->param['base'] = dirname(__FILE__);
34 
35  $this->err = $this->model->chkDatabse();
36 
37  if (empty($this->err)) {
38  $this->viewName = 'root_menu';
39  } else {
40  $this->viewName = 'root_menu_err';
41  }
42  }
43 }
View
Definition: View.php:8
Controller
Definition: Controller.php:15
RootMenuModel
Definition: RootMenuModel.php:10
RootMenuController\$view
$view
Definition: RootMenuController.php:18
RootMenuController\$err
$err
Definition: RootMenuController.php:19
RootMenuController\$viewName
$viewName
Definition: RootMenuController.php:16
RootMenuController\main
main($param)
Definition: RootMenuController.php:21
RootMenuController\$rest
$rest
Definition: RootMenuController.php:15
RootMenuController\$param
$param
Definition: RootMenuController.php:14
RootMenuController
Definition: RootMenuController.php:12
RootMenuController\$model
$model
Definition: RootMenuController.php:17