commit d9badeada73835bb7bff26fca6abece3ac982db6 Author: Dennis Eichhorn Date: Sun Nov 29 21:57:18 2015 +0100 Init diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php new file mode 100644 index 0000000..788402d --- /dev/null +++ b/Admin/Install/Navigation.php @@ -0,0 +1,38 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin\Admin\Install; + +/** + * Navigation class. + * + * @category Modules + * @package Modules\Admin + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +class Navigation +{ + public static function install($dbPool) + { + $navData = json_decode(file_get_contents(__DIR__ . '/nav.install.json'), true); + + $class = '\\Modules\\Navigation\\Admin\\Installer'; + $class::installExternal($dbPool, $navData); + } +} diff --git a/Admin/Install/nav.install.json b/Admin/Install/nav.install.json new file mode 100644 index 0000000..44d59e7 --- /dev/null +++ b/Admin/Install/nav.install.json @@ -0,0 +1,233 @@ +[ + { + "id": 1000101001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 0, + "name": "Admin", + "uri": null, + "target": "self", + "icon": "fa fa-lock", + "order": 1, + "from": "Admin", + "permission": null, + "parent": 0, + "children": [ + { + "id": 1000102001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "General", + "uri": "/{/lang}/backend/admin/settings/general", + "target": "self", + "icon": null, + "order": 1, + "from": "Admin", + "permission": null, + "parent": 1000101001, + "children": [] + }, + { + "id": 1000103001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Groups", + "uri": "/{/lang}/backend/admin/group/list", + "target": "self", + "icon": null, + "order": 2, + "from": "Admin", + "permission": null, + "parent": 1000101001, + "children": [ + { + "id": 1000103103, + "pid": "a82970f4c32b56731c03b912cd0ebc161272d088", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/admin/group/list", + "target": "self", + "icon": null, + "order": 1, + "from": "Admin", + "permission": null, + "parent": 1000103001, + "children": [] + }, + { + "id": 1000103104, + "pid": "a82970f4c32b56731c03b912cd0ebc161272d088", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/admin/group/create", + "target": "self", + "icon": null, + "order": 5, + "from": "Admin", + "permission": null, + "parent": 1000103001, + "children": [] + }, + { + "id": 1000103201, + "pid": "faf868d821cd23e7e3981cf4270c3880da584027", + "type": 0, + "subtype": 1, + "name": "Front", + "uri": "/{/lang}/backend/admin/group/single/front", + "target": "self", + "icon": null, + "order": 1, + "from": "Admin", + "permission": null, + "parent": 1000103001, + "children": [ + { + "id": 1000103211, + "pid": "faf868d821cd23e7e3981cf4270c3880da584027", + "type": 3, + "subtype": 1, + "name": "Front", + "uri": "/{/lang}/backend/admin/group/single/front", + "target": "self", + "icon": null, + "order": 1, + "from": "Admin", + "permission": null, + "parent": 1000103201, + "children": [] + }, + { + "id": 1000103212, + "pid": "faf868d821cd23e7e3981cf4270c3880da584027", + "type": 3, + "subtype": 1, + "name": "Members", + "uri": "/{/lang}/backend/admin/group/single/members", + "target": "self", + "icon": null, + "order": 2, + "from": "Admin", + "permission": null, + "parent": 1000103201, + "children": [] + } + ] + } + ] + }, + { + "id": 1000104001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Accounts", + "uri": "/{/lang}/backend/admin/account/list", + "target": "self", + "icon": null, + "order": 3, + "from": "Admin", + "permission": null, + "parent": 1000101001, + "children": [ + { + "id": 1000104101, + "pid": "06c40f113551672720d8251eeff5c3a2dbc168c2", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/admin/account/list", + "target": "self", + "icon": null, + "order": 1, + "from": "Admin", + "permission": null, + "parent": 1000104001, + "children": [] + }, + { + "id": 1000104202, + "pid": "06c40f113551672720d8251eeff5c3a2dbc168c2", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/admin/account/create", + "target": "self", + "icon": null, + "order": 5, + "from": "Admin", + "permission": null, + "parent": 1000104001, + "children": [] + }, + { + "id": 1000104300, + "pid": "f277f11a122129a52d36f788f42e5c09766cf4ae", + "type": 0, + "subtype": 0, + "name": "Front", + "uri": "/{/lang}/backend/admin/account/single/front", + "target": "self", + "icon": null, + "order": 3, + "from": "Admin", + "permission": null, + "parent": 1000104001, + "children": [ + { + "id": 1000104301, + "pid": "f277f11a122129a52d36f788f42e5c09766cf4ae", + "type": 3, + "subtype": 1, + "name": "Front", + "uri": "/{/lang}/backend/admin/account/single/front", + "target": "self", + "icon": null, + "order": 3, + "from": "Admin", + "permission": null, + "parent": 1000104300, + "children": [] + } + ] + } + ] + }, + { + "id": 1000105001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Modules", + "uri": "/{/lang}/backend/admin/module/list", + "target": "self", + "icon": null, + "order": 4, + "from": "Admin", + "permission": null, + "parent": 1000101001, + "children": [ + { + "id": 1000105101, + "pid": "6f43051bccfc2ded5ab2baf8b1b7cff2c0f2b2aa", + "type": 3, + "subtype": 1, + "name": "Settings", + "uri": "/{/lang}/backend/admin/module/setting", + "target": "self", + "icon": null, + "order": 4, + "from": "Admin", + "permission": null, + "parent": 1000105001, + "children": [] + } + ] + } + ] + } +] diff --git a/Admin/Installer.php b/Admin/Installer.php new file mode 100644 index 0000000..3212a46 --- /dev/null +++ b/Admin/Installer.php @@ -0,0 +1,227 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin\Admin; + +use phpOMS\DataStorage\Database\DatabaseType; +use phpOMS\DataStorage\Database\Pool; +use phpOMS\Module\InstallerAbstract; + +/** + * Admin install class. + * + * @category Modules + * @package Modules\Admin + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +class Installer extends InstallerAbstract +{ + + /** + * {@inheritdoc} + */ + public static function install(Pool $dbPool, array $info) + { + parent::install($dbPool, $info); + + switch ($dbPool->get('core')->getType()) { + case DatabaseType::MYSQL: + $dbPool->get('core')->con->beginTransaction(); + + /* Create group table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'group` ( + `group_id` int(11) NOT NULL AUTO_INCREMENT, + `group_name` varchar(50) NOT NULL, + `group_desc` varchar(100) DEFAULT NULL, + `group_created` datetime DEFAULT NULL, + PRIMARY KEY (`group_id`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + /* Create group relations table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'group_relations` ( + `group_relations_id` int(11) NOT NULL AUTO_INCREMENT, + `group_relations_group` int(11) DEFAULT NULL, + `group_relations_parent` int(11) DEFAULT NULL, + PRIMARY KEY (`group_relations_id`), + KEY `group_relations_group` (`group_relations_group`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'group_relations` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'group_relations_ibfk_1` FOREIGN KEY (`group_relations_group`) REFERENCES `' . $dbPool->get('core')->prefix . 'group` (`group_id`);' + )->execute(); + + /* Create group permission table */ + /* + * idx = module specific element id (since one module can have multiple things that need permissions) + * e.g. + * id1 = report_template (since it could also be a permission for a report) + * id2 = report_template_id + */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'group_permission` ( + `group_permission_id` int(11) NOT NULL AUTO_INCREMENT, + `group_permission_group` int(11) NOT NULL, + `group_permission_from` varchar(50) DEFAULT NULL, + `group_permission_for` varchar(50) DEFAULT NULL, + `group_permission_id1` int(11) DEFAULT NULL, + `group_permission_id2` int(11) DEFAULT NULL, + `group_permission_id3` int(11) DEFAULT NULL, + `group_permission_r` int(1) DEFAULT NULL, + `group_permission_w` int(1) DEFAULT NULL, + `group_permission_m` int(1) DEFAULT NULL, + `group_permission_d` int(1) DEFAULT NULL, + `group_permission_p` int(1) DEFAULT NULL, + PRIMARY KEY (`group_permission_id`), + KEY `group_permission_group` (`group_permission_group`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'group_permission` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'group_permission_ibfk_1` FOREIGN KEY (`group_permission_group`) REFERENCES `' . $dbPool->get('core')->prefix . 'group` (`group_id`);' + )->execute(); + + /* Create ips table + This gets used in order to prevent unauthorized access for user group. */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'ips` ( + `ips_id` int(11) NOT NULL AUTO_INCREMENT, + `ips_begin` bigint(20) NOT NULL, + `ips_end` bigint(20) NOT NULL, + `ips_group` int(11) DEFAULT NULL, + PRIMARY KEY (`ips_id`), + KEY `ips_group` (`ips_group`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'ips` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'ips_ibfk_1` FOREIGN KEY (`ips_group`) REFERENCES `' . $dbPool->get('core')->prefix . 'group` (`group_id`);' + )->execute(); + + /* Create account table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'account` ( + `account_id` int(11) NOT NULL AUTO_INCREMENT, + `account_status` tinyint(2) NOT NULL, + `account_type` tinyint(2) NOT NULL, + `account_login` varchar(30) NOT NULL, + `account_name1` varchar(50) NOT NULL, + `account_name2` varchar(50) NOT NULL, + `account_name3` varchar(50) NOT NULL, + `account_password` varchar(64) NOT NULL, + `account_email` varchar(70) NOT NULL, + `account_tries` tinyint(2) NOT NULL DEFAULT 0, + `account_lactive` datetime NOT NULL, + `account_created` datetime NOT NULL, + PRIMARY KEY (`account_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + /* Create account group table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'account_group` ( + `account_group_id` bigint(20) NOT NULL AUTO_INCREMENT, + `account_group_group` int(11) NOT NULL, + `account_group_account` int(11) NOT NULL, + PRIMARY KEY (`account_group_id`), + KEY `account_group_group` (`account_group_group`), + KEY `account_group_account` (`account_group_account`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'account_group` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'account_group_ibfk_1` FOREIGN KEY (`account_group_group`) REFERENCES `' . $dbPool->get('core')->prefix . 'group` (`group_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'account_group_ibfk_2` FOREIGN KEY (`account_group_account`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' + )->execute(); + + /* Create account permission table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'account_permission` ( + `account_permission_id` int(11) NOT NULL AUTO_INCREMENT, + `account_permission_account` int(11) NOT NULL, + `account_permission_from` varchar(50) DEFAULT NULL, + `account_permission_for` varchar(50) DEFAULT NULL, + `account_permission_id1` int(11) DEFAULT NULL, + `account_permission_id2` int(11) DEFAULT NULL, + `account_permission_id3` int(11) DEFAULT NULL, + `account_permission_r` int(1) DEFAULT NULL, + `account_permission_w` int(1) DEFAULT NULL, + `account_permission_m` int(1) DEFAULT NULL, + `account_permission_d` int(1) DEFAULT NULL, + `account_permission_p` int(1) DEFAULT NULL, + PRIMARY KEY (`account_permission_id`), + KEY `account_permission_account` (`account_permission_account`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'account_permission` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'account_permission_ibfk_1` FOREIGN KEY (`account_permission_account`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' + )->execute(); + + /* Create account settings table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'account_settings` ( + `account_settings_id` int(11) NOT NULL AUTO_INCREMENT, + `account_settings_name` varchar(30) NOT NULL, + `account_settings_content` varchar(250) NOT NULL, + `account_settings_account` int(11) NOT NULL, + PRIMARY KEY (`account_settings_id`), + UNIQUE KEY `account_settings_name` (`account_settings_name`), + KEY `account_settings_account` (`account_settings_account`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'account_settings` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'account_settings_ibfk_1` FOREIGN KEY (`account_settings_account`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' + )->execute(); + + /* Create settings table */ + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'settings` ( + `settings_id` int(11) NOT NULL AUTO_INCREMENT, + `settings_module` varchar(255) DEFAULT NULL, + `settings_name` varchar(100) NOT NULL, + `settings_content` varchar(255) NOT NULL, + `settings_group` int(11) DEFAULT NULL, + PRIMARY KEY (`settings_id`), + KEY `settings_module` (`settings_module`), + KEY `settings_group` (`settings_group`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'settings` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'settings_ibfk_1` FOREIGN KEY (`settings_module`) REFERENCES `' . $dbPool->get('core')->prefix . 'module` (`module_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'settings_ibfk_2` FOREIGN KEY (`settings_group`) REFERENCES `' . $dbPool->get('core')->prefix . 'group` (`group_id`);' + )->execute(); + + $dbPool->get('core')->con->commit(); + break; + } + } +} diff --git a/Controller.php b/Controller.php new file mode 100644 index 0000000..1a41b0c --- /dev/null +++ b/Controller.php @@ -0,0 +1,326 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin; + +use Modules\Admin\Models\AccountMapper; +use Modules\Admin\Models\GroupMapper; +use Modules\Navigation\Models\Navigation; +use Modules\Navigation\Views\NavigationView; +use phpOMS\Contract\RenderableInterface; +use phpOMS\Message\RequestAbstract; +use phpOMS\Message\RequestDestination; +use phpOMS\Message\ResponseAbstract; +use phpOMS\Module\ModuleAbstract; +use phpOMS\Module\WebInterface; +use phpOMS\Views\View; +use phpOMS\Views\ViewLayout; + +/** + * Admin controller class. + * + * @category Modules + * @package Modules\Admin + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +class Controller extends ModuleAbstract implements WebInterface +{ + + /** + * Module name. + * + * @var \string + * @since 1.0.0 + */ + protected static $module = 'Admin'; + + /** + * Localization files. + * + * @var \string + * @since 1.0.0 + */ + protected static $localization = [ + RequestDestination::BACKEND => ['backend'], + ]; + + /** + * Providing. + * + * @var \string + * @since 1.0.0 + */ + protected static $providing = [ + 'Content', + ]; + + /** + * Dependencies. + * + * @var \string + * @since 1.0.0 + */ + protected static $dependencies = []; + + /** + * Routing elements. + * + * @var array + * @since 1.0.0 + */ + protected static $routes = [ + '^.*/backend/admin/settings/general.*$' => [['dest' => '\Modules\Admin\Controller:viewSettingsGeneral', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/admin/account/list.*$' => [['dest' => '\Modules\Admin\Controller:viewAccountList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/admin/account/settings.*$' => [['dest' => '\Modules\Admin\Controller:viewAccountSettings', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/admin/account/create.*$' => [['dest' => '\Modules\Admin\Controller:viewAccountCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/admin/group/list.*$' => [['dest' => '\Modules\Admin\Controller:viewGroupList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/admin/group/settings.*$' => [['dest' => '\Modules\Admin\Controller:viewGroupSettings', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/admin/group/create.*$' => [['dest' => '\Modules\Admin\Controller:viewGroupCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + + '^.*/backend/admin/module/list.*$' => [['dest' => '\Modules\Admin\Controller:viewModuleList', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + '^.*/backend/admin/module/settings.*$' => [['dest' => '\Modules\Admin\Controller:viewModuleProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],], + ]; + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewSettingsGeneral(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $settings = $this->app->appSettings->get([ + 1000000009, + 1000000019, + 1000000020, + 1000000021, + 1000000022, + 1000000023, + 1000000027, + 1000000028, + ]); + + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/settings-general'); + $view->addData('nav', $this->createNavigation(1000104001, $request, $response)); + + $view->setData('oname', $settings[1000000009]); + $view->setData('country', $settings[1000000019]); + $view->setData('timezone', $settings[1000000021]); + $view->setData('timeformat', $settings[1000000022]); + $view->setData('language', $settings[1000000020]); + $view->setData('currency', $settings[1000000023]); + $view->setData('decimal_point', $settings[1000000027]); + $view->setData('thousands_sep', $settings[1000000028]); + $view->setData('countries', $settings[1000000028]); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewAccountList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/accounts-list'); + $view->addData('nav', $this->createNavigation(1000104001, $request, $response)); + + $accountMapper = new AccountMapper($this->app->dbPool->get()); + $view->setData('list:elements', $accountMapper->getAll()); + $view->setData('list:count', 1); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewAccountSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/accounts-single'); + $view->addData('nav', $this->createNavigation(1000104001, $request, $response)); + + $accountMapper = new AccountMapper($this->app->dbPool->get()); + $view->addData('account', $accountMapper->get((int) $request->getData('id'))); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewAccountCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/accounts-create'); + $view->addData('nav', $this->createNavigation(1000104001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewGroupList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/groups-list'); + $view->addData('nav', $this->createNavigation(1000103001, $request, $response)); + + $groupMapper = new GroupMapper($this->app->dbPool->get()); + $view->setData('list:elements', $groupMapper->getAll()); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewGroupSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/groups-single'); + $view->addData('nav', $this->createNavigation(1000103001, $request, $response)); + + $groupMapper = new GroupMapper($this->app->dbPool->get()); + $view->addData('group', $groupMapper->get((int) $request->getData('id'))); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewGroupCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/groups-create'); + $view->addData('nav', $this->createNavigation(1000103001, $request, $response)); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewModuleList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/modules-list'); + + return $view; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewModuleProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Admin/Theme/backend/modules-single'); + + return $view; + } + + /** + * @param int $pageId Page/parent Id for navigation + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * + * @return RenderableInterface + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + private function createNavigation(\int $pageId, RequestAbstract $request, ResponseAbstract $response) + { + $nav = Navigation::getInstance($request, $this->app->dbPool); + $navView = new NavigationView($this->app, $request, $response); + $navView->setTemplate('/Modules/Navigation/Theme/backend/mid'); + $navView->setNav($nav->getNav()); + $navView->setLanguage($request->getL11n()->language); + $navView->setParent($pageId); + + return $navView; + } +} diff --git a/Models/Account.php b/Models/Account.php new file mode 100644 index 0000000..324d727 --- /dev/null +++ b/Models/Account.php @@ -0,0 +1,26 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin\Models; + +class Account extends \phpOMS\Account\Account +{ + protected $createdAt = null; + + public function getCreatedAt() : \DateTime + { + return $this->createdAt ?? new \DateTime('NOW'); + } +} diff --git a/Models/AccountMapper.php b/Models/AccountMapper.php new file mode 100644 index 0000000..40ce0b9 --- /dev/null +++ b/Models/AccountMapper.php @@ -0,0 +1,68 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin\Models; + +use phpOMS\DataStorage\Database\DataMapperAbstract; + +class AccountMapper extends DataMapperAbstract +{ + + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + protected static $columns = [ + 'account_id' => ['name' => 'account_id', 'type' => 'int', 'internal' => 'id'], + 'account_status' => ['name' => 'account_status', 'type' => 'int', 'internal' => 'status'], + 'account_type' => ['name' => 'account_type', 'type' => 'int', 'internal' => 'type'], + 'account_login' => ['name' => 'account_login', 'type' => 'string', 'internal' => 'login'], + 'account_name1' => ['name' => 'account_name1', 'type' => 'string', 'internal' => 'name1'], + 'account_name2' => ['name' => 'account_name2', 'type' => 'string', 'internal' => 'name2'], + 'account_name3' => ['name' => 'account_name3', 'type' => 'string', 'internal' => 'name3'], + 'account_password' => ['name' => 'account_password', 'type' => 'string', 'internal' => 'password'], + 'account_email' => ['name' => 'account_email', 'type' => 'string', 'internal' => 'email'], + 'account_tries' => ['name' => 'account_tries', 'type' => 'int', 'internal' => 'tries'], + 'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime', + 'internal' => 'lastActive'], + 'account_created' => ['name' => 'account_created', 'type' => 'int', 'internal' => 'created'], + ]; + + /** + * Primary table. + * + * @var \string + * @since 1.0.0 + */ + protected static $table = 'account'; + + /** + * Primary field name. + * + * @var \string + * @since 1.0.0 + */ + protected static $primaryField = 'account_id'; + + /** + * Created at column + * + * @var \string + * @since 1.0.0 + */ + protected static $createdAt = 'account_created'; +} diff --git a/Models/Group.php b/Models/Group.php new file mode 100644 index 0000000..4fa4fed --- /dev/null +++ b/Models/Group.php @@ -0,0 +1,26 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin\Models; + +class Group extends \phpOMS\Account\Group +{ + protected $createdAt = null; + + public function getCreatedAt() : \DateTime + { + return $this->createdAt ?? new \DateTime('NOW'); + } +} diff --git a/Models/GroupMapper.php b/Models/GroupMapper.php new file mode 100644 index 0000000..509b12e --- /dev/null +++ b/Models/GroupMapper.php @@ -0,0 +1,59 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Admin\Models; + +use phpOMS\DataStorage\Database\DataMapperAbstract; + +class GroupMapper extends DataMapperAbstract +{ + + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + protected static $columns = [ + 'group_id' => ['name' => 'group_id', 'type' => 'int', 'internal' => 'id'], + 'group_name' => ['name' => 'group_name', 'type' => 'string', 'internal' => 'name'], + 'group_desc' => ['name' => 'group_desc', 'type' => 'string', 'internal' => 'description'], + 'group_created' => ['name' => 'group_created', 'type' => 'DateTime', 'internal' => 'createdAt'], + ]; + + /** + * Primary table. + * + * @var \string + * @since 1.0.0 + */ + protected static $table = 'group'; + + /** + * Primary field name. + * + * @var \string + * @since 1.0.0 + */ + protected static $primaryField = 'group_id'; + + /** + * Created at column + * + * @var \string + * @since 1.0.0 + */ + protected static $createdAt = 'group_created'; +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..cfba9ee --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Admin # + +The Admin module is part of the core modules for OMS. This module is managing for modules, accounts, groups, permissions and monitoring. + +## Modules ## + +## Accounts ## + +## Groups ## + +## Permissions ## + +## Monitoring ## diff --git a/Theme/backend/accounts-create.tpl.php b/Theme/backend/accounts-create.tpl.php new file mode 100644 index 0000000..214588a --- /dev/null +++ b/Theme/backend/accounts-create.tpl.php @@ -0,0 +1,80 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Admin']['Account'] ?>

+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Groups'] ?>

+
+
+ + +
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Permissions'] ?>

+
+
+ + +
+
+
+
+
+
+
diff --git a/Theme/backend/accounts-list.tpl.php b/Theme/backend/accounts-list.tpl.php new file mode 100644 index 0000000..fa09d06 --- /dev/null +++ b/Theme/backend/accounts-list.tpl.php @@ -0,0 +1,57 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/** + * @var \phpOMS\Views\View $this + */ + + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); + +$footerView->setPages($this->getData('list:count') / 25); +$footerView->setPage(1); +$footerView->setResults($this->getData('list:count')); + +echo $this->getData('nav')->render(); +?> + +
+ + + + + + + getData('list:elements') as $key => $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/account/settings?id=' . $value->getId()); ?> + +
l11n->lang['Admin']['Groups']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Admin']['Status']; ?> + l11n->lang['Admin']['Name']; ?> + l11n->lang['Admin']['Activity']; ?> + l11n->lang['Admin']['Created']; ?> +
render(); ?> +
getStatus(); ?> + getId(); ?> + getName1(); ?> + getLastActive()->format('Y-m-d H:i:s'); ?> + getCreatedAt()->format('Y-m-d H:i:s'); ?> + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/accounts-single.tpl.php b/Theme/backend/accounts-single.tpl.php new file mode 100644 index 0000000..4b94ae0 --- /dev/null +++ b/Theme/backend/accounts-single.tpl.php @@ -0,0 +1,87 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/* + * UI Logic + */ + +$account = $this->getData('account'); +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Admin']['Account'] ?>

+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Groups'] ?>

+
+
+ + +
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Permissions'] ?>

+
+
+ + +
+
+
+
+
+
+
diff --git a/Theme/backend/groups-create.tpl.php b/Theme/backend/groups-create.tpl.php new file mode 100644 index 0000000..1edd32b --- /dev/null +++ b/Theme/backend/groups-create.tpl.php @@ -0,0 +1,64 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/* + * UI Logic + */ + +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Admin']['Group'] ?>

+
+
+ + +
+
+
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Parent'] ?>

+
+
+ + +
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Permissions'] ?>

+
+
+ + +
+
+
+
+
+
+
diff --git a/Theme/backend/groups-list.tpl.php b/Theme/backend/groups-list.tpl.php new file mode 100644 index 0000000..46384d9 --- /dev/null +++ b/Theme/backend/groups-list.tpl.php @@ -0,0 +1,55 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/** + * @var \phpOMS\Views\View $this + */ + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); + +$footerView->setPages($this->getData('list:count') ?? 0 / 25); +$footerView->setPage(1); +$footerView->setResults($this->getData('list:count') ?? 1); + +echo $this->getData('nav')->render(); ?> + +
+ + + + + + + getData('list:elements') as $key => $value) : $c++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> + +
l11n->lang['Admin']['Groups']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Admin']['Name']; ?> + l11n->lang['Admin']['Parents']; ?> + l11n->lang['Admin']['Children']; ?> + l11n->lang['Admin']['Members']; ?> +
render(); ?> +
getId(); ?> + getName(); ?> + + + + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/groups-single.tpl.php b/Theme/backend/groups-single.tpl.php new file mode 100644 index 0000000..8d60803 --- /dev/null +++ b/Theme/backend/groups-single.tpl.php @@ -0,0 +1,84 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/* + * UI Logic + */ + +$group = $this->getData('group'); + +echo $this->getData('nav')->render(); ?> + +
+

l11n->lang['Admin']['Group'] ?>

+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Parent'] ?>

+
+
+ + +
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Permissions'] ?>

+
+
+ + +
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Accounts'] ?>

+
+
+ + +
+
+
+
+
+
+
+ + diff --git a/Theme/backend/modules-list.tpl.php b/Theme/backend/modules-list.tpl.php new file mode 100644 index 0000000..6bc650b --- /dev/null +++ b/Theme/backend/modules-list.tpl.php @@ -0,0 +1,62 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/** + * @var \phpOMS\Views\View $this + */ + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); + +$modules = $this->app->moduleManager->getAllModules(); +$active = $this->app->moduleManager->getActiveModules(); +$installed = $this->app->moduleManager->getInstalledModules(); + +$footerView->setPages(count($modules) / 25); +$footerView->setPage(1); +$footerView->setResults(count($modules)); +?> + +
+ + + + + + + + $module) : $count++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/module/settings?id=' . $module['name']['internal']); ?> + +
l11n->lang['Admin']['Modules']; ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Admin']['Name']; ?> + l11n->lang['Admin']['Version']; ?> + l11n->lang['Admin']['Status']; ?> +
render(); ?> +
+ + + l11n->lang['Admin']['Active']); + elseif (in_array($module['name']['internal'], $installed)) + echo strtolower($this->l11n->lang['Admin']['Inactive']); + else + echo strtolower($this->l11n->lang['Admin']['Available']); ?> + + +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/backend/modules-settings.tpl.php b/Theme/backend/modules-settings.tpl.php new file mode 100644 index 0000000..e69de29 diff --git a/Theme/backend/modules-single.tpl.php b/Theme/backend/modules-single.tpl.php new file mode 100644 index 0000000..53274a4 --- /dev/null +++ b/Theme/backend/modules-single.tpl.php @@ -0,0 +1,86 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/** + * @var \phpOMS\Views\View $this + */ + +$modules = $this->app->moduleManager->getAllModules(); +$active = $this->app->moduleManager->getActiveModules(); +$installed = $this->app->moduleManager->getInstalledModules(); + +$id = $this->request->getData('id') ?? 1; +?> + +
+

+ +
+ + + + + + + + +
l11n->lang['Admin']['Name'] ?> + +
l11n->lang['Admin']['Version'] ?> + +
l11n->lang['Admin']['CreatedBy'] ?> + +
l11n->lang['Admin']['Website'] ?> + +
l11n->lang['Admin']['Description'] ?> + +
+ + + + + + + + + +
+
+
+ +
+

l11n->lang['Admin']['Settings'] ?>

+ +
+ +
+
+ +
+

l11n->lang['Admin']['Groups'] ?>

+ +
+ +
+
+ +
+

l11n->lang['Admin']['Permissions'] ?>

+ +
+ +
+
diff --git a/Theme/backend/settings-general.tpl.php b/Theme/backend/settings-general.tpl.php new file mode 100644 index 0000000..c9ce872 --- /dev/null +++ b/Theme/backend/settings-general.tpl.php @@ -0,0 +1,98 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/* + * UI Logic + */ + +$_oname = $this->getData('oname') ?? ''; +$_timezone = $this->getData('timezone') ?? ''; +$_timeformat = $this->getData('timeformat') ?? ''; +$_language = $this->getData('language') ?? ''; +$_currency = $this->getData('currency') ?? ''; +$_decimal_point = $this->getData('decimal_point') ?? ''; +$_thousands_sep = $this->getData('thousands_sep') ?? ''; +$_password = $this->getData('password') ?? ''; +$_country = $this->getData('country') ?? ''; + +$countries = \phpOMS\Localization\ISO3166EnumArray::getConstants(); +$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants(); +$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants(); +$languages = \phpOMS\Localization\ISO639EnumArray::getConstants(); +$currencies = \phpOMS\Localization\ISO4217EnumArray::getConstants(); + +?> +
+

l11n->lang['Admin']['Settings'] ?>

+
+
+ + +
+
+
+
+
+
+
+
+
+ +
+

l11n->lang['Admin']['Localization'] ?>

+
+
+ + +
+
+
+
+
+
+
+
+
+
+

l11n->lang['Admin']['Numberformat'] ?>

+
+ +
+ +
+
+
+
+
diff --git a/Theme/lang/api.en.lang.php b/Theme/lang/api.en.lang.php new file mode 100644 index 0000000..d53f90f --- /dev/null +++ b/Theme/lang/api.en.lang.php @@ -0,0 +1,18 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +$MODLANG[1] = [ + 'i:ModuleInstalled' => 'Installation of the module {$1} was successful.', +]; diff --git a/Theme/lang/backend.en.lang.php b/Theme/lang/backend.en.lang.php new file mode 100644 index 0000000..a45b991 --- /dev/null +++ b/Theme/lang/backend.en.lang.php @@ -0,0 +1,104 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +$MODLANG['Admin'] = [ + 'Account' => 'Account', + 'Accounts' => 'Accounts', + 'Active' => 'Active', + 'Activate' => 'Activate', + 'Activity' => 'Activity', + 'Available' => 'Available', + 'All' => 'All', + 'Banned' => 'Banned', + 'Cache' => 'Cache', + 'Children' => 'Children', + 'Country' => 'Country', + 'Created' => 'Created', + 'CreatedBy' => 'Created By', + 'Currency' => 'Currency', + 'DecimalPoint' => 'Decimal Point', + 'Description' => 'Description', + 'Delete' => 'Delete', + 'Deactivate' => 'Deactivate', + 'Email' => 'Email', + 'EmailAdmin' => 'Email Admin', + 'Features' => 'Features', + 'File' => 'File', + 'Group' => 'Group', + 'Groups' => 'Groups', + 'Inactive' => 'Inactive', + 'Install' => 'Install', + 'Installed' => 'Installed', + 'LAddress' => 'Local Address', + 'Language' => 'Language', + 'Localization' => 'Localization', + 'Loginname' => 'Login Name', + 'Lowercase' => 'Lowercase', + 'Maintenance' => 'Maintenance', + 'Member' => 'Member', + 'Members' => 'Members', + 'Memcache' => 'Memcache', + 'MemoryLimit' => 'Memory Limit', + 'Message' => 'Message', + 'Module' => 'Module', + 'Modules' => 'Modules', + 'Name' => 'Name', + 'Name1' => 'Name 1', + 'Name2' => 'Name 2', + 'Name3' => 'Name 3', + 'None' => 'None', + 'Numberformat' => 'Numberformat', + 'Numeric' => 'Numeric', + 'Organization' => 'Organization', + 'OrganizationName' => 'Organization Name', + 'Page' => 'Page', + 'Parent' => 'Parent', + 'Parents' => 'Parents', + 'Password' => 'Password', + 'PasswordRegex' => 'Password Regex', + 'Permissions' => 'Permissions', + 'Person' => 'Person', + 'Profile' => 'Profile', + 'RAddress' => 'Remote Address', + 'ReCache' => 'Re-Cache', + 'Running' => 'Running', + 'Settings' => 'Settings', + 'SettingsGeneral' => 'Settings - General', + 'Single' => 'Single', + 'Specialchar' => 'Special character', + 'Status' => 'Status', + 'Total' => 'Total', + 'Release' => 'Release', + 'Theme' => 'Theme', + 'ThousandsSeparator' => 'Thousands Separator', + 'Time' => 'Time', + 'Timestamp' => 'Timestamp', + 'Timeformat' => 'Timeformat', + 'Timeout' => 'Timeout', + 'Timezone' => 'Timezone', + 'Type' => 'Type', + 'Uninstall' => 'Uninstall', + 'Uppercase' => 'Uppercase', + 'Username' => 'Username', + 'Version' => 'Version', + 'Warnings' => 'Warnings', + 'Website' => 'Website', + 'i:loc' => 'IP address or URL for remote access.', + 'i:mail' => 'Email address.', + 'i:oname' => 'Organization name.', + 'i:rem' => 'IP address or URL for remote access.', + 'i:rc' => 'Forcing re-cache for every user.', + 'i:timef' => 'Time format.', +]; diff --git a/Theme/lang/nav.backend.en.lang.php b/Theme/lang/nav.backend.en.lang.php new file mode 100644 index 0000000..37d5c93 --- /dev/null +++ b/Theme/lang/nav.backend.en.lang.php @@ -0,0 +1,27 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +$MODLANG['Navigation'] = [ + 'Admin' => 'Admin', + 'Create' => 'Create', + 'Front' => 'Front', + 'General' => 'General', + 'Groups' => 'Groups', + 'List' => 'List', + 'Members' => 'Members', + 'Modules' => 'Modules', + 'Account' => 'Account', + 'Accounts' => 'Accounts', +]; diff --git a/img/module_teaser_small.png b/img/module_teaser_small.png new file mode 100644 index 0000000..f56e6ff Binary files /dev/null and b/img/module_teaser_small.png differ diff --git a/info.json b/info.json new file mode 100644 index 0000000..9ca23bc --- /dev/null +++ b/info.json @@ -0,0 +1,51 @@ +{ + "name": { + "id": 1000100000, + "internal": "Admin", + "external": "OMS Admin" + }, + "version": "1.0.0", + "requirements": { + "phpOMS": "1.0.0", + "phpOMS-db": "1.0.0" + }, + "creator": { + "name": "Orange Management", + "website": "www.spl1nes.com" + }, + "description": "The administration module.", + "directory": "Admin", + "dependencies": {}, + "providing": { + "Navigation": "*" + }, + "load": [ + { + "pid": [ + "1854402adfd24425fd13776a2d3787151609b360" + ], + "type": 4, + "for": "Content", + "file": "Admin", + "from": "Admin" + }, + { + "pid": [ + "754a08ddf8bcb1cf22f310f09206dd783d42f7dd" + ], + "type": 5, + "from": "Admin", + "for": "Navigation", + "file": "nav.backend" + }, + { + "pid": [ + "1854402adfd24425fd13776a2d3787151609b360" + ], + "type": 5, + "for": "Content", + "file": "backend", + "from": "Admin" + } + ] +}