#include "mourne_application.h" #include "core/http/request.h" #include #include "core/file_cache.h" #include "core/http/handler_instance.h" #include "core/database/database_manager.h" #include "core/html/html_builder.h" #include "core/http/http_session.h" #include "core/http/session_manager.h" #include "modules/users/user.h" #include "modules/users/user_controller.h" #include "buildings/building_initializer.h" #include "village/village_initializer.h" bool MourneApplication::is_logged_in(Request *request) { if (!request->session) { return false; } Ref u = request->reference_data["user"]; return u.is_valid(); } void MourneApplication::index(Object *instance, Request *request) { ENSURE_LOGIN(request); add_menu(request, MENUENTRY_NEWS); /* 2): ?> */ //dynamic_cast(instance)->index(request); request->body += "test"; request->compile_and_send_body(); } void MourneApplication::session_middleware_func(Object *instance, Request *request) { } void MourneApplication::add_menu(Request *request, const MenuEntries index) { request->head += menu_head; HTMLBuilder b; HTMLTag *t; /*