//Tenga la clave action session_start(); //No tenga la clave action //$_REQUEST['action'] if (!array_key_exists(ConfigApp::$ACTION, $_REQUEST) || $_REQUEST[ConfigApp::$ACTION] == ConfigApp::$ACTION_DEFAULT) { $mainController = new controller(); $mainController->mostrarHome(); } else { switch ($_REQUEST[ConfigApp::$ACTION]) { case ConfigApp::$ACTION_INDEX_LOGIN: $mainController = new controller(); $mainController->mostrarLogin(); break; case ConfigApp::$ACTION_INDEX_REGISTRO: $mainController = new controller(); $mainController->mostrarRegistro(); break; case ConfigApp::$ACTION_INDEX_LOGUEARSE: $mainController = new controller(); $mainController->loguearse(); break; case ConfigApp::$ACTION_INDEX_REGISTRARSE: $mainController = new controller(); $mainController->registrarse(); break; case ConfigApp::$ACTION_DESLOGUEARSE: $mainController = new controller(); $mainController->desloguearse(); break; case ConfigApp::$ACTION_CAMBIAR_SWITCH: $mainController = new controller();