summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-26 09:30:13 +0100
committerSimon Rettberg2019-03-26 09:30:13 +0100
commita343313a5240bc74f4648376a290133ac712afcb (patch)
tree2560d8677b043f2445f4d6308e6d20a03231540a
parent[serversetup-bwlp-ipxe] Don't show compile progress on every subpage (diff)
downloadslx-admin-a343313a5240bc74f4648376a290133ac712afcb.tar.gz
slx-admin-a343313a5240bc74f4648376a290133ac712afcb.tar.xz
slx-admin-a343313a5240bc74f4648376a290133ac712afcb.zip
Delete unused and unmaintained modules
-rw-r--r--modules-available/baseconfig_partitions_cdn/baseconfig/getconfig.inc.php19
-rw-r--r--modules-available/baseconfig_partitions_cdn/config.json6
-rw-r--r--modules-available/baseconfig_partitions_cdn/install.inc.php31
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/de/messages.json3
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/de/module.json4
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/de/permissions.json7
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/de/template-tags.json19
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/en/messages.json3
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/en/module.json4
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/en/permissions.json7
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/en/template-tags.json19
-rw-r--r--modules-available/baseconfig_partitions_cdn/lang/pt/template-tags.json16
-rw-r--r--modules-available/baseconfig_partitions_cdn/page.inc.php156
-rw-r--r--modules-available/baseconfig_partitions_cdn/permissions/permissions.json17
-rw-r--r--modules-available/baseconfig_partitions_cdn/style.css4
-rw-r--r--modules-available/baseconfig_partitions_cdn/templates/_page.html151
-rw-r--r--modules-available/citymanagement/config.json4
-rw-r--r--modules-available/citymanagement/install.inc.php22
-rw-r--r--modules-available/citymanagement/lang/de/categories.json3
-rw-r--r--modules-available/citymanagement/lang/en/categories.json3
-rw-r--r--modules-available/citymanagement/lang/en/module.json3
-rw-r--r--modules-available/citymanagement/lang/en/template-tags.json13
-rw-r--r--modules-available/citymanagement/lang/pt/module.json3
-rw-r--r--modules-available/citymanagement/lang/pt/template-tags.json11
-rw-r--r--modules-available/citymanagement/page.inc.php81
-rw-r--r--modules-available/citymanagement/templates/page-citymanagement.html77
-rw-r--r--modules-available/imgmanagement/config.json4
-rw-r--r--modules-available/imgmanagement/lang/de/module.json3
-rw-r--r--modules-available/imgmanagement/lang/en/module.json3
-rw-r--r--modules-available/imgmanagement/lang/pt/module.json3
-rw-r--r--modules-available/imgmanagement/lang/pt/template-tags.json3
-rw-r--r--modules-available/imgmanagement/page.inc.php63
-rw-r--r--modules-available/imgmanagement/templates/page-imgmanagement.html62
-rw-r--r--modules-available/internetaccess/config.json3
-rw-r--r--modules-available/internetaccess/lang/de/messages.json4
-rw-r--r--modules-available/internetaccess/lang/de/permissions.json3
-rw-r--r--modules-available/internetaccess/lang/de/template-tags.json17
-rw-r--r--modules-available/internetaccess/lang/en/messages.json4
-rw-r--r--modules-available/internetaccess/lang/en/module.json3
-rw-r--r--modules-available/internetaccess/lang/en/permissions.json3
-rw-r--r--modules-available/internetaccess/lang/en/template-tags.json17
-rw-r--r--modules-available/internetaccess/lang/pt/messages.json4
-rw-r--r--modules-available/internetaccess/page.inc.php62
-rw-r--r--modules-available/internetaccess/permissions/permissions.json5
-rw-r--r--modules-available/internetaccess/style.css3
-rw-r--r--modules-available/internetaccess/templates/_page.html38
-rw-r--r--modules-available/internetaccess/templates/restart.html22
-rw-r--r--modules-available/support/config.json3
-rw-r--r--modules-available/support/faq.json19
-rw-r--r--modules-available/support/lang/de/messages.json4
-rw-r--r--modules-available/support/lang/de/module.json3
-rw-r--r--modules-available/support/lang/de/template-tags.json3
-rw-r--r--modules-available/support/lang/en/messages.json4
-rw-r--r--modules-available/support/lang/pt/messages.json4
-rw-r--r--modules-available/support/lang/pt/module.json3
-rw-r--r--modules-available/support/lang/pt/template-tags.json17
-rw-r--r--modules-available/support/page.inc.php83
-rw-r--r--modules-available/support/templates/page-faq.html29
-rw-r--r--modules-available/support/templates/page-support.html59
-rw-r--r--modules-available/sysconfignew/config.json3
-rw-r--r--modules-available/sysconfignew/lang/en/template-tags.json23
-rw-r--r--modules-available/sysconfignew/lang/pt/template-tags.json23
-rw-r--r--modules-available/sysconfignew/page.inc.php114
-rw-r--r--modules-available/sysconfignew/style.css59
-rw-r--r--modules-available/sysconfignew/templates/_pagenew.html190
-rw-r--r--modules-available/sysconfignew/templates/module-editor.html269
-rw-r--r--modules-available/usermanagement/config.json4
-rw-r--r--modules-available/usermanagement/lang/de/module.json3
-rw-r--r--modules-available/usermanagement/lang/en/module.json3
-rw-r--r--modules-available/usermanagement/lang/en/template-tags.json13
-rw-r--r--modules-available/usermanagement/lang/pt/module.json3
-rw-r--r--modules-available/usermanagement/lang/pt/template-tags.json13
-rw-r--r--modules-available/usermanagement/page.inc.php140
-rw-r--r--modules-available/usermanagement/templates/user-management.html132
74 files changed, 0 insertions, 2238 deletions
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 @@
-<?php
-
-if (isset($_GET['user'])) {
- $config = '';
- $res = Database::simpleQuery('SELECT partition_id, size, mount_point, options FROM setting_partition WHERE user = :user',
- array('user' => $_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 @@
-<?php
-
-$res = array();
-
-$res[] = tableCreate('setting_partition', "
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `partition_id` varchar(110) NOT NULL,
- `size` varchar(110) NOT NULL,
- `mount_point` varchar(110) NOT NULL,
- `options` varchar(110) NOT NULL,
- `user` int(10) unsigned NOT NULL,
- PRIMARY KEY (`id`),
- KEY `user` (`user`)
-");
-
-if (in_array(UPDATE_DONE, $res)) {
- Database::exec("ALTER TABLE `setting_partition`
- ADD CONSTRAINT `setting_partition_ibfk_1` FOREIGN KEY (`user`) REFERENCES `user` (`userid`)");
-}
-
-// Update path
-
-// -- none --
-
-// Create response for browser
-
-if (in_array(UPDATE_DONE, $res)) {
- finalResponse(UPDATE_DONE, 'Tables created successfully');
-}
-
-finalResponse(UPDATE_NOOP, 'Everything already up to date');
diff --git a/modules-available/baseconfig_partitions_cdn/lang/de/messages.json b/modules-available/baseconfig_partitions_cdn/lang/de/messages.json
deleted file mode 100644
index 085214a3..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/de/messages.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "partitions-updated": "Partitionskonfiguration wurde aktualisiert"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/de/module.json b/modules-available/baseconfig_partitions_cdn/lang/de/module.json
deleted file mode 100644
index 7a50f349..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/de/module.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "module_name": "Partitionierung",
- "page_title": "Partitionierung"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/de/permissions.json b/modules-available/baseconfig_partitions_cdn/lang/de/permissions.json
deleted file mode 100644
index d5805e3d..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/de/permissions.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "show": "Zeige Partitionen. Wird nicht benötigt, wenn Nutzer eine der anderen Rechte hat.",
- "partitions.add": "Füge eine neue Partition hinzu.",
- "partitions.delete": "Lösche eine Partition.",
- "partitions.edit": "Speichere Änderungen an Partitionen.",
- "partitions.reset": "Setze Partitionen auf Standardwerte zurück."
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/de/template-tags.json b/modules-available/baseconfig_partitions_cdn/lang/de/template-tags.json
deleted file mode 100644
index 99e0a487..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/de/template-tags.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "lang_areYouSureNoUndo": "Sind Sie sicher? Diese Aktion kann nicht r\u00fcckg\u00e4ngig gemacht werden.",
- "lang_confirm": "Wollen Sie die Einstellungen unter \/srv\/openslx\/www\/boot\/config speichern?",
- "lang_create": "Anlegen",
- "lang_discardChanges": "Änderungen verwerfen",
- "lang_explanationText": "Hier k\u00f6nnen Sie bestimmen, welche Partitionen auf dem Client angelegt werden.",
- "lang_helpId": "Partitions-ID",
- "lang_helpMountPoint": "Muss ein Absolutes Verzeichnis im Zieldateisystem sein, z.B. \/mnt\/shares\/data",
- "lang_helpOptions": "Zur Zeit ist hier nur 'bootable' erlaubt.",
- "lang_helpSize": "Angabe im Format 10G um eine 10GiB-Partition zu erstellen.",
- "lang_newPartition": "Neue Partition",
- "lang_partitionId": "ID",
- "lang_partitionManagement": "Partitionsverwaltung",
- "lang_partitionMountPoint": "Mount point",
- "lang_partitionOptions": "Optionen",
- "lang_partitionSize": "Gr\u00f6\u00dfe",
- "lang_resetConfirm": "Wollen Sie die Einstellungen wirklich auf die Standardwerte zur\u00fccksetzen?",
- "lang_resetDefault": "Standardwerte laden"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/en/messages.json b/modules-available/baseconfig_partitions_cdn/lang/en/messages.json
deleted file mode 100644
index 55289288..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/en/messages.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "partitions-updated": "Partition configuration has been updated"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/en/module.json b/modules-available/baseconfig_partitions_cdn/lang/en/module.json
deleted file mode 100644
index e3ed7ffa..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/en/module.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "module_name": "Partitioning",
- "page_title": "Partitioning"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/en/permissions.json b/modules-available/baseconfig_partitions_cdn/lang/en/permissions.json
deleted file mode 100644
index f751a839..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/en/permissions.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "show": "Show Partitions. Not needed if User has any of the other permissions.",
- "partitions.add": "Add a new partition.",
- "partitions.delete": "Delete a partition.",
- "partitions.edit": "Save changes of partitions.",
- "partitions.reset": "Reset partitions to default."
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/en/template-tags.json b/modules-available/baseconfig_partitions_cdn/lang/en/template-tags.json
deleted file mode 100644
index 472e5870..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/en/template-tags.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "lang_areYouSureNoUndo": "Are you sure? This cannot be undone!",
- "lang_confirm": "Would you like to save the settings on \/srv\/openslx\/www\/boot\/config?",
- "lang_create": "Create",
- "lang_discardChanges": "Discard Changes",
- "lang_explanationText": "Here you can configure what kind of partitions will be created on the client computers, and where they will be mounted.",
- "lang_helpId": "Partition Id",
- "lang_helpMountPoint": "Must be a directory: \/example\/directory\/",
- "lang_helpOptions": "Currently, only option 'bootable' is available",
- "lang_helpSize": "Must be in Gigabytes e.g. 15G",
- "lang_newPartition": "New Partition",
- "lang_partitionId": "Id",
- "lang_partitionManagement": "Partition Managment",
- "lang_partitionMountPoint": "Mount Point",
- "lang_partitionOptions": "Options",
- "lang_partitionSize": "Size",
- "lang_resetConfirm": "Do you really wish to reset the variable to their default values?",
- "lang_resetDefault": "Reset Default"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/lang/pt/template-tags.json b/modules-available/baseconfig_partitions_cdn/lang/pt/template-tags.json
deleted file mode 100644
index a010e18c..00000000
--- a/modules-available/baseconfig_partitions_cdn/lang/pt/template-tags.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "lang_confirm": "Voc\u00ea deseja salvar configura\u00e7\u00f5es em [ \/srv\/openslx\/www\/boot\/default\/config ] ?",
- "lang_create": "Criar",
- "lang_helpId": "Id da parti\u00e7\u00e3o",
- "lang_helpMountPoint": "Precisa ser um diret\u00f3rio: \/exemplo\/diret\u00f3rio\/",
- "lang_helpOptions": "Atualmente, apenas a op\u00e7\u00e3o 'bootable' est\u00e1 dispon\u00edvel",
- "lang_helpSize": "Precisa estar em Gigabytes, por exemplo 15G",
- "lang_newPartition": "Nova Parti\u00e7\u00e3o",
- "lang_partitionId": "Id",
- "lang_partitionManagement": "Gerenciamento de Parti\u00e7\u00f5es",
- "lang_partitionMountPoint": "Mount Point",
- "lang_partitionOptions": "Op\u00e7\u00f5es",
- "lang_partitionSize": "Tamanho",
- "lang_resetConfirm": "Voc\u00ea realmente deseja restaurar as vari\u00e1veis para seus valores padr\u00f5es?",
- "lang_resetDefault": "Restaurar Padr\u00e3o"
-} \ No newline at end of file
diff --git a/modules-available/baseconfig_partitions_cdn/page.inc.php b/modules-available/baseconfig_partitions_cdn/page.inc.php
deleted file mode 100644
index b61ea448..00000000
--- a/modules-available/baseconfig_partitions_cdn/page.inc.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-
-class Page_BaseConfig_Partitions_CDN extends Page
-{
-
- protected function doPreprocess()
- {
- User::load();
-
- $action = Request::post('action');
-
- if($action == 'new_partition') {
- if (User::hasPermission("partitions.add")) {
- $this->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 @@
-<h1>{{lang_partitionManagement}}</h1>
-
-<p>{{lang_explanationText}}</p>
-
-<form action="?do=BaseConfig_Partitions_CDN" method="post">
- <input type="hidden" name="token" value="{{token}}">
- <div class='list-group'>
- {{#partitions}}
- <div class='list-group-item'>
- <div class='row'>
- <div class='col-sm-2'>
- <input name='partition-{{id}}-partition_id' type='text' class='form-control' value='{{partition_id}}' placeholder='{{lang_partitionId}}'>
- </div>
- <div class='col-sm-2'>
- <input name='partition-{{id}}-size' type='text' class='form-control' value='{{size}}' placeholder='{{lang_partitionSize}}'>
- </div>
- <div class='col-sm-4 col-md-3'>
- <input name='partition-{{id}}-mount_point' type='text' class='form-control' value='{{mount_point}}' placeholder='{{lang_partitionMountPoint}}'/>
- </div>
- <div class='col-sm-3'>
- <input name='partition-{{id}}-options' type='text' class='form-control' size='30' value='{{options}}' placeholder='{{lang_partitionOptions}}'/>
- </div>
- <div class='col-sm-1 col-md-2'>
- <a class='btn btn-danger btn-sm {{allowedToDelete}}disabled{{allowedToDelete}}' href='?do=BaseConfig_Partitions_CDN&amp;deletePartition={{id}}&amp;token={{token}}'>
- <span class='glyphicon glyphicon-trash'></span>
- </a>
- </div>
- </div>
- </div>
- {{/partitions}}
- <div class='list-group-item clearfix'>
- <div class="pull-right">
- <button {{^allowedToAdd}}disabled{{/allowedToAdd}} type="button" class='btn btn-success' data-toggle='modal' data-target='#add-partition'>
- <span class='glyphicon glyphicon-plus'></span> {{lang_newPartition}}
- </button>
- </div>
- </div>
- </div>
- <div class="pull-right">
- <button type="button" class="btn btn-default" data-toggle="modal" data-target="#downloadModal"><span class="glyphicon glyphicon-download-alt"></span> Download</button>
- <button class="btn btn-warning" type="reset"><span class="glyphicon glyphicon-refresh"></span> {{lang_discardChanges}}</button>
- <button {{^allowedToEdit}}disabled{{/allowedToEdit}} class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
- </div>
-
- <div class ="modal fade" id="downloadModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog" style="width: 400px" role="document">
- <div class="modal-content">
- <div class="modal-body">
- {{lang_confirm}}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="button" onclick="saveConfig()" class="btn btn-primary" name="download">
- <span class="glyphicon glyphicon-download-alt"></span> Download
- </button>
- </div>
- </div>
- </div>
- </div>
-</form>
-
-<form method="post" action="?do=BaseConfig_Partitions_CDN">
- <input type="hidden" name="token" value="{{token}}">
- <input type="hidden" name="action" value="reset">
- <button {{^allowedToReset}}disabled{{/allowedToReset}} class="btn btn-danger" type="button" data-toggle="modal" data-target="#resetDefaultModal">{{lang_resetDefault}}</button>
-
- <div class ="modal fade" id="resetDefaultModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog" style="width: 400px" role="document">
- <div class="modal-content">
- <div class="modal-body">
- {{lang_areYouSureNoUndo}}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="submit" class="btn btn-danger" name="resetDefault"> {{lang_resetDefault}}</button>
- </div>
- </div>
- </div>
- </div>
-</form>
-
-<!-- Create Partition Window -->
-<form id="createPartitionForm" action="?do=BaseConfig_Partitions_CDN" method="post">
- <div class="modal fade" id="add-partition" tabindex="-1" role="dialog">
- <div class="modal-dialog">
-
- <div class="modal-content">
- <div class="modal-header">
- <h4><b>{{lang_newPartition}}</b></h4>
- </div>
-
- <div class="modal-body">
- <div class="input-group">
- <span class="input-group-addon" style="min-width:140px;">{{lang_partitionId}} *</span>
- <input name="new-partition-id" class="form-control" type="text">
- </div>
- <p class="help-block">{{lang_helpId}}</p>
- <div class="input-group">
- <span class="input-group-addon" style="min-width:140px;">{{lang_partitionSize}} *</span>
- <input name="new-partition-size" class="form-control" type="text">
- </div>
- <p class="help-block">{{lang_helpSize}}</p>
- <div class="input-group">
- <span class="input-group-addon" style="min-width:140px;">{{lang_partitionMountPoint}}</span>
- <input name="new-partition-mount-point" class="form-control" type="text">
- </div>
- <p class="help-block">{{lang_helpMountPoint}}</p>
- <div class="input-group">
- <span class="input-group-addon" style="min-width:140px;">{{lang_partitionOptions}}</span>
- <input name="new-partition-options" class="form-control" type="text">
- </div>
- <p class="help-block">{{lang_helpOptions}}</p>
- </div>
-
- <div class="modal-footer">
- <button class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="submit" class="btn btn-success">
- <span class='glyphicon glyphicon-plus'></span> {{lang_create}}
- </button>
- </div>
- </div>
- </div>
- </div>
- <input type="hidden" name="action" value="new_partition">
- <input type="hidden" name="token" value="{{token}}">
-</form>
-
-<script type="text/javascript">
- document.addEventListener("DOMContentLoaded", function () {
- $("#createPartitionForm").submit(function () {
- var input1 = $("input[name=new-partition-id]");
- var input2 = $("input[name=new-partition-size]");
- var id = $.trim(input1.val());
- var size = $.trim(input2.val());
- if (!id) {
- input1.addClass("missingInput");
- }
- if (!size) {
- input2.addClass("missingInput");
- }
- if (!id || !size) {
- return false;
- }
- });
- });
-
-
- function saveConfig(){
- window.location = 'api.php?do=baseconfig&user={{user}}&save=true';
- }
-</script> \ 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 @@
-<?php
-
-$res = array();
-
-$res[] = tableCreate('cities', "
- `cityid` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL,
- `ip` varchar(10) NOT NULL,
- PRIMARY KEY (`cityid`)
-");
-
-// Update path
-
-// -- none --
-
-// Create response for browser
-
-if (in_array(UPDATE_DONE, $res)) {
- finalResponse(UPDATE_DONE, 'Tables created successfully');
-}
-
-finalResponse(UPDATE_NOOP, 'Everything already up to date');
diff --git a/modules-available/citymanagement/lang/de/categories.json b/modules-available/citymanagement/lang/de/categories.json
deleted file mode 100644
index 0c348a06..00000000
--- a/modules-available/citymanagement/lang/de/categories.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "cities": "St\u00e4dte"
-} \ No newline at end of file
diff --git a/modules-available/citymanagement/lang/en/categories.json b/modules-available/citymanagement/lang/en/categories.json
deleted file mode 100644
index 2233db93..00000000
--- a/modules-available/citymanagement/lang/en/categories.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "cities": "Cities"
-} \ No newline at end of file
diff --git a/modules-available/citymanagement/lang/en/module.json b/modules-available/citymanagement/lang/en/module.json
deleted file mode 100644
index a3914cea..00000000
--- a/modules-available/citymanagement/lang/en/module.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "module_name": "Management"
-} \ No newline at end of file
diff --git a/modules-available/citymanagement/lang/en/template-tags.json b/modules-available/citymanagement/lang/en/template-tags.json
deleted file mode 100644
index 02c30b02..00000000
--- a/modules-available/citymanagement/lang/en/template-tags.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "lang_cancelConfirm": "Do you really want to remove this city?",
- "lang_cityInfo": "Here you can create new cities for the website, besides editing or removing the existing ones",
- "lang_cityPage": "Manage cities",
- "lang_cityname": "City name",
- "lang_close": "Close",
- "lang_create": "Create",
- "lang_edit": "Edit",
- "lang_editcity": "Edit City",
- "lang_operations": "Operations",
- "lang_remove": "Remove",
- "lang_save": "Save"
-} \ No newline at end of file
diff --git a/modules-available/citymanagement/lang/pt/module.json b/modules-available/citymanagement/lang/pt/module.json
deleted file mode 100644
index a65f27b4..00000000
--- a/modules-available/citymanagement/lang/pt/module.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "module_name": "Gerenciamento"
-} \ No newline at end of file
diff --git a/modules-available/citymanagement/lang/pt/template-tags.json b/modules-available/citymanagement/lang/pt/template-tags.json
deleted file mode 100644
index b8c35000..00000000
--- a/modules-available/citymanagement/lang/pt/template-tags.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "lang_cancelConfirm": "Deseja realmente remover a cidade?",
- "lang_cityInfo": "Nesta se\u00e7\u00e3o voc\u00ea poder\u00e1 criar cidades para o site, al\u00e9m de editar ou remover cidades existentes",
- "lang_cityPage": "Gerenciar cidades",
- "lang_cityname": "Nome da cidade",
- "lang_create": "Criar",
- "lang_edit": "Editar",
- "lang_editcity": "Editar Cidade",
- "lang_operations": "Opera\u00e7\u00f5es",
- "lang_remove": "Remover"
-} \ No newline at end of file
diff --git a/modules-available/citymanagement/page.inc.php b/modules-available/citymanagement/page.inc.php
deleted file mode 100644
index 56e25387..00000000
--- a/modules-available/citymanagement/page.inc.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-
-class Page_Citymanagement extends Page
-{
-
- private $page;
-
- protected function doPreprocess()
- {
- User::load();
-
- $p = Request::get('page');
- if($p != false)
- $this->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 @@
-<div class="panel panel-default" style="border-color:#333;">
- <div class="panel-heading" style="border-color:#333;background-color:#333;background-image: none;color:#FFF;">
- <div class="panel-title">{{lang_cityPage}}</div>
- </div>
- <div class="panel-body">
- <p>
- {{lang_cityInfo}}
- </p>
-
- </div>
- <table class="table">
- <tr>
- <form method="post" action="?do=Citymanagement">
- <input type="hidden" name="action" value="create">
- <input type="hidden" name="token" value="{{token}}">
- <td><input class="form-control" name="name" type="text" placeholder="{{lang_cityname}}"></td>
- <td><input class="btn btn-primary" type="submit" value="{{lang_create}}"></td>
- </form>
- </tr>
- <tr>
- <th style="text-align: center;">ID</th>
- <th style="text-align: center;">{{lang_cityname}}</th>
- <th colspan="4">{{lang_operations}}</th>
- </tr>
- {{#cities}}
- <tr>
- <td><input class="form-control" type="text" disabled="disabled" value="{{id}}" size="3"></td>
- <td><input class="form-control" type="text" disabled="disabled" value="{{name}}"></td>
- <td colspan="4">
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#city{{id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> {{lang_edit}}</button>
- <form method="post" action="?do=Citymanagement" style="display:inline-block;">
- <input type="hidden" name="action" value="delete">
- <input type="hidden" name="cityid" value="{{id}}">
- <input type="hidden" name="token" value="{{token}}">
- <button class="btn btn-danger" type="submit" onclick="return confirm('{{lang_cancelConfirm}}');"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {{lang_remove}}</a>
- </form>
- </td>
- </tr>
- {{/cities}}
- <tr>
- <td colspan="6">
- <ul class="pagination" style="margin:10px 0;">
- {{#pages}}
- <li class="{{class}}"><a href="?do=Citymanagement&page={{page}}">{{page}}</a></li>
- {{/pages}}
- </ul>
- </td>
- </tr>
- </table>
-</div>
-{{#cities}}
-<div class="modal fade" id="city{{id}}" tabindex="-1" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header"><h4 class="modal-title">{{lang_editcity}}</h4></div>
- <div class="modal-body">
- <form method="post" action="">
- <input type="hidden" name="action" value="edit">
- <input type="hidden" name="token" value="{{token}}">
- <div class="form-group">
- <label for="cityid">ID</label>
- <input type="text" class="form-control" name="cityid" readonly="readonly" value="{{id}}">
- </div>
- <div class="form-group">
- <label for="cityid">{{lang_cityname}}</label>
- <input type="text" class="form-control" name="name" placeholder="{{lang_cityname}}" value="{{name}}">
- </div>
- <div class="modal-footer">
- <input class="btn btn-primary" type="submit" value="{{lang_save}}">
- <a class="btn btn-default" data-dismiss="modal">{{lang_close}}</a>
- </div>
- </form>
- </div>
- </div>
- </div>
-</div>
-{{/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 @@
-<?php
-
-class Page_Imgmanagement extends Page
-{
-
- private $page;
- private $baselocation;
- private $images;
-
- protected function doPreprocess()
- {
-
- User::load();
- if (!User::hasPermission('baseconfig_local')) {
- Message::addError('main.no-permission');
- Util::redirect('?do=Main');
- }
-
- error_reporting(E_ALL);
- ini_set('display_errors','on');
-
- Session::get('token');
-
- }
-
- protected function doRender()
- {
- error_reporting(E_ALL);
- ini_set('display_errors','on');
-
- $actives = array();
- $deactives = array();
-
- $res = Database::simpleQuery("SELECT id, name, path, userid, is_template, is_active, description FROM images ORDER BY id DESC");
- while ($row = $res->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 @@
-<div class="panel panel-default">
- <div class="panel-heading">
- Gerenciamento de Imagens
- </div>
-
- <div class="panel-body">
- <div class="alert alert-info">
- Imagens em azul indicam imagens criadas pelo usuário
- </div>
-
- <div class="panel-body col-xs-6">
- <div class="left">
- <ul class="source connected">
- {{#deactives}}
- <li>{{name}}</li>
- {{/deactives}}
- </ul>
- </div>
- </div>
-
- <div class="panel-body col-xs-6">
- <div class="right">
- <ul class="target connected" id="ativa1">
-
- {{#actives}}
- <li>{{name}}</li>
- {{/actives}}
- </ul>
- </div>
- </div>
-
- <div class="panel-body text-center">
- <input type='button' value='<<' id='move_left' />
- <input type='button' value='>>' id='move_right' />
- <a class="btn btn-default" href="#" role="button">Upload de Nova Imagem<a>
- <a class="btn btn-info" href="#" role="button">Gerar IPXE<a>
- <a class="btn btn-info" href="#" role="button">Salvar<a>
- </div>
-
- </div>
-</div>
-
-<script src="script/jquery.sortable.min.js"></script>
-<script type="text/javascript">
- $(document).ready(function() {
- $(".source, .target").sortable({
- connectWith: ".connected"
- });
-
- });
- $('body').on('click', 'li', function() {
- $(this).toggleClass('selected');
- });
-
- $('#move_left').click(function() {
- $('.source').append($('.target .selected').removeClass('selected'));
- });
-
- $('#move_right').click(function() {
- $('.target').append($('.source .selected').removeClass('selected'));
- });
-</script>
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 @@
-<?php
-
-class Page_InternetAccess extends Page
-{
-
- protected function doPreprocess()
- {
- User::load();
-
- if (!User::isLoggedIn()) {
- Message::addError('main.no-permission');
- Util::redirect('?do=Main');
- }
-
- $action = Request::any('action', 'show');
-
- if ($action == 'save') {
- if (User::hasPermission("configuration.safe")) {
- if (isset($_POST['PROXY_CONF'])) {
- $data = array();
- foreach (array('PROXY_CONF', 'PROXY_ADDR', 'PROXY_PORT', 'PROXY_USERNAME', 'PROXY_PASSWORD') as $key) {
- $data[$key] = Request::post($key, '');
- }
- if (!FileUtil::arrayToFile(CONFIG_PROXY_CONF, $data)) {
- Message::addError('main.error-write', CONFIG_PROXY_CONF);
- Util::redirect();
- } else {
- Message::addSuccess('settings-updated');
- Taskmanager::release(Taskmanager::submit('ReloadProxy'));
- $taskids = array();
- Trigger::stopDaemons(null, $taskids);
- $taskids = array();
- Trigger::startDaemons(null, $taskids);
- Session::set('ia-restart', $taskids);
- Util::redirect('?do=InternetAccess&show=update');
- }
- }
- }
- }
- }
-
- protected function doRender()
- {
- if (Request::any('show') === 'update') {
- $taskids = Session::get('ia-restart');
- if (is_array($taskids)) {
- Render::addTemplate('restart', $taskids);
- } else {
- Message::addError('invalid-action', 'Restart');
- }
- }
- $data = FileUtil::fileToArray(CONFIG_PROXY_CONF);
- if (!isset($data['PROXY_CONF']))
- $data['PROXY_CONF'] = 'AUTO';
- $data['selected_' . $data['PROXY_CONF']] = 'selected';
-
- $data['allowedSave'] = User::hasPermission("configuration.safe");
-
- Render::addTemplate('_page', $data);
- }
-
-}
diff --git a/modules-available/internetaccess/permissions/permissions.json b/modules-available/internetaccess/permissions/permissions.json
deleted file mode 100644
index 09652e51..00000000
--- a/modules-available/internetaccess/permissions/permissions.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "configuration.safe": {
- "location-aware": false
- }
-} \ No newline at end of file
diff --git a/modules-available/internetaccess/style.css b/modules-available/internetaccess/style.css
deleted file mode 100644
index 77fa7213..00000000
--- a/modules-available/internetaccess/style.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.input-group-addon {
- min-width:150px;
-}
diff --git a/modules-available/internetaccess/templates/_page.html b/modules-available/internetaccess/templates/_page.html
deleted file mode 100644
index 1413e280..00000000
--- a/modules-available/internetaccess/templates/_page.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<h1>{{lang_internetAccess}}</h1>
-
-<form action="?do=InternetAccess&amp;action=save" method="post">
- <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1">
- <input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1">
- <input type="hidden" name="token" value="{{token}}">
- <p>{{lang_description}}</p>
- <div class="input-group">
- <span class="input-group-addon">{{lang_proxyType}}</span>
- <select name="PROXY_CONF" class="form-control">
- <option value="AUTO" {{selected_AUTO}}>{{lang_automatic}} (dns-wpad)</option>
- <option value="NO" {{selected_NO}}>{{lang_no}}</option>
- <option value="YES" {{selected_YES}}>{{lang_manual}}</option>
- </select>
- </div>
- <br>
- <p>{{lang_manualProxyConfig}}</p>
- <div class="input-group">
- <span class="input-group-addon">{{lang_proxyAddress}} *</span>
- <input name="PROXY_ADDR" value="{{PROXY_ADDR}}" type="text" class="form-control">
- </div>
- <div class="input-group">
- <span class="input-group-addon">{{lang_proxyPort}} *</span>
- <input name="PROXY_PORT" value="{{PROXY_PORT}}" type="text" class="form-control">
- </div>
- <div class="input-group">
- <span class="input-group-addon">{{lang_proxyUsername}}</span>
- <input name="PROXY_USERNAME" value="{{PROXY_USERNAME}}" type="text" class="form-control">
- </div>
- <div class="input-group">
- <span class="input-group-addon">{{lang_proxyPassword}}</span>
- <input name="PROXY_PASSWORD" value="{{PROXY_PASSWORD}}" type="{{password_type}}" class="form-control">
- </div>
- <br/>
- <div class="text-right">
- <button {{^allowedSave}}disabled{{/allowedSave}} class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
- </div>
-</form>
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 @@
-<div class="panel panel-default">
- <div class="panel-heading">{{lang_serviceRestart}}</div>
- <div class="panel-body">
- <div data-tm-id="{{syncid}}" data-tm-log="messages" data-tm-callback="restartCb">{{lang_restarting}} syncdaemon</div>
- <div data-tm-id="{{dmsdid}}" data-tm-log="messages" data-tm-callback="restartCb">{{lang_restarting}} dmsd</div>
- <div data-tm-id="{{ldadpid}}" data-tm-log="messages" data-tm-callback="restartCb">{{lang_restarting}} ldadp</div>
- <div id="restartfailed" class="alert alert-danger" style="display:none">
- {{lang_restartFailed}}
- </div>
- </div>
-</div>
-
-<script type="text/javascript">
- function restartCb(task)
- {
- if (!task || !task.statusCode)
- return;
- if (task.statusCode === 'TASK_ERROR') {
- $('#restartfailed').show('slow');
- }
- }
-</script>
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 @@
-<?php
-
-class Page_Support extends Page
-{
-
- protected function doPreprocess(){
- User::load();
- if (!User::hasPermission('superadmin')) {
- Message::addError('main.no-permission');
- Util::redirect('?do=Main');
- }
- error_reporting(E_ALL);
- ini_set('display_errors','on');
-
- Session::get('token');
-
-
- //THIS IS NOT WORKING
- //Cant connect to ANY smtp server
- /*
- if (strpos($_SERVER['REQUEST_URI'], "action=send") !== false){
- require '/var/www/slx-admin/phpmailer/PHPMailerAutoload.php';
-
- $mail = new PHPMailer;
- $mail->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 <b>in bold!</b>';
- $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 @@
-<div class="panel panel-default">
- <div class="panel-heading">
- <strong>{{lang_faq}}</strong>
- </div>
- <!-- //FAQ -->
- <div class="panel-body" id="accordion" role="tablist" aria-multiselectable="true">
-
- {{#faq}}
- <div class="panel panel-default">
- <div class="panel-heading" role="tab" id="heading{{order}}">
- <h4 class="panel-title">
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{order}}" aria-expanded="false" aria-controls="collapse{{order}}">
- {{question}}
- </a>
- </h4>
- </div>
- <div id="collapse{{order}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{order}}">
- <div class="panel-body">
- {{answer}}
- </div>
- </div>
- </div>
- {{/faq}}
-
- <a class="btn btn-default" href="?do=Support&amp;showfaq=false" role="button"><strong>{{lang_supIntro}}</strong></a>
- </div></div>
-</div>
-
-
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 @@
-<p>{{lang_supIntro}}</p>
-<div class="panel panel-default">
- <div class="panel-heading">
- <strong>{{lang_faq}}</strong>
- </div>
- <!-- //FAQ -->
- <div class="panel-body" id="accordion" role="tablist" aria-multiselectable="true">
-
- {{#faq}}
- {{#highlight}}
- <div class="panel panel-default">
- <div class="panel-heading" role="tab" id="heading{{order}}">
- <h4 class="panel-title">
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{order}}" aria-expanded="false" aria-controls="collapse{{order}}">
- {{question}}
- </a>
- </h4>
- </div>
- <div id="collapse{{order}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{order}}">
- <div class="panel-body">
- {{answer}}
- </div>
- </div>
- </div>
- {{/highlight}}
- {{/faq}}
-
- <a class="btn btn-default" href="?do=Support&amp;showfaq=true" role="button"><strong>{{lang_showall}}</strong></a>
- </div>
-</div>
-
- <!-- //Send questions (token and input not ok) -->
-<div class="panel panel-default">
- <div class="panel-heading">
- <strong>{{lang_form}}</strong>
- </div>
- <div class="panel-body">
- <form action="?do=Support&amp;showfaq=false&amp;action=send" method="post" enctype="multipart/form-data">
- <input type="hidden" name="token" value="{{token}}">
- <div class="form-group">
- <label for="emailHeader">{{lang_header}}</label>
- <input type="text" class="form-control" placeholder="{{lang_header}}" value="{{assuntoEmail}}">
- </div>
- <div class="form-group">
- <label for="emailContent">{{lang_content}}</label>
- <textarea class="form-control" rows="2" cols="20" placeholder="{{lang_content}}">{{conteudoEmail}}</textarea>
- </div>
- <div class="form-group">
- <label for="inputFile">{{lang_fileInput}}</label>
- <input type="file" name="inp_file" id="inp_file">
- <input type="hidden" name="token" value="{{token}}">
- <p class="help-block">{{lang_helpInput}}</p>
- </div>
- <button type="submit" class="btn btn-default">{{lang_submit}}</button>
- </form>
- </div>
-</div>
-
-
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 @@
-<?php
-
-class Page_SysConfigNew extends Page
-{
- // private $tmpath = '/srv/openslx/www/';
- private $tmpath = '/home/raul/tm-scripts/server';
- private $tmconfigs;
- private $tmmodules;
-
- protected function doPreprocess(){
- User::load();
- if (!User::hasPermission('baseconfig_local')) {
- Message::addError('main.no-permission');
- Util::redirect('?do=Main');
- }
-
- $this->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 .= "<button type='button' class='" . $class . "' onclick='select(this)' >";
- $ret .= $module['name'];
- $ret .= "</button>";
- }
-
- 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 @@
-<div class="row">
- <div class="col-md-6">
- <div class="panel panel-default">
- <div class="panel-heading" >
- <div class="panel-title">{{lang_configurations}}</div>
- </div>
- <div class="panel-body">
- {{lang_configsDescription}}
- </div>
- <table class="table table-striped">
- <thead>
- <th style="width: 70%">{{lang_configName}}</th>
- <th></th>
- <th></th>
- </thead>
- <tbody>
- {{#configs}}
- <tr>
- <td>{{name}}</td>
- <td>
- <button type="button" class="btn btn-xs btn-primary" onclick="loadConfig('{{name}}')" data-toggle="modal" data-target="#edit-modal" >
- <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
- {{lang_edit}}
- </button>
- </td>
- <td>
- <button type="button" class="btn btn-xs btn-danger">
- <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
- {{lang_remove}}
- </button>
- </td>
- </tr>
- {{/configs}}
- </tbody>
- </table>
- <div class="panel-footer">
- <button id="new-config-button" type="button" class="btn btn-primary" data-toggle="modal" data-target="#new-config-modal" >
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
- {{lang_newConfig}}
- </button>
- </div>
- </div>
- </div>
- <div class="col-md-6">
- <div class="panel panel-default">
- <div class="panel-heading" >
- <div class="panel-title">{{lang_modules}}</div>
- </div>
- <div class="panel-body">
- {{lang_modulesDescription}}
- </div>
- <table class="table table-striped">
- <thead>
- <th style="width: 70%">{{lang_configName}}</th>
- <th></th>
- <th></th>
- </thead>
- <tbody>
- {{#modules}}
- <tr>
- <td>{{name}}</td>
- <td>
- <button type="button" class="btn btn-xs btn-primary" onclick="loadModule('{{name}}')" >
- <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
- {{lang_edit}}
- </button>
- </td>
- <td>
- <button type="button" class="btn btn-xs btn-danger">
- <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
- {{lang_remove}}
- </button>
- </td>
- </tr>
- {{/modules}}
- </tbody>
- </table>
- <div class="panel-footer">
- <button id="new-module-button" type="button" class="btn btn-primary" data-toggle="modal" data-target="#new-module-modal" >
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
- {{lang_newModule}}
- </button>
- </div>
- </div>
- </div>
-</div>
-
-<!-- Generic modal, will have its content changed dynamically -->
-<div class="modal fade" id="edit-modal" tabindex="-1" role="dialog" aria-labelledby="edit-modal-label" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <!-- Header -->
- <div class="modal-header" id="edit-modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="edit-modal-label">{{lang_compilingIpxe}}</h4>
- </div>
- <!-- Body -->
- <div class="modal-body" id="edit-modal-body" style="overflow: auto;">
- {{lang_loading}} <img src='fonts/loader.gif'/>
-
- </div>
- <!-- Footer -->
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="button" class="btn btn-primary" disabled="disabled">{{lang_save}}</button>
- </div>
- </div>
- </div>
-</div>
-
-<!-- New config modal -->
-<form action="" method="POST">
- <div class="modal fade" id="new-config-modal" tabindex="-1" role="dialog" aria-labelledby="new-config-modal-label" aria-hidden="true">
- <form action="#" method="post">
- <div class="modal-dialog">
- <div class="modal-content">
- <!-- Header -->
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="new-config-modal-label">{{lang_compilingIpxe}}</h4>
- </div>
- <!-- Body -->
- <div class="modal-body" id="new-config-modal-body" style="overflow: auto;">
- <div>
- <label for="new-config-name">{{lang_name}}</label>
- <input type="text" name="new-config-name" class="form-control">
- </div>
- <hr>
- <div>
- <label>{{lang_modules}}</label>
- </div>
- {{#modules}}
- <button name="{{name}}" type='button' class='select-item' onclick='select(this)' >{{name}}</button>
- {{/modules}}
- </div>
- <!-- Footer -->
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <input type="submit" class="btn btn-primary" value="{{lang_create}}">
- </div>
- </div>
- </div>
- </form>
- </div>
-</form>
-<!-- New module modal -->
-<div class="modal fade" id="new-module-modal" tabindex="-1" role="dialog" aria-labelledby="new-module-modal-label" aria-hidden="true">
- <form action="#" method="post">
- <div class="modal-dialog">
- <div class="modal-content">
- <!-- Header -->
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="new-module-modal-label">{{lang_compilingIpxe}}</h4>
- </div>
- <!-- Body -->
- <div class="modal-body" id="new-module-modal-body">
- <textarea class="form-control" style="resize:none"></textarea>
- </div>
- <!-- Footer -->
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="button" class="btn btn-primary" disabled="disabled">{{lang_save}}</button>
- </div>
- </div>
- </div>
- </form>
-</div>
-
-
-<script>
- function loadConfig(config){
- $.ajax({
- method: "GET",
- url: "?do=SysConfig",
- data: { request:"configs", async: "True", config: config }
- }).done(function( msg ) {
- $("#edit-modal-body").html( msg );
- $("#edit-modal-header").html( '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="edit-modal-label">' + config + '</h4>' );
- });
- }
-
- function loadModule(module){
- window.location = "?do=SysConfig&module=" + module;
- }
-
- function select(element){0
- element.className = (element.className == 'select-item') ? 'select-item select-item-selected' : 'select-item';
- }
-</script> \ 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 @@
-
-<div class="container">
- <div class="row">
- <a href="?do=Sysconfig" style="display:inline-block;margin-bottom: 10px;">{{lang_back}}</a>
- <div class="panel panel-default">
- <div class="panel-heading">
- {{module}}
- </div>
- <div class="panel-body">
- <div class="mod-nav" id="mod-nav">
-
- </div>
- <input class="form-control" disabled="disabled" id="editor-header">
- <textarea class="editor-box" id="mod-editor" onkeyup="changeContent(this);"></textarea>
- </div>
- <div class="panel-footer">
- <button id="new-item-button" type="button" class="btn btn-default" data-toggle="modal" data-target="#item-modal" onclick="cleanModal()" >
- <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
- {{lang_new}}
- </button>
- <button type="button" class="btn btn-default" onclick="save();">
- <span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>
- {{lang_save}}
- </button>
- </div>
- </div>
- </div>
-</div>
-
-<!-- New item modal -->
-<div class="modal fade" id="item-modal" tabindex="-1" role="dialog" aria-labelledby="item-modal-label" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <!-- Header -->
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="new-config-modal-label">{{lang_new}}</h4>
- </div>
- <!-- Body -->
- <div class="modal-body" id="new-module-modal-body" style="overflow: auto;">
- <div class="mod-nav" style="height: 250px">
- <div class="item dir" onclick="clickDir(this)" data-target="#root" data-path="/"><div class="glyphicon glyphicon-folder-close dir-icon" aria-hidden="true" id="root-icon"></div> /</div>
- <div class="folder" id="root">
- <div id="dir-nav">
- </div>
- </div>
- </div>
- <div style="float:left">
- <input class="form-control" disabled="disabled" id="dir-path" style="width: 250px;margin-left: 20px;" value="/">
- <br>
- <div class="btn-group-vertical" role="group" aria-label="..." style="width: 250px;margin-left: 20px;">
- <button type="button" class="btn btn-default" onclick="switchFileInput('file')">Arquivo de Texto</button>
- <button type="button" class="btn btn-default" onclick="switchFileInput('upload')">Upload de Arquivo</button>
- <button type="button" class="btn btn-default" onclick="switchFileInput('folder')">Pasta</button>
- <button type="button" class="btn btn-default" onclick="switchFileInput('link')">Link</button>
- </div>
- <br>
- <br>
- <div id="new-file-input" style="width: 250px;margin-left: 20px;">
- <div class="form-group">
- <label for="name">Nome do Arquivo</label>
- <input type="name" class="form-control" id="new-file-data">
- </div>
- </div>
- </div>
- </div>
- <!-- Footer -->
- <div class="modal-footer" >
- <button type="button" class="btn btn-primary" data-dismiss="modal">{{lang_cancel}}</button>
- <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
- </div>
- </div>
- </div>
-</div>
-
-<script type="text/javascript">
-
-// Global variables
-var original;
-var module;
-var current;
-var path;
-
-function cleanModal(){
- $('#dir-path').val("/");
-}
-
-function clickDir(element){
- var target = element.getAttribute("data-target");
- target = target.replace(/\./g,"\\.");
- $(target + "-icon").attr('class',(($(target).css('display') == 'none') ? 'glyphicon glyphicon-folder-open dir-icon' : 'glyphicon glyphicon-folder-close dir-icon' ));
- $(target).css('display', ($(target).css('display') == 'none') ? 'block' : 'none' );
- $('#dir-path').val(element.getAttribute("data-path"));
-}
-
-function getFile(obj,file){
- var folder = file.split("/")[1];
- for (var property in obj) {
- if (obj.hasOwnProperty(property)) {
- if(property.substring(0, 4) == "dir_"){
- var pname = property.slice(4);
- if(pname == folder){
- var ret = getFile(obj[property],file.replace("/" + folder,""));
- if(ret != "Invalid file")
- return ret;
- }
- }
- if(property.substring(0, 5) == "file_"){
- if(property.slice(5) == file.replace("/",""))
- return obj[property];
- }
- }
- }
- return 'Invalid file';
-}
-
-function changeFile(obj,file,data){
- var folder = file.split("/")[1];
- for (var property in obj) {
- if (obj.hasOwnProperty(property)) {
- if(property.substring(0, 4) == "dir_"){
- var pname = property.slice(4);
- if(pname == folder){
- var ret = changeFile(obj[property],file.replace("/" + folder,""),data);
- if(ret != "")
- return ret;
- }
- }
- if(property.substring(0, 5) == "file_"){
- if(property.slice(5) == file.replace("/","")){
- obj[property] = data;
- }
- }
- }
- }
- return "";
-}
-
-function clickItem(element){
- var id = element.getAttribute("id");
- var target = id.split("/").pop();
- document.getElementById('mod-editor').value = getFile(module,id);
- document.getElementById('editor-header').value = id;
- current = id;
-}
-
-function clickLock(element){
- var id = element.getAttribute("id");
- alert("{{lang_file}}: " + id + " {{lang_cannotOpen}}");
-}
-
-function clickLink(element){
- var data = element.getAttribute("data-value");
- var newLink = prompt("{{lang_changeLink}}:",data);
- if(newLink){
- element.setAttribute("data-value",newLink);
- }
-}
-
-function changeContent(element){
- changeFile(module,current,element.value);
-}
-
-function switchFileInput(type){
- var html = "";
- switch(type){
- case "file":
- html = "<div class='form-group'><label for='name'>Nome do Arquivo</label><input type='name' class='form-control' id='new-file-data'></div>";
- break;
- case 'upload':
- html = "<div class='form-group'><label for='name'>Arquivo</label><input type='file' class='form-control' id='new-file-data'></div>";
- break;
- case 'folder':
- html = "<div class='form-group'><label for='name'>Nome da Pasta</label><input type='name' class='form-control' id='new-file-data'></div>";
- break;
- case 'link':
- html = "<div class='form-group'><label for='name'>Nome do Link</label><input type='name' class='form-control' id='new-file-data'></div>";
- break;
- }
- document.getElementById('new-file-input').innerHTML = html;
-}
-
-function getContent(obj,path,dirOnly){
- var folders = "";
- var files = "";
- for (var property in obj) {
- if (obj.hasOwnProperty(property)) {
- if(property.substring(0, 4) == "dir_"){
- var pname = property.slice(4);
- // Create file navigation tree
- if(!dirOnly){
- folders += '<div class="item dir" onclick="clickDir(this)" data-target="#' + pname + '" data-path="' + path + pname + '/' + '"><div class="glyphicon glyphicon-folder-close dir-icon" aria-hidden="true" id="' + pname + '-icon"></div> ' + pname + '</div>';
- folders += '<div class="folder" id="' + pname + '">';
- folders += getContent(obj[property],path + pname + "/",dirOnly);
- folders += '</div>';
- }
- // Create directory chooser
- else{
- folders += '<div class="item dir" onclick="clickDir(this)" data-target="#' + pname + '-dc" data-path="' + path + pname + '/' + '"><div class="glyphicon glyphicon-folder-close dir-icon" aria-hidden="true" id="' + pname + '-dc' + '-icon"></div> ' + pname + '</div>';
- folders += '<div class="folder" id="' + pname + '-dc' + '">';
- folders += getContent(obj[property],path + pname + "/",dirOnly);
- folders += '</div>';
- }
- }
- if(!dirOnly){
- if(property.substring(0, 5) == "file_"){
- var pname = property.slice(5);
- files += '<div class="item" id="' + path + pname + '" onclick="clickItem(this)">' + pname + '</div>';
- }
- if(property.substring(0, 5) == "link_"){
- var pname = property.slice(5);
- files += '<div class="item item-link" data-value="' + obj[property] + '" onclick="clickLink(this)">'
- + '<span class="glyphicon glyphicon-link" aria-hidden="true"></span> ' + pname + '</div>';
- }
- if(property.substring(0, 5) == "lock_"){
- var pname = property.slice(5);
- files += '<div class="item item-lock" id="' + path + pname + '" onclick="clickLock(this)">'
- + pname + '</div>';
- }
- }
- }
- }
- return folders+ files;
-}
-
-function mountNav(dirOnly){
- document.getElementById((dirOnly) ? 'dir-nav' : 'mod-nav').innerHTML = getContent(module,"/",dirOnly);
-}
-
-function init(){
- $.ajax({
- method: "GET",
- url: "?do=SysConfig&async=true",
- data: { request:"module-contents", module: "{{module}}" }
- }).done(function( data ) {
- if(data != ""){
- module = JSON.parse(data);
- original = JSON.parse(data);
- mountNav(false);
- mountNav(true);
- }
- });
-}
-
-function save(){
- //send JSON to PHP
- if(JSON.stringify(original) != JSON.stringify(module)){
-
- }
-}
-
-window.onbeforeunload = function (e) {
- if(JSON.stringify(original) != JSON.stringify(module)){
- var message = "{{lang_leavingMessage}}",
- e = e || window.event;
-
- // For IE and Firefox
- if (e) {
- e.returnValue = message;
- }
-
- // For Safari
- return message;
- }
- return;
-};
-
-init();
-</script> \ 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 @@
-<?php
-
-class Page_Usermanagement extends Page
-{
- private $page;
- private $deb;
-
- protected function doPreprocess()
- {
- User::load();
-
- $p = Request::get('page');
- if($p != false)
- $this->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 @@
-<div class="panel panel-primary">
- <div class="panel-heading" style="background-image: none;" >
- <div class="panel-title">{{lang_userAdmin}}</div>
- </div>
- <table class="table">
- <tr>
- <th style="text-align: center;">ID</th>
- <th style="text-align: center;">{{lang_login}}</th>
- <th style="text-align: center;">{{lang_username}}</th>
- <th style="text-align: center;">{{lang_telephone}}</th>
- <th style="text-align: center;">{{lang_email}}</th>
- <th style="text-align: center;"></th>
- </tr>
- <tr>
- <form method="post" action="">
- <input type="hidden" name="action" value="editAdmin">
- <input type="hidden" name="token" value="{{token}}">
- <td><input class="form-control" name="userid" type="text" readonly="readonly" value="{{admin_id}}" size="3"></td>
- <td><input class="form-control" type="text" disabled="disabled" value="{{admin_username}}"></td>
- <td><input class="form-control" name="username" type="text" value="{{admin_name}}"></td>
- <td><input class="form-control" name="phone" type="text" value="{{admin_telephone}}"></td>
- <td><input class="form-control" name="email" type="text" value="{{admin_email}}"></td>
- <td><input class="btn btn-primary" type="submit" value="{{lang_save}}"></td>
- </form>
- </tr>
- </table>
-</div>
-
-<div class="panel panel-default" style="border-color:#333;">
- <div class="panel-heading" style="border-color:#333;background-color:#333;background-image: none;color:#FFF;">
- <div class="panel-title">{{lang_userPage}}</div>
- </div>
- <div class="panel-body">
- <p>
- {{lang_userInfo}}
- </p>
-
- </div>
- <table class="table">
- <tr>
- <form method="post" action="?do=Usermanagement">
- <input type="hidden" name="action" value="create">
- <input type="hidden" name="token" value="{{token}}">
- <td><input class="form-control" name="login" type="text" placeholder="{{lang_login}}*"></td>
- <td><input class="form-control" name="username" type="text" placeholder="{{lang_username}}*"></td>
- <td><input class="form-control" name="pass" type="password" placeholder="{{lang_password}}*"></td>
- <td><input class="form-control" name="phone" type="text" placeholder="{{lang_telephone}}"></td>
- <td><input class="form-control" name="email" type="text" placeholder="{{lang_email}}"></td>
- <td><select class="form-control" name="city">
- {{#cities}}
- <option value="{{id}}">{{name}}</option>
- {{/cities}}
- </select></td>
- <td><input class="btn btn-primary" type="submit" value="{{lang_create}}"></td>
- </form>
- </tr>
- <tr>
- <th style="text-align: center;">ID</th>
- <th style="text-align: center;">{{lang_login}}</th>
- <th colspan="4">{{lang_operations}}</th>
- </tr>
- {{#users}}
- <tr>
- <td><input class="form-control" type="text" disabled="disabled" value="{{id}}" size="3"></td>
- <td><input class="form-control" type="text" disabled="disabled" value="{{username}}"></td>
- <td colspan="4">
- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#usr{{id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> {{lang_edit}}</button>
- <form method="post" action="?do=Usermanagement" style="display:inline-block;">
- <input type="hidden" name="action" value="delete">
- <input type="hidden" name="userid" value="{{id}}">
- <input type="hidden" name="token" value="{{token}}">
- <button class="btn btn-danger" type="submit" onclick="return confirm('{{lang_cancelConfirm}}');"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {{lang_remove}}</a>
- </form>
- </td>
- </tr>
- {{/users}}
- <tr>
- <td colspan="6">
- <ul class="pagination" style="margin:10px 0;">
- {{#pages}}
- <li class="{{class}}"><a href="?do=Usermanagement&page={{page}}">{{page}}</a></li>
- {{/pages}}
- </ul>
- </td>
- </tr>
- </table>
-</div>
-{{#users}}
-<div class="modal fade" id="usr{{id}}" tabindex="-1" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header"><h4 class="modal-title">{{lang_editUser}}</h4></div>
- <div class="modal-body">
- <form method="post" action="">
- <input type="hidden" name="action" value="edit">
- <input type="hidden" name="token" value="{{token}}">
- <div class="form-group">
- <label for="userid">ID</label>
- <input type="text" class="form-control" name="userid" readonly="readonly" name="userid" value="{{id}}">
- </div>
- <div class="form-group">
- <label for="userid">Login</label>
- <input type="text" class="form-control" name="login" disabled="disabled" placeholder="{{lang_login}}" value="{{username}}">
- </div>
- <div class="form-group">
- <label for="userid">{{lang_username}}</label>
- <input type="text" class="form-control" name="username" placeholder="{{lang_username}}" value="{{name}}">
- </div>
- <div class="form-group">
- <label for="userid">{{lang_telephone}}</label>
- <input type="text" class="form-control" name="phone" placeholder="{{lang_telephone}}" value="{{telephone}}">
- </div>
- <div class="form-group">
- <label for="userid">{{lang_email}}</label>
- <input type="text" class="form-control" name="email" placeholder="{{lang_email}}" value="{{email}}">
- </div>
- <div class="form-group">
- <b>Permissões:</b>
- <select name="permissions" class="form-control">
- <option value="4">Normal</option>
- </select>
- </div>
- </div>
- <div class="modal-footer">
- <input class="btn btn-primary" type="submit" value="{{lang_save}}">
- <a class="btn btn-default" data-dismiss="modal">{{lang_close}}</a>
- </div>
- </form>
- </div>
- </div>
-</div>
-{{/users}} \ No newline at end of file