From a343313a5240bc74f4648376a290133ac712afcb Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Mar 2019 09:30:13 +0100 Subject: Delete unused and unmaintained modules --- .../baseconfig/getconfig.inc.php | 19 -- .../baseconfig_partitions_cdn/config.json | 6 - .../baseconfig_partitions_cdn/install.inc.php | 31 --- .../lang/de/messages.json | 3 - .../baseconfig_partitions_cdn/lang/de/module.json | 4 - .../lang/de/permissions.json | 7 - .../lang/de/template-tags.json | 19 -- .../lang/en/messages.json | 3 - .../baseconfig_partitions_cdn/lang/en/module.json | 4 - .../lang/en/permissions.json | 7 - .../lang/en/template-tags.json | 19 -- .../lang/pt/template-tags.json | 16 -- .../baseconfig_partitions_cdn/page.inc.php | 156 ------------ .../permissions/permissions.json | 17 -- .../baseconfig_partitions_cdn/style.css | 4 - .../baseconfig_partitions_cdn/templates/_page.html | 151 ------------ modules-available/citymanagement/config.json | 4 - modules-available/citymanagement/install.inc.php | 22 -- .../citymanagement/lang/de/categories.json | 3 - .../citymanagement/lang/en/categories.json | 3 - .../citymanagement/lang/en/module.json | 3 - .../citymanagement/lang/en/template-tags.json | 13 - .../citymanagement/lang/pt/module.json | 3 - .../citymanagement/lang/pt/template-tags.json | 11 - modules-available/citymanagement/page.inc.php | 81 ------- .../templates/page-citymanagement.html | 77 ------ modules-available/imgmanagement/config.json | 4 - .../imgmanagement/lang/de/module.json | 3 - .../imgmanagement/lang/en/module.json | 3 - .../imgmanagement/lang/pt/module.json | 3 - .../imgmanagement/lang/pt/template-tags.json | 3 - modules-available/imgmanagement/page.inc.php | 63 ----- .../templates/page-imgmanagement.html | 62 ----- modules-available/internetaccess/config.json | 3 - .../internetaccess/lang/de/messages.json | 4 - .../internetaccess/lang/de/permissions.json | 3 - .../internetaccess/lang/de/template-tags.json | 17 -- .../internetaccess/lang/en/messages.json | 4 - .../internetaccess/lang/en/module.json | 3 - .../internetaccess/lang/en/permissions.json | 3 - .../internetaccess/lang/en/template-tags.json | 17 -- .../internetaccess/lang/pt/messages.json | 4 - modules-available/internetaccess/page.inc.php | 62 ----- .../internetaccess/permissions/permissions.json | 5 - modules-available/internetaccess/style.css | 3 - .../internetaccess/templates/_page.html | 38 --- .../internetaccess/templates/restart.html | 22 -- modules-available/support/config.json | 3 - modules-available/support/faq.json | 19 -- modules-available/support/lang/de/messages.json | 4 - modules-available/support/lang/de/module.json | 3 - .../support/lang/de/template-tags.json | 3 - modules-available/support/lang/en/messages.json | 4 - modules-available/support/lang/pt/messages.json | 4 - modules-available/support/lang/pt/module.json | 3 - .../support/lang/pt/template-tags.json | 17 -- modules-available/support/page.inc.php | 83 ------- modules-available/support/templates/page-faq.html | 29 --- .../support/templates/page-support.html | 59 ----- modules-available/sysconfignew/config.json | 3 - .../sysconfignew/lang/en/template-tags.json | 23 -- .../sysconfignew/lang/pt/template-tags.json | 23 -- modules-available/sysconfignew/page.inc.php | 114 --------- modules-available/sysconfignew/style.css | 59 ----- .../sysconfignew/templates/_pagenew.html | 190 --------------- .../sysconfignew/templates/module-editor.html | 269 --------------------- modules-available/usermanagement/config.json | 4 - .../usermanagement/lang/de/module.json | 3 - .../usermanagement/lang/en/module.json | 3 - .../usermanagement/lang/en/template-tags.json | 13 - .../usermanagement/lang/pt/module.json | 3 - .../usermanagement/lang/pt/template-tags.json | 13 - modules-available/usermanagement/page.inc.php | 140 ----------- .../usermanagement/templates/user-management.html | 132 ---------- 74 files changed, 2238 deletions(-) delete mode 100644 modules-available/baseconfig_partitions_cdn/baseconfig/getconfig.inc.php delete mode 100644 modules-available/baseconfig_partitions_cdn/config.json delete mode 100644 modules-available/baseconfig_partitions_cdn/install.inc.php delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/de/messages.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/de/module.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/de/permissions.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/de/template-tags.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/en/messages.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/en/module.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/en/permissions.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/en/template-tags.json delete mode 100644 modules-available/baseconfig_partitions_cdn/lang/pt/template-tags.json delete mode 100644 modules-available/baseconfig_partitions_cdn/page.inc.php delete mode 100644 modules-available/baseconfig_partitions_cdn/permissions/permissions.json delete mode 100644 modules-available/baseconfig_partitions_cdn/style.css delete mode 100644 modules-available/baseconfig_partitions_cdn/templates/_page.html delete mode 100644 modules-available/citymanagement/config.json delete mode 100644 modules-available/citymanagement/install.inc.php delete mode 100644 modules-available/citymanagement/lang/de/categories.json delete mode 100644 modules-available/citymanagement/lang/en/categories.json delete mode 100644 modules-available/citymanagement/lang/en/module.json delete mode 100644 modules-available/citymanagement/lang/en/template-tags.json delete mode 100644 modules-available/citymanagement/lang/pt/module.json delete mode 100644 modules-available/citymanagement/lang/pt/template-tags.json delete mode 100644 modules-available/citymanagement/page.inc.php delete mode 100644 modules-available/citymanagement/templates/page-citymanagement.html delete mode 100644 modules-available/imgmanagement/config.json delete mode 100644 modules-available/imgmanagement/lang/de/module.json delete mode 100644 modules-available/imgmanagement/lang/en/module.json delete mode 100644 modules-available/imgmanagement/lang/pt/module.json delete mode 100644 modules-available/imgmanagement/lang/pt/template-tags.json delete mode 100644 modules-available/imgmanagement/page.inc.php delete mode 100644 modules-available/imgmanagement/templates/page-imgmanagement.html delete mode 100644 modules-available/internetaccess/config.json delete mode 100644 modules-available/internetaccess/lang/de/messages.json delete mode 100644 modules-available/internetaccess/lang/de/permissions.json delete mode 100644 modules-available/internetaccess/lang/de/template-tags.json delete mode 100644 modules-available/internetaccess/lang/en/messages.json delete mode 100644 modules-available/internetaccess/lang/en/module.json delete mode 100644 modules-available/internetaccess/lang/en/permissions.json delete mode 100644 modules-available/internetaccess/lang/en/template-tags.json delete mode 100644 modules-available/internetaccess/lang/pt/messages.json delete mode 100644 modules-available/internetaccess/page.inc.php delete mode 100644 modules-available/internetaccess/permissions/permissions.json delete mode 100644 modules-available/internetaccess/style.css delete mode 100644 modules-available/internetaccess/templates/_page.html delete mode 100644 modules-available/internetaccess/templates/restart.html delete mode 100644 modules-available/support/config.json delete mode 100644 modules-available/support/faq.json delete mode 100644 modules-available/support/lang/de/messages.json delete mode 100644 modules-available/support/lang/de/module.json delete mode 100644 modules-available/support/lang/de/template-tags.json delete mode 100644 modules-available/support/lang/en/messages.json delete mode 100644 modules-available/support/lang/pt/messages.json delete mode 100644 modules-available/support/lang/pt/module.json delete mode 100644 modules-available/support/lang/pt/template-tags.json delete mode 100644 modules-available/support/page.inc.php delete mode 100644 modules-available/support/templates/page-faq.html delete mode 100644 modules-available/support/templates/page-support.html delete mode 100644 modules-available/sysconfignew/config.json delete mode 100644 modules-available/sysconfignew/lang/en/template-tags.json delete mode 100644 modules-available/sysconfignew/lang/pt/template-tags.json delete mode 100644 modules-available/sysconfignew/page.inc.php delete mode 100644 modules-available/sysconfignew/style.css delete mode 100644 modules-available/sysconfignew/templates/_pagenew.html delete mode 100644 modules-available/sysconfignew/templates/module-editor.html delete mode 100644 modules-available/usermanagement/config.json delete mode 100644 modules-available/usermanagement/lang/de/module.json delete mode 100644 modules-available/usermanagement/lang/en/module.json delete mode 100644 modules-available/usermanagement/lang/en/template-tags.json delete mode 100644 modules-available/usermanagement/lang/pt/module.json delete mode 100644 modules-available/usermanagement/lang/pt/template-tags.json delete mode 100644 modules-available/usermanagement/page.inc.php delete mode 100644 modules-available/usermanagement/templates/user-management.html diff --git a/modules-available/baseconfig_partitions_cdn/baseconfig/getconfig.inc.php b/modules-available/baseconfig_partitions_cdn/baseconfig/getconfig.inc.php deleted file mode 100644 index 20efdcb1..00000000 --- a/modules-available/baseconfig_partitions_cdn/baseconfig/getconfig.inc.php +++ /dev/null @@ -1,19 +0,0 @@ - $_GET['user'])); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - $config .= "\n" . $row['partition_id'] . "," . $row['size']; - if (strlen($row['mount_point']) > 0) - $config .= "," . $row['mount_point']; - if (strlen($row['options']) > 0) - $config .= "," . $row['options']; - } - $config .= "\n"; - -// vm list url. doesn't really fit anywhere, seems to be a tie between here and dozmod - $configVars["SLX_PARTITION_TABLE"] = $config; - unset($config); -} diff --git a/modules-available/baseconfig_partitions_cdn/config.json b/modules-available/baseconfig_partitions_cdn/config.json deleted file mode 100644 index fd4c6f4b..00000000 --- a/modules-available/baseconfig_partitions_cdn/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "category": "main.settings-client", - "dependencies": [ - "baseconfig" - ] -} \ No newline at end of file diff --git a/modules-available/baseconfig_partitions_cdn/install.inc.php b/modules-available/baseconfig_partitions_cdn/install.inc.php deleted file mode 100644 index f4092078..00000000 --- a/modules-available/baseconfig_partitions_cdn/install.inc.php +++ /dev/null @@ -1,31 +0,0 @@ -addPartition(); - } - } - if($action == 'reset') { - if (User::hasPermission("partitions.reset")) { - $this->resetConfig(); - } - } - - $deletePartition = Request::get('deletePartition'); - if($deletePartition !== false) { // TODO: CSRF: Actions that change/update/delete anything should be POST - if (User::hasPermission("partitions.delete")) { - $this->deletePartition($deletePartition); - } - } - - if(User::hasPermission("partitions.edit")) { - $this->updatePartitions(); - } - } - - protected function doRender() - { - if (!User::isLoggedIn()) { - Message::addError('main.no-permission'); - Util::redirect('?do=Main'); - } - - $hasAnyRight = User::hasPermission("partitions.add") || User::hasPermission("partitions.delete") - || User::hasPermission("partitions.edit") || User::hasPermission("partitions.reset"); - - if (!(User::hasPermission("show") || $hasAnyRight)) { - Message::addError('main.no-permission'); - Util::redirect('?do=Main'); - } - - //loads partition settings - $partitions = array(); - $res = Database::simpleQuery('SELECT id, partition_id, size, mount_point, options FROM setting_partition WHERE user=:user', - array( 'user' => User::getId() )); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - $partition = array( - 'id' => $row['id'], - 'partition_id' => $row['partition_id'], - 'size' => $row['size'], - 'mount_point' => $row['mount_point'], - 'options' => $row['options'] - ); - $partitions[] = $partition; - } - - Render::addTemplate('_page', array( - 'partitions' => $partitions, - 'user' => User::getId(), - 'allowedToAdd' => User::hasPermission("partitions.add"), - 'allowedToDelete' => User::hasPermission("partitions.delete"), - 'allowedToEdit' => User::hasPermission("partitions.edit"), - 'allowedToReset' => User::hasPermission("partitions.reset") - )); - } - - private function addPartition() { - $partId = Request::post('new-partition-id'); - $partSize = Request::post('new-partition-size'); - $partMountPoint = Request::post('new-partition-mount-point'); - $partOptions = Request::post('new-partition-options'); - - if(strlen($partId) < 1 || strlen($partSize) < 1){ - Message::addError('main.empty-field'); - }else{ - $data = array( - 'partition_id' => $partId, - 'size' => $partSize, - 'mount_point' => $partMountPoint, - 'options' => $partOptions, - 'user' => User::getId() - ); - if (Database::exec('INSERT INTO setting_partition SET partition_id = :partition_id, size = :size, - mount_point = :mount_point, options = :options, user = :user ', $data) != 1) { - Util::traceError('Could not create new partition in DB'); - } - } - Util::redirect('?do=BaseConfig_Partitions_CDN'); - } - - private function deletePartition($id){ - if(is_numeric($id)){ - $data = array( - 'id' => $id, - 'user' => User::getId() - ); - if (Database::exec('DELETE FROM setting_partition WHERE id = :id AND user = :user', $data) != 1) { - Util::traceError('Could not delete partition in DB'); - } - } - Util::redirect('?do=BaseConfig_Partitions_CDN'); - } - - private function updatePartitions(){ - $partitions = array(); - foreach($_POST as $key => $value){ - - if (substr($key, 0, 9) == 'partition') { - list($key, $id, $type) = explode("-", $key); - $partitions[$id][$type] = $value; - } - } - - foreach($partitions as $key => $data){ - $data = array( - 'id' => $key, - 'partition_id' => $data['partition_id'], - 'size' => $data['size'], - 'mount_point' => $data['mount_point'], - 'options' => $data['options'], - 'user' => User::getId() - ); - Database::exec('UPDATE setting_partition SET partition_id=:partition_id, size=:size, mount_point=:mount_point, - options=:options WHERE id=:id AND user=:user;', $data); - } - - - if (!empty($partitions)) { - Message::addSuccess('partitions-updated'); - Util::redirect('?do=BaseConfig_Partitions_CDN'); - } - } - - private function resetConfig(){ - $data = array( - 'user' => User::getId() - ); - //Delete all config values - Database::exec('DELETE FROM setting_partition WHERE user = :user', $data); - //Create default partition values - Database::exec ( "INSERT INTO setting_partition SET partition_id = '44', size = '5G', mount_point = '/tmp', user = :user", $data ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '43', size = '20G', mount_point = '/boot', options = 'bootable', user = :user", $data ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '40', size = '20G', mount_point = '/cache/export/dnbd3', user = :user", $data ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '41', size = '5G', mount_point = '/home', user = :user", $data ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '82', size = '1G', user = :user", $data ); - Util::redirect('?do=BaseConfig_Partitions_CDN'); - } -} \ No newline at end of file diff --git a/modules-available/baseconfig_partitions_cdn/permissions/permissions.json b/modules-available/baseconfig_partitions_cdn/permissions/permissions.json deleted file mode 100644 index 3acd5230..00000000 --- a/modules-available/baseconfig_partitions_cdn/permissions/permissions.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "partitions.add": { - "location-aware": false - }, - "partitions.delete": { - "location-aware": false - }, - "partitions.edit": { - "location-aware": false - }, - "partitions.reset": { - "location-aware": false - }, - "show": { - "location-aware": false - } -} \ No newline at end of file diff --git a/modules-available/baseconfig_partitions_cdn/style.css b/modules-available/baseconfig_partitions_cdn/style.css deleted file mode 100644 index d55e5e5b..00000000 --- a/modules-available/baseconfig_partitions_cdn/style.css +++ /dev/null @@ -1,4 +0,0 @@ -.missingInput { - border-color: rgba(255, 0, 0, 0.8); - box-shadow: 0 1px 1px rgba(255, 0, 0, 0.075) inset, 0 0 8px rgba(255, 0, 0, 0.6); -} \ No newline at end of file diff --git a/modules-available/baseconfig_partitions_cdn/templates/_page.html b/modules-available/baseconfig_partitions_cdn/templates/_page.html deleted file mode 100644 index 2cb3f2a6..00000000 --- a/modules-available/baseconfig_partitions_cdn/templates/_page.html +++ /dev/null @@ -1,151 +0,0 @@ -

{{lang_partitionManagement}}

- -

{{lang_explanationText}}

- -
- -
- {{#partitions}} -
-
-
- -
-
- -
-
- -
-
- -
-
- - - -
-
-
- {{/partitions}} -
-
- -
-
-
-
- - - -
- - -
- -
- - - - - -
- - -
- - - -
- - \ No newline at end of file diff --git a/modules-available/citymanagement/config.json b/modules-available/citymanagement/config.json deleted file mode 100644 index b356dfc6..00000000 --- a/modules-available/citymanagement/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "category": "citymanagement.cities", - "permission": "0" -} \ No newline at end of file diff --git a/modules-available/citymanagement/install.inc.php b/modules-available/citymanagement/install.inc.php deleted file mode 100644 index b051ca5c..00000000 --- a/modules-available/citymanagement/install.inc.php +++ /dev/null @@ -1,22 +0,0 @@ -page = $p; - else - $this->page = 1; - switch(Request::post('action')){ - case "edit": - $this->edit(Request::post('cityid'),Request::post('name')); - break; - case "create": - $this->create(Request::post('name')); - break; - case "delete": - $this->delete(Request::post('cityid')); - break; - } - - - if (!User::hasPermission('superadmin')) { - Message::addError('main.no-permission'); - Util::redirect('?do=Main'); - } - - } - - protected function doRender() - { - // load every city - $cities = array(); - $res = Database::simpleQuery("SELECT cityid, name FROM cities ORDER BY cityid DESC"); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - $cities[] = array( - 'id' => $row['cityid'], - 'name' => $row['name'], - ); - } - - $pag = new Pagination($cities,$this->page); - - Render::addTemplate('page-citymanagement', array( - 'cities' => $pag->getItems(), - 'pages' => $pag->getPagination() - )); - } - - private function edit($cityid, $newname){ - $data = array ( - 'cityid' => $cityid, - 'name' => $newname, - ); - Database::exec ( 'UPDATE cities SET name = :name WHERE cityid = :cityid', $data ); - Message::addSuccess('update-city'); - } - - private function create($name){ - $data = array ( - 'name' => $name, - ); - Database::exec('INSERT INTO cities(name) VALUES( :name )',$data); - Message::addSuccess('add-city'); - } - - private function delete($cityid){ - $data = array ( - 'cityid' => $cityid - ); - Database::exec ( 'DELETE FROM cities WHERE cityid = :cityid', $data ); - Message::addSuccess('delete-city'); - } -} diff --git a/modules-available/citymanagement/templates/page-citymanagement.html b/modules-available/citymanagement/templates/page-citymanagement.html deleted file mode 100644 index 6d7750cf..00000000 --- a/modules-available/citymanagement/templates/page-citymanagement.html +++ /dev/null @@ -1,77 +0,0 @@ -
-
-
{{lang_cityPage}}
-
-
-

- {{lang_cityInfo}} -

- -
- - - - - - - - - - - - - - - {{#cities}} - - - - - - {{/cities}} - - - -
ID{{lang_cityname}}{{lang_operations}}
- -
- - - -
-
    - {{#pages}} -
  • {{page}}
  • - {{/pages}} -
-
-
-{{#cities}} - -{{/cities}} diff --git a/modules-available/imgmanagement/config.json b/modules-available/imgmanagement/config.json deleted file mode 100644 index 2fbb822f..00000000 --- a/modules-available/imgmanagement/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "category": "main.content", - "permission": "1" -} \ No newline at end of file diff --git a/modules-available/imgmanagement/lang/de/module.json b/modules-available/imgmanagement/lang/de/module.json deleted file mode 100644 index aff88855..00000000 --- a/modules-available/imgmanagement/lang/de/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Image-Verwaltung" -} \ No newline at end of file diff --git a/modules-available/imgmanagement/lang/en/module.json b/modules-available/imgmanagement/lang/en/module.json deleted file mode 100644 index 0d1f4c24..00000000 --- a/modules-available/imgmanagement/lang/en/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Image management" -} \ No newline at end of file diff --git a/modules-available/imgmanagement/lang/pt/module.json b/modules-available/imgmanagement/lang/pt/module.json deleted file mode 100644 index 83b9751a..00000000 --- a/modules-available/imgmanagement/lang/pt/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Gerenciamento de Imagens" -} \ No newline at end of file diff --git a/modules-available/imgmanagement/lang/pt/template-tags.json b/modules-available/imgmanagement/lang/pt/template-tags.json deleted file mode 100644 index c44dc44f..00000000 --- a/modules-available/imgmanagement/lang/pt/template-tags.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - -] \ No newline at end of file diff --git a/modules-available/imgmanagement/page.inc.php b/modules-available/imgmanagement/page.inc.php deleted file mode 100644 index 99f1a1a3..00000000 --- a/modules-available/imgmanagement/page.inc.php +++ /dev/null @@ -1,63 +0,0 @@ -fetch(PDO::FETCH_ASSOC)) { - if($row['is_active']) - $actives[] = array( - 'id' => $row['id'], - 'name' => $row['name'], - 'path' => $row['path'], - 'userid' => $row['userid'], - 'is_template' => $row['is_template'], - 'is_active' => $row['is_active'], - 'description' => $row['description'] - ); - else - $deactives[] = array( - 'id' => $row['id'], - 'name' => $row['name'], - 'path' => $row['path'], - 'userid' => $row['userid'], - 'is_template' => $row['is_template'], - 'is_active' => $row['is_active'], - 'description' => $row['description'] - ); - - } - - Render::addTemplate('page-imgmanagement', array( - 'deactives' => $deactives, - 'actives' => $actives)); - } -} diff --git a/modules-available/imgmanagement/templates/page-imgmanagement.html b/modules-available/imgmanagement/templates/page-imgmanagement.html deleted file mode 100644 index cdae627b..00000000 --- a/modules-available/imgmanagement/templates/page-imgmanagement.html +++ /dev/null @@ -1,62 +0,0 @@ -
-
- Gerenciamento de Imagens -
- -
-
- Imagens em azul indicam imagens criadas pelo usuário -
- -
-
-
    - {{#deactives}} -
  • {{name}}
  • - {{/deactives}} -
-
-
- -
-
-
    - - {{#actives}} -
  • {{name}}
  • - {{/actives}} -
-
-
- - - -
-
- - - diff --git a/modules-available/internetaccess/config.json b/modules-available/internetaccess/config.json deleted file mode 100644 index 110f8b67..00000000 --- a/modules-available/internetaccess/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "category": "main.content" -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/de/messages.json b/modules-available/internetaccess/lang/de/messages.json deleted file mode 100644 index 1b075f70..00000000 --- a/modules-available/internetaccess/lang/de/messages.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "settings-updated": "Einstellungen wurden aktualisiert", - "invalid-action": "Ung\u00fcltige Aktion: {{0}}" -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/de/permissions.json b/modules-available/internetaccess/lang/de/permissions.json deleted file mode 100644 index 78d9e67c..00000000 --- a/modules-available/internetaccess/lang/de/permissions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "configuration.safe": "Konfiguration speichern." -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/de/template-tags.json b/modules-available/internetaccess/lang/de/template-tags.json deleted file mode 100644 index b583783f..00000000 --- a/modules-available/internetaccess/lang/de/template-tags.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "lang_automatic": "Automatisch", - "lang_description": "Hier k\u00f6nnen Sie konfigurieren, wie der Satellitenserver auf das Internet zugreifen soll. Dies wird in erster Linie f\u00fcr das Aktualisieren des Systems sowie das Synchronisieren von Virtuellen Maschinen mit dem Zentralserver verwendet. Gegenw\u00e4rtig wird neben Direktzugriff noch SOCKS4\/5 unterst\u00fctzt.", - "lang_internetAccess": "Internetzugriff", - "lang_manual": "Manuelle Angabe", - "lang_manualProxyConfig": "Wenn Sie einen SOCKS-Proxy manuell konfigurieren m\u00f6chten, geben Sie bitte hier die Verbindungsdaten an.", - "lang_no": "Keiner", - "lang_proxyAddress": "Adresse", - "lang_proxyPassword": "Passwort", - "lang_proxyPort": "Port", - "lang_proxyType": "Proxy Typ", - "lang_proxyUsername": "Benutzername", - "lang_restartFailed": "Neustart eines oder mehrerer Dienste fehlgeschlagen!", - "lang_restarting": "Neustart", - "lang_save": "Speichern", - "lang_serviceRestart": "Neustarten der Dienste" -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/en/messages.json b/modules-available/internetaccess/lang/en/messages.json deleted file mode 100644 index 6a1af968..00000000 --- a/modules-available/internetaccess/lang/en/messages.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "settings-updated": "Settings have been updated", - "invalid-action": "Invalid action: {{0}}" -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/en/module.json b/modules-available/internetaccess/lang/en/module.json deleted file mode 100644 index f0c2f72f..00000000 --- a/modules-available/internetaccess/lang/en/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Internet Access" -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/en/permissions.json b/modules-available/internetaccess/lang/en/permissions.json deleted file mode 100644 index afe8325d..00000000 --- a/modules-available/internetaccess/lang/en/permissions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "configuration.safe": "Safe configuration." -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/en/template-tags.json b/modules-available/internetaccess/lang/en/template-tags.json deleted file mode 100644 index 2ac50527..00000000 --- a/modules-available/internetaccess/lang/en/template-tags.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "lang_automatic": "Auto", - "lang_description": "Here you can configure how the satellite server has to access the internet.", - "lang_internetAccess": "Internet Access", - "lang_manual": "Manual", - "lang_manualProxyConfig": "If you want to configure a proxy server manually, please supply the credentials here.", - "lang_no": "None", - "lang_proxyAddress": "Address", - "lang_proxyPassword": "Password", - "lang_proxyPort": "Port", - "lang_proxyType": "Proxy type", - "lang_proxyUsername": "User", - "lang_restartFailed": "Restarting one or more services failed!", - "lang_restarting": "Restarting", - "lang_save": "Save", - "lang_serviceRestart": "Restart of services" -} \ No newline at end of file diff --git a/modules-available/internetaccess/lang/pt/messages.json b/modules-available/internetaccess/lang/pt/messages.json deleted file mode 100644 index af5b9b22..00000000 --- a/modules-available/internetaccess/lang/pt/messages.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "settings-updated": "As configura\u00e7\u00f5es foram atualizadas", - "invalid-action": "A\u00e7\u00e3o inv\u00e1lida: {{0}}" -} \ No newline at end of file diff --git a/modules-available/internetaccess/page.inc.php b/modules-available/internetaccess/page.inc.php deleted file mode 100644 index a92ba3e3..00000000 --- a/modules-available/internetaccess/page.inc.php +++ /dev/null @@ -1,62 +0,0 @@ -{{lang_internetAccess}} - -
- - - -

{{lang_description}}

-
- {{lang_proxyType}} - -
-
-

{{lang_manualProxyConfig}}

-
- {{lang_proxyAddress}} * - -
-
- {{lang_proxyPort}} * - -
-
- {{lang_proxyUsername}} - -
-
- {{lang_proxyPassword}} - -
-
-
- -
-
diff --git a/modules-available/internetaccess/templates/restart.html b/modules-available/internetaccess/templates/restart.html deleted file mode 100644 index effe1feb..00000000 --- a/modules-available/internetaccess/templates/restart.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
{{lang_serviceRestart}}
-
-
{{lang_restarting}} syncdaemon
-
{{lang_restarting}} dmsd
-
{{lang_restarting}} ldadp
- -
-
- - diff --git a/modules-available/support/config.json b/modules-available/support/config.json deleted file mode 100644 index 110f8b67..00000000 --- a/modules-available/support/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "category": "main.content" -} \ No newline at end of file diff --git a/modules-available/support/faq.json b/modules-available/support/faq.json deleted file mode 100644 index 1c1d372f..00000000 --- a/modules-available/support/faq.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "faq": [ - {"question": "Este é o FAQ", - "answer": "Ao clicar em cada uma pergunta, elas se expandem exibindo as respostas!", - "order": "One", - "highlight": true - }, - {"question": "Por enquanto não há nada por aqui (ツ)_/¯ ", - "answer": "As perguntas serão adicionadas conforme as dúvidas forem surgindo", - "order": "Two", - "highlight": true - }, - {"question": "Nem todas as perguntas estarão aqui", - "answer": "Se tiver uma dúvida que não está no FAQ, envie um e-mail clicando no botão abaixo ;)", - "order": "Three", - "highlight": false - } - ] -} diff --git a/modules-available/support/lang/de/messages.json b/modules-available/support/lang/de/messages.json deleted file mode 100644 index fe4a973d..00000000 --- a/modules-available/support/lang/de/messages.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "news-save-success": "News erfolgreich aktualisiert", - "news-empty": "Es wurde keine News in der Datenbank gefunden" -} \ No newline at end of file diff --git a/modules-available/support/lang/de/module.json b/modules-available/support/lang/de/module.json deleted file mode 100644 index 13b2b8f0..00000000 --- a/modules-available/support/lang/de/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Support" -} \ No newline at end of file diff --git a/modules-available/support/lang/de/template-tags.json b/modules-available/support/lang/de/template-tags.json deleted file mode 100644 index c44dc44f..00000000 --- a/modules-available/support/lang/de/template-tags.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - -] \ No newline at end of file diff --git a/modules-available/support/lang/en/messages.json b/modules-available/support/lang/en/messages.json deleted file mode 100644 index 94d198c0..00000000 --- a/modules-available/support/lang/en/messages.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "news-save-success": "News updated successfully", - "news-empty": "There was no news found in the database" -} \ No newline at end of file diff --git a/modules-available/support/lang/pt/messages.json b/modules-available/support/lang/pt/messages.json deleted file mode 100644 index 7420aef9..00000000 --- a/modules-available/support/lang/pt/messages.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "news-save-success": "Not\u00edcia atualizada com sucesso", - "news-empty": "N\u00e3o havia not\u00edcias no banco de dados" -} \ No newline at end of file diff --git a/modules-available/support/lang/pt/module.json b/modules-available/support/lang/pt/module.json deleted file mode 100644 index 4d07b39d..00000000 --- a/modules-available/support/lang/pt/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Suporte" -} \ No newline at end of file diff --git a/modules-available/support/lang/pt/template-tags.json b/modules-available/support/lang/pt/template-tags.json deleted file mode 100644 index 8f7f28e7..00000000 --- a/modules-available/support/lang/pt/template-tags.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "lang_content": "Conte\u00fado", - "lang_content#1": "Ao clicar em cada uma pergunta, elas se expandem exibindo as respostas!", - "lang_content#2": "As perguntas ser\u00e3o adicionadas conforme as d\u00favidas forem surgindo", - "lang_content#3": "Se tiver uma d\u00favida que n\u00e3o est\u00e1 no FAQ, envie um e-mail clicando no bot\u00e3o abaixo ;)", - "lang_faq": "FAQ", - "lang_faq#1": "Este \u00e9 o FAQ", - "lang_faq#2": "Por enquanto n\u00e3o h\u00e1 nada por aqui (\u30c4)_\/\u00af", - "lang_faq#3": "Nem todas as perguntas estar\u00e3o aqui", - "lang_fileInput": "Arquivo:", - "lang_form": "Formul\u00e1rio", - "lang_header": "Assunto", - "lang_helpInput": "Voc\u00ea pode mandar uma foto\/arquivo que nos auxilie a entender o problema.", - "lang_showall": "Clique aqui para mostrar todo o FAQ", - "lang_submit": "Enviar", - "lang_supIntro": "N\u00e3o encontrou o que queria no FAQ? Mande-nos um e-mail informando o problema" -} \ No newline at end of file diff --git a/modules-available/support/page.inc.php b/modules-available/support/page.inc.php deleted file mode 100644 index 5ad7854f..00000000 --- a/modules-available/support/page.inc.php +++ /dev/null @@ -1,83 +0,0 @@ -SMTPDebug = 3; // Enable verbose debug output - $mail->isSMTP(); // Set mailer to use SMTP - $mail->Host = 'mx.c3sl.ufpr.br'; // Specify main and backup SMTP servers - $mail->SMTPAuth = true; // Enable SMTP authentication - $mail->Username = 'xxx00@inf.ufpr.br'; // SMTP username - $mail->Password = ''; // SMTP password - // $mail->SMTPSecure = 'false'; // Enable TLS encryption, `ssl` also accepted - $mail->Port = 25; // TCP port to connect to - - $mail->From = 'xxx00@inf.ufpr.br'; - $mail->FromName = 'Someone'; - $mail->addAddress('receiver@email.com', 'Another One'); // Add a recipient - // $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments - // $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name - $mail->isHTML(true); // Set email format to HTML - $mail->Subject = 'Here is the subject'; - $mail->Body = 'This is the HTML message body in bold!'; - $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; - - if(!$mail->send()) { - echo 'Message could not be sent.'; - echo 'Mailer Error: ' . $mail->ErrorInfo; - } else { - echo 'Message has been sent'; - } - */ -// $uploaddir = '/var/www/uploads/'; -// $uploadfile = $uploaddir . basename($_FILES['inp_file']['name']); -// if(move_uploaded_file($_FILES['inp_file']['tmp_name'], $uploadfile)) -// Message::addSuccess('news-save-success'); -// else -// Message::addError('news-empty'); -// mail($to,$_POST[assuntoEmail],$_POST[conteudoEmail],"-r".$from); -// mail($to,$assunto,$content,$headers); - - - } - - - - protected function doRender(){ - error_reporting(E_ALL); - ini_set('display_errors','on'); - if (strpos($_SERVER['REQUEST_URI'], "true") !== false){ - Render::addTemplate('page-faq', - json_decode(file_get_contents("modules/support/faq.json"),true) - ); - } - else{ - Render::addTemplate('page-support', - json_decode(file_get_contents("modules/support/faq.json"),true) - ); - } -// Render::addTemplate('page-support', array( -// 'token' => Session:get('token')); - } - - -} diff --git a/modules-available/support/templates/page-faq.html b/modules-available/support/templates/page-faq.html deleted file mode 100644 index ae706f4b..00000000 --- a/modules-available/support/templates/page-faq.html +++ /dev/null @@ -1,29 +0,0 @@ -
-
- {{lang_faq}} -
- -
- - {{#faq}} -
- -
-
- {{answer}} -
-
-
- {{/faq}} - - {{lang_supIntro}} -
- - - diff --git a/modules-available/support/templates/page-support.html b/modules-available/support/templates/page-support.html deleted file mode 100644 index 196e0891..00000000 --- a/modules-available/support/templates/page-support.html +++ /dev/null @@ -1,59 +0,0 @@ -

{{lang_supIntro}}

-
-
- {{lang_faq}} -
- -
- - {{#faq}} - {{#highlight}} -
- -
-
- {{answer}} -
-
-
- {{/highlight}} - {{/faq}} - - {{lang_showall}} -
-
- - -
-
- {{lang_form}} -
-
-
- -
- - -
-
- - -
-
- - - -

{{lang_helpInput}}

-
- -
-
-
- - diff --git a/modules-available/sysconfignew/config.json b/modules-available/sysconfignew/config.json deleted file mode 100644 index 6c7b7146..00000000 --- a/modules-available/sysconfignew/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "category": "main.settings-client" -} \ No newline at end of file diff --git a/modules-available/sysconfignew/lang/en/template-tags.json b/modules-available/sysconfignew/lang/en/template-tags.json deleted file mode 100644 index 3ec89616..00000000 --- a/modules-available/sysconfignew/lang/en/template-tags.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "lang_back": "Back", - "lang_cancel": "Cancel", - "lang_cannotOpen": "could no be opened", - "lang_changeLink": "Change link", - "lang_compilingIpxe": "Compiling iPXE", - "lang_configName": "Name", - "lang_configsDescription": "Here it is possible to create a system configuration by choosing the desired modules.", - "lang_configurations": "Configurations", - "lang_create": "Create", - "lang_edit": "Edit", - "lang_file": "File", - "lang_leavingMessage": "You have unsaved changes on your module.", - "lang_loading": "Loading", - "lang_modules": "Modules", - "lang_modulesDescription": "Here it is possible to create a system module through an editor.", - "lang_name": "Name", - "lang_new": "New", - "lang_newConfig": "New Config", - "lang_newModule": "New Module", - "lang_remove": "Remove", - "lang_save": "Save" -} \ No newline at end of file diff --git a/modules-available/sysconfignew/lang/pt/template-tags.json b/modules-available/sysconfignew/lang/pt/template-tags.json deleted file mode 100644 index af0d7ad7..00000000 --- a/modules-available/sysconfignew/lang/pt/template-tags.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "lang_back": "Voltar", - "lang_cancel": "Cancelar", - "lang_cannotOpen": "n\u00e3o p\u00f4de ser aberto", - "lang_changeLink": "Mudar link", - "lang_compilingIpxe": "Compilando iPXE", - "lang_configName": "Nome", - "lang_configsDescription": "Aqui \u00e9 poss\u00edvel criar uma configura\u00e7\u00e3o do sistema escolhendo os m\u00f3dulos desejados.", - "lang_configurations": "Configura\u00e7\u00f5es", - "lang_create": "Criar", - "lang_edit": "Editar", - "lang_file": "Arquivo", - "lang_leavingMessage": "Voc\u00ea possui mudan\u00e7as n\u00e3o salvas no seu m\u00f3dulo.", - "lang_loading": "Carregando", - "lang_modules": "M\u00f3dulos", - "lang_modulesDescription": "Aqui \u00e9 poss\u00edvel criar um m\u00f3dulo do sistema atrav\u00e9s de um editor.", - "lang_name": "Nome", - "lang_new": "Novo", - "lang_newConfig": "Nova Configura\u00e7\u00e3o", - "lang_newModule": "Novo M\u00f3dulo", - "lang_remove": "Remover", - "lang_save": "Salvar" -} \ No newline at end of file diff --git a/modules-available/sysconfignew/page.inc.php b/modules-available/sysconfignew/page.inc.php deleted file mode 100644 index c8cdb3cd..00000000 --- a/modules-available/sysconfignew/page.inc.php +++ /dev/null @@ -1,114 +0,0 @@ -tmconfigs = $this->tmpath . '/configs'; - $this->tmmodules = $this->tmpath . '/modules'; - } - - - protected function doRender(){ - $module = $_GET['module']; - if(isset($module)){ - Render::addTemplate('module-editor',array( - "module" => $module - )); - }else{ - if(is_dir($this->tmpath)){ - $configs = array(); - $modules = array(); - - foreach($this->listDirectory($this->tmconfigs) as $key => $value) - $configs[] = array( - "name" => $value - ); - - foreach($this->listDirectory($this->tmmodules) as $key => $value) - $modules[] = array( - "name" => $value - ); - - $data = array( - "configs" => $configs, - "modules" => $modules - ); - Render::addTemplate('_pagenew',$data); - }else{ - Message::addError('no-tm-scripts'); - } - } - } - - protected function doAjax(){ - $request = $_GET['request']; - switch($request){ - case "module-contents": - $path = $this->tmpath . '/modules/' . Request::get('module'); - $data = $this->getDirContents($path); - $json = json_encode($data); - print_r($json); - break; - case "configs": - $this->tmconfigs = $this->tmpath . '/configs'; - $this->tmmodules = $this->tmpath . '/modules'; - $userModules = $this->listDirectory($this->tmconfigs . '/' . Request::get('config')); - $modules = array(); - foreach($this->listDirectory($this->tmmodules) as $key => $value){ - $chosen = (in_array($value, $userModules)) ? true : false; - $modules[] = array( - "name" => $value, - "chosen" => $chosen - ); - } - - $ret = ''; - foreach ($modules as $module) { - $class = ($module['chosen']) ? "select-item select-item-selected" : "select-item"; - $ret .= ""; - } - - echo $ret; - break; - } - - } - - private function getDirContents($path){ - $ret = array(); - foreach ($this->listDirectory($path) as $key => $value) { - if(is_dir($path . "/" . $value)){ - $ret["dir_" . $value] = $this->getDirContents($path . "/" . $value); - }else{ - if(is_link($path . "/" . $value)){ - $ret["link_" . $value] = readlink($path . "/" . $value); - }else{ - if(mime_content_type($path . "/" . $value) == "text/plain"){ - $ret["file_" . $value] = file_get_contents($path . "/" . $value); - }else{ - $ret["lock_" . $value] = " oops"; - } - } - } - } - return $ret; - } - - private function listDirectory($path){ - return array_diff(scandir($path), array('..', '.')); - } - -} diff --git a/modules-available/sysconfignew/style.css b/modules-available/sysconfignew/style.css deleted file mode 100644 index 43f708d1..00000000 --- a/modules-available/sysconfignew/style.css +++ /dev/null @@ -1,59 +0,0 @@ -.mod-nav { - width: 250px; - float: left; - margin-right: 4px; - border-right: solid 1px #DDD; - padding: 4px; - height: 545px; - overflow: auto; -} - -.item { - padding: 4px; - margin: 3px 0; - border-radius: 3px; -} - -.item:HOVER { - background-color: #EEE; - cursor: pointer; -} - -.item-link { - color: #5893C6; -} - -.item-lock { - color: #939393; -} - -.dir-icon { - color: #2E6DA4; -} - -.folder { - padding-left: 16px; - display: none; - border-left: dashed 1px #CCC; -} - -#editor-header{ - display: block; - float: none; - width: 875px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.mod-editor{ - display: block; - float: none; - resize: none; - width: 875px; - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -textarea.form-control .editor-box{ - height: 520px; -} diff --git a/modules-available/sysconfignew/templates/_pagenew.html b/modules-available/sysconfignew/templates/_pagenew.html deleted file mode 100644 index 98881ae3..00000000 --- a/modules-available/sysconfignew/templates/_pagenew.html +++ /dev/null @@ -1,190 +0,0 @@ -
-
-
-
-
{{lang_configurations}}
-
-
- {{lang_configsDescription}} -
- - - - - - - - {{#configs}} - - - - - - {{/configs}} - -
{{lang_configName}}
{{name}} - - - -
- -
-
-
-
-
-
{{lang_modules}}
-
-
- {{lang_modulesDescription}} -
- - - - - - - - {{#modules}} - - - - - - {{/modules}} - -
{{lang_configName}}
{{name}} - - - -
- -
-
-
- - - - - -
-
- - - - - - \ No newline at end of file diff --git a/modules-available/sysconfignew/templates/module-editor.html b/modules-available/sysconfignew/templates/module-editor.html deleted file mode 100644 index 3ea28bf8..00000000 --- a/modules-available/sysconfignew/templates/module-editor.html +++ /dev/null @@ -1,269 +0,0 @@ - -
-
- {{lang_back}} -
-
- {{module}} -
-
-
- -
- - -
- -
-
-
- - - - - \ No newline at end of file diff --git a/modules-available/usermanagement/config.json b/modules-available/usermanagement/config.json deleted file mode 100644 index 428315ba..00000000 --- a/modules-available/usermanagement/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "category": "main.users", - "permission": "0" -} \ No newline at end of file diff --git a/modules-available/usermanagement/lang/de/module.json b/modules-available/usermanagement/lang/de/module.json deleted file mode 100644 index 49d72a69..00000000 --- a/modules-available/usermanagement/lang/de/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Benutzerverwaltung" -} \ No newline at end of file diff --git a/modules-available/usermanagement/lang/en/module.json b/modules-available/usermanagement/lang/en/module.json deleted file mode 100644 index a3914cea..00000000 --- a/modules-available/usermanagement/lang/en/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Management" -} \ No newline at end of file diff --git a/modules-available/usermanagement/lang/en/template-tags.json b/modules-available/usermanagement/lang/en/template-tags.json deleted file mode 100644 index 35497fc9..00000000 --- a/modules-available/usermanagement/lang/en/template-tags.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "lang_cancelConfirm": "Do you really want to delete this users?", - "lang_create": "Create", - "lang_editUser": "Edit User", - "lang_email": "Email", - "lang_login": "Login", - "lang_operations": "Operation", - "lang_remove": "Remove", - "lang_telephone": "Telephone", - "lang_userAdmin": "Administrator", - "lang_userInfo": "On this section, you will be able to create website users, besides editing or removing existing users.", - "lang_userPage": "Users" -} diff --git a/modules-available/usermanagement/lang/pt/module.json b/modules-available/usermanagement/lang/pt/module.json deleted file mode 100644 index a65f27b4..00000000 --- a/modules-available/usermanagement/lang/pt/module.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "module_name": "Gerenciamento" -} \ No newline at end of file diff --git a/modules-available/usermanagement/lang/pt/template-tags.json b/modules-available/usermanagement/lang/pt/template-tags.json deleted file mode 100644 index fefb441d..00000000 --- a/modules-available/usermanagement/lang/pt/template-tags.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "lang_cancelConfirm": "Deseja realmente remover o usu\u00e1rio?", - "lang_create": "Criar", - "lang_editUser": "Editar Usu\u00e1rio", - "lang_email": "Email", - "lang_login": "Login", - "lang_operations": "Opera\u00e7\u00f5es", - "lang_remove": "Remover", - "lang_telephone": "Telefone", - "lang_userAdmin": "Administrador", - "lang_userInfo": "Nesta se\u00e7\u00e3o voc\u00ea poder\u00e1 criar usu\u00e1rios para o site, al\u00e9m de editar as informa\u00e7\u00f5es ou remover usu\u00e1rios existentes.", - "lang_userPage": "Usu\u00e1rios" -} diff --git a/modules-available/usermanagement/page.inc.php b/modules-available/usermanagement/page.inc.php deleted file mode 100644 index 605f66c0..00000000 --- a/modules-available/usermanagement/page.inc.php +++ /dev/null @@ -1,140 +0,0 @@ -page = $p; - else - $this->page = 1; - - switch(Request::post('action')){ - case "editAdmin": - $this->edit(Request::post('userid'),Request::post('username'),Request::post('phone'),Request::post('email'), 1); - break; - case "edit": - $this->edit(Request::post('userid'),Request::post('username'),Request::post('phone'),Request::post('email'), 4); - break; - case "create": - $this->create(Request::post('login'),Request::post('username'),Request::post('pass'),Request::post('phone'),Request::post('email'), Request::post('city')); - break; - case "delete": - $this->delete(Request::post('userid')); - break; - } - - if(isset($_POST['userid'])) - $this->deb = $_POST['userid']; - - if (!User::hasPermission('superadmin')) { - Message::addError('main.no-permission'); - Util::redirect('?do=Main'); - } - - } - - protected function doRender() - { - // load every user - $admin = array(); - $users = array(); - $res = Database::simpleQuery("SELECT userid, login, fullname, phone, email, permissions FROM user ORDER BY userid DESC"); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - if ($row['permissions'] == 1 ) - $admin = array($row['userid'],$row['login'],$row['fullname'],$row['phone'],$row['email']); - else - $users[] = array( - 'id' => $row['userid'], - 'username' => $row['login'], - 'name' => $row['fullname'], - 'telephone' => $row['phone'], - 'email' => $row['email'] - ); - } - - // load every city - $cities = array(); - $res = Database::simpleQuery("SELECT cityid, name, ip FROM cities ORDER BY name DESC"); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - $cities[] = array( - 'id' => $row['cityid'], - 'name' => $row['name'], - 'ip' => $row['ip'] - ); - } - - $pag = new Pagination($users,$this->page); - - Render::addTemplate('user-management', array( - 'admin_id' => $admin[0], - 'admin_username' => $admin[1], - 'admin_name' => $admin[2], - 'admin_telephone' => $admin[3], - 'admin_email' => $admin[4], - 'cities' => $cities, - 'users' => $pag->getItems(), - 'pages' => $pag->getPagination() - )); - } - - private function edit($userid, $newname, $newphone, $newemail, $newpermissions){ - $data = array ( - 'user' => $userid, - 'name' => $newname, - 'phone' => $newphone, - 'email' => $newemail, - 'permissions' => $newpermissions - ); - Database::exec ( 'UPDATE user SET fullname = :name, phone = :phone, email = :email, permissions = :permissions WHERE userid = :user', $data ); - Message::addSuccess('update-user'); - } - - private function create($login, $username, $password, $phone, $email, $city){ - if (empty($login) || empty($username) || empty ($password)) { - Message::addError ( 'empty-field' ); - Util::redirect ( '?do=Usermanagement' ); - } else { - $data = array ( - 'login' => $login, - 'pass' => Crypto::hash6 ( $password ), - 'name' => $username, - 'phone' => $phone, - 'email' => $email, - 'city' => $city, - 'permission' => 4 - ); - // TODO: Remove city column from user table; should be done in an n:m fashion via extra table - Database::exec ( "INSERT INTO user SET login = :login, passwd = :pass, fullname = :name, phone = :phone, email = :email, city = :city, permissions = :permission", $data ); - $ret = Database::queryFirst('SELECT userid FROM user WHERE login = :user LIMIT 1', array('user' => $data['login'])); - $user = array( - 'user' => $ret['userid'] - ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '44', size = '5G', mount_point = '/tmp', user = :user", $user ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '43', size = '20G', mount_point = '/boot', options = 'bootable', user = :user", $user ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '40', size = '20G', mount_point = '/cache/export/dnbd3', user = :user", $user ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '41', size = '5G', mount_point = '/home', user = :user", $user ); - Database::exec ( "INSERT INTO setting_partition SET partition_id = '82', size = '1G', user = :user", $user ); - Message::addSuccess('add-user'); - EventLog::info ( User::getName () . ' created user ' . $data['login'] ); - } - } - - private function delete($userid){ - $data = array ( - 'userid' => $userid - ); - Database::exec ( 'DELETE FROM setting_partition WHERE user = :userid', $data ); - Database::exec ( 'DELETE FROM setting_user WHERE user = :userid', $data ); - Database::exec ( 'DELETE FROM setting_values WHERE user = :userid', $data ); - Database::exec ( 'DELETE FROM user WHERE userid = :userid', $data ); - Message::addSuccess('delete-user'); - } - -} diff --git a/modules-available/usermanagement/templates/user-management.html b/modules-available/usermanagement/templates/user-management.html deleted file mode 100644 index 4e4ce7dc..00000000 --- a/modules-available/usermanagement/templates/user-management.html +++ /dev/null @@ -1,132 +0,0 @@ -
-
-
{{lang_userAdmin}}
-
- - - - - - - - - - - - - - - - - - - - - -
ID{{lang_login}}{{lang_username}}{{lang_telephone}}{{lang_email}}
-
- -
-
-
{{lang_userPage}}
-
-
-

- {{lang_userInfo}} -

- -
- - - - - - - - - - - - - - - - - - - - {{#users}} - - - - - - {{/users}} - - - -
ID{{lang_login}}{{lang_operations}}
- -
- - - -
-
    - {{#pages}} -
  • {{page}}
  • - {{/pages}} -
-
-
-{{#users}} - -{{/users}} \ No newline at end of file -- cgit v1.2.3-55-g7522