setcookie("id", 1, time(), "/");
            setcookie("hash", 1, time(), "/");
        }
    }
    //SINGLE
    public function view($id)
    {
        if (!$id) {
            header("Location: /user");
        } else {
            userController::loadView('view', $args = array('id' => $id));
        }
    }
    public function Run($action, $args)
    {
        $action = strtolower($action);
        if ($action == 'index') {
            userController::index();
        } elseif ($action == 'login') {
            userController::login();
        } elseif ($action == 'new') {
            userController::newUser();
        } elseif ($action == 'logout') {
            userController::logout();
        } elseif ($action == 'view') {
            userController::view((int) $args[0]);
        }
    }
}
userController::Run($router->action, $router->args);