if (user::accessLevel($_COOKIE['id']) == 1) {
            if ($_SERVER['REQUEST_METHOD'] == 'POST') {
                task::INSERT($_POST['name'], $_POST['description'], $_POST['deadlineDate'], $_POST['giver_userID'], $_POST['doer_userID'], $_POST['priorityID'], $_POST['statusID'], $_POST['siteID']);
                //header("Location: /task");
            } else {
                taskController::loadView('new', $args = array());
            }
        } else {
            echo "You have no access";
        }
    }
    public function Run($action, $args)
    {
        $action = strtolower($action);
        if ($action == 'index') {
            taskController::index();
        } elseif ($action == 'view') {
            taskController::view((int) $args[0]);
        } elseif ($action == 'edit') {
            taskController::edit((int) $args[0]);
        } elseif ($action == 'new') {
            taskController::newEntry();
        } elseif ($action == 'delete') {
            taskController::delete((int) $args[0]);
        } else {
            header("Location: /task");
        }
    }
}
taskController::Run($router->action, $router->args);