diff --git a/modules/admin_panel/SCsub b/modules/admin_panel/SCsub new file mode 100644 index 0000000..ec2551b --- /dev/null +++ b/modules/admin_panel/SCsub @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +Import("env_mod") +Import("env") + +env_mod.core_sources = [] + +env_mod.add_source_files(env_mod.core_sources, "*.cpp") + +# Build it all as a library +lib = env_mod.add_library("admin_panel", env_mod.core_sources) +env.Prepend(LIBS=[lib]) diff --git a/modules/admin_panel/admin_controller.cpp b/modules/admin_panel/admin_controller.cpp new file mode 100644 index 0000000..ff9ec36 --- /dev/null +++ b/modules/admin_panel/admin_controller.cpp @@ -0,0 +1,16 @@ +#include "admin_controller.h" + +#include "core/html/form_validator.h" +#include "core/html/html_builder.h" +#include "core/http/cookie.h" +#include "core/http/http_session.h" +#include "core/http/request.h" +#include "core/http/session_manager.h" + +AdminController::AdminController() : + Controller() { + +} + +AdminController::~AdminController() { +} diff --git a/modules/admin_panel/admin_controller.h b/modules/admin_panel/admin_controller.h new file mode 100644 index 0000000..f3d9013 --- /dev/null +++ b/modules/admin_panel/admin_controller.h @@ -0,0 +1,21 @@ +#ifndef ADMIN_CONTROLLER_H +#define ADMIN_CONTROLLER_H + +#include "core/http/controller.h" + +#include + +class Request; +class FormValidator; + +class AdminController : public Controller { + RCPP_OBJECT(AdminController, Controller); + +public: + AdminController(); + ~AdminController(); + +protected: +}; + +#endif \ No newline at end of file diff --git a/modules/admin_panel/admin_panel.cpp b/modules/admin_panel/admin_panel.cpp new file mode 100644 index 0000000..6f81b86 --- /dev/null +++ b/modules/admin_panel/admin_panel.cpp @@ -0,0 +1,36 @@ +#include "admin_panel.h" + +#include "core/html/form_validator.h" +#include "core/html/html_builder.h" +#include "core/http/cookie.h" +#include "core/http/http_session.h" +#include "core/http/request.h" +#include "core/http/session_manager.h" + +void AdminPanel::handle_request_main(Request *request) { +} + +void AdminPanel::create_validators() { +} + +AdminPanel *AdminPanel::get_singleton() { + return _self; +} + +AdminPanel::AdminPanel() : + Controller() { + + if (_self) { + printf("AdminPanel::AdminPanel(): Error! self is not null!/n"); + } + + _self = this; +} + +AdminPanel::~AdminPanel() { + if (_self == this) { + _self = nullptr; + } +} + +AdminPanel *AdminPanel::_self = nullptr; diff --git a/modules/admin_panel/admin_panel.h b/modules/admin_panel/admin_panel.h new file mode 100644 index 0000000..9193fd3 --- /dev/null +++ b/modules/admin_panel/admin_panel.h @@ -0,0 +1,27 @@ +#ifndef ADMIN_PANEL_H +#define ADMIN_PANEL_H + +#include "core/http/controller.h" + +#include + +class Request; +class FormValidator; + +class AdminPanel : public Controller { + RCPP_OBJECT(AdminPanel, Controller); + +public: + void handle_request_main(Request *request); + void create_validators(); + + static AdminPanel *get_singleton(); + + AdminPanel(); + ~AdminPanel(); + +protected: + static AdminPanel *_self; +}; + +#endif \ No newline at end of file diff --git a/modules/admin_panel/detect.py b/modules/admin_panel/detect.py new file mode 100644 index 0000000..148d2c6 --- /dev/null +++ b/modules/admin_panel/detect.py @@ -0,0 +1,26 @@ +import os +import platform +import sys + + +def is_active(): + return True + + +def get_name(): + return "users" + + +def can_build(): + return True + + +def get_opts(): + return [] + +def get_flags(): + + return [] + +def configure(env): + pass