Beispiel #1
0
$page = $route[1];
//single page app
switch ($page) {
    case "fileUpload":
        require_once "controllers/FilesController.class.php";
        break;
    case "home":
        $homeController = new HomeController();
        if ($route[2] == "logout") {
            $homeController->logout();
        } elseif ($route[2] == 'signup') {
            $homeController->signup();
        } elseif ($route[2] == 'login') {
            $homeController->login();
        } elseif ($route[2] == 'forgetPassword') {
            $homeController->forgetPassword();
        }
        $where = $route[2];
        switch ($where) {
            case 'serviceRequest':
                $homeController->serviceRequest();
                break;
            default:
                $homeController->render();
                break;
        }
        break;
    case "workers":
        $workerController = new WorkerController();
        $where = $route[2];
        //var_dump($route);die();