#include "ccms_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 "modules/rbac_users/rbac_user_controller.h" #include "modules/admin_panel/admin_panel.h" #include "modules/rbac/rbac_controller.h" #include "modules/rbac/rbac_model.h" bool CCMSApplication::is_logged_in(Request *request) { if (!request->session) { return false; } Ref u = request->reference_data["user"]; return u.is_valid(); } void CCMSApplication::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 CCMSApplication::session_middleware_func(Object *instance, Request *request) { } void CCMSApplication::add_menu(Request *request, const MenuEntries index) { request->head += menu_head; HTMLBuilder b; HTMLTag *t; /*