From 94c11b41efad3231ad0730dcf298759d1ad8b335 Mon Sep 17 00:00:00 2001 From: Nexus633 Date: Sun, 26 Jul 2020 22:44:21 +0200 Subject: [PATCH] Add Keyfile select option in Voicemaster and App/Game Master Add/Edit View --- stuff/admin/roots.php | 5 ++++- stuff/admin/voice_master.php | 4 ++-- template/default/admin/admin_roots_add.tpl | 9 ++++++++- template/default/admin/admin_roots_md.tpl | 9 ++++++++- template/default/admin/admin_voicemasterserver_add.tpl | 9 ++++++++- template/default/admin/admin_voicemasterserver_md.tpl | 9 ++++++++- 6 files changed, 38 insertions(+), 7 deletions(-) diff --git a/stuff/admin/roots.php b/stuff/admin/roots.php index 79499b82..d6a2557c 100644 --- a/stuff/admin/roots.php +++ b/stuff/admin/roots.php @@ -136,7 +136,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { if (!$ui->smallletters('action', 2, 'post')) { if ($ui->st('d', 'get') == 'ad' and $reseller_id == 0) { - + $ssh2keys = array_diff(scandir(EASYWIDIR . '/keys/'), array('..', '.', "empty.txt")); $template_file = 'admin_roots_add.tpl'; } else if ($ui->st('d', 'get') == 'md' and $id) { @@ -205,7 +205,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $configFiles = $row['config_files']; $configBadFiles = $row['config_bad_files']; } + ; + $ssh2keys = array_diff(scandir(EASYWIDIR . '/keys/'), array('..', '.', "empty.txt")); $template_file = ($query->rowCount() > 0) ? 'admin_roots_md.tpl' : 'admin_404.tpl'; } else { @@ -321,6 +323,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } } else { unset($header, $text); + $ssh2keys = array_diff(scandir(EASYWIDIR . '/keys/'), array('..', '.', "empty.txt")); $template_file = ($ui->st('d', 'get') == 'ad') ? 'admin_roots_add.tpl' : 'admin_roots_md.tpl'; } } diff --git a/stuff/admin/voice_master.php b/stuff/admin/voice_master.php index 654bab57..30265fee 100644 --- a/stuff/admin/voice_master.php +++ b/stuff/admin/voice_master.php @@ -183,7 +183,7 @@ virtualserver_weblist_enabled 0 = Off'; if (!$ui->w('action', 3, 'post') and $ui->st('d', 'get') != 'ri') { if ($ui->st('d', 'get') == 'ad') { - + $ssh2keys = array_diff(scandir(EASYWIDIR . '/keys/'), array('..', '.', "empty.txt")); $template_file = 'admin_voicemasterserver_add.tpl'; } else if ($ui->st('d', 'get') == 'md' and $id) { @@ -240,7 +240,7 @@ virtualserver_weblist_enabled 0 = Off'; $root = $query2->fetchColumn(); } } - + $ssh2keys = array_diff(scandir(EASYWIDIR . '/keys/'), array('..', '.', "empty.txt")); $template_file = ($query->rowCount() > 0) ? 'admin_voicemasterserver_md.tpl' : 'admin_404.tpl'; } else { diff --git a/template/default/admin/admin_roots_add.tpl b/template/default/admin/admin_roots_add.tpl index f19b16c8..50c2caad 100644 --- a/template/default/admin/admin_roots_add.tpl +++ b/template/default/admin/admin_roots_add.tpl @@ -124,7 +124,14 @@
-
+
+ +
diff --git a/template/default/admin/admin_roots_md.tpl b/template/default/admin/admin_roots_md.tpl index 750eb3cb..e7188421 100644 --- a/template/default/admin/admin_roots_md.tpl +++ b/template/default/admin/admin_roots_md.tpl @@ -126,7 +126,14 @@
-
+
+ +
diff --git a/template/default/admin/admin_voicemasterserver_add.tpl b/template/default/admin/admin_voicemasterserver_add.tpl index 4a8bf090..2ebd1288 100644 --- a/template/default/admin/admin_voicemasterserver_add.tpl +++ b/template/default/admin/admin_voicemasterserver_add.tpl @@ -287,7 +287,14 @@
-
+
+ +
diff --git a/template/default/admin/admin_voicemasterserver_md.tpl b/template/default/admin/admin_voicemasterserver_md.tpl index eaa499a2..24562b59 100644 --- a/template/default/admin/admin_voicemasterserver_md.tpl +++ b/template/default/admin/admin_voicemasterserver_md.tpl @@ -261,7 +261,14 @@
-
+
+ +