diff --git a/web/add/cron/index.php b/web/add/cron/index.php index 62cae8f1..c9302ae6 100644 --- a/web/add/cron/index.php +++ b/web/add/cron/index.php @@ -1,10 +1,9 @@ diff --git a/web/add/dns/index.php b/web/add/dns/index.php index bd890c87..7c18faab 100644 --- a/web/add/dns/index.php +++ b/web/add/dns/index.php @@ -1,10 +1,9 @@ $value) { $_SESSION[$key] = $value; } -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); - -// Display body -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_server.html'); +// Render page +render_page($user, $TAB, 'edit_server'); // Flush session messages unset($_SESSION['error_msg']); unset($_SESSION['ok_msg']); - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/edit/user/index.php b/web/edit/user/index.php index 2fbd526a..049ee20d 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -1,10 +1,9 @@ ', $output); if (empty($error)) $error = __('Error code:',$return_var); $_SESSION['error_msg'] = $error; - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html'); - include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); + render_page($user, $TAB, 'generate_ssl'); unset($_SESSION['error_msg']); - exit(); + exit; } // OK message @@ -106,6 +97,7 @@ $v_csr = $data[$v_domain]['CSR']; // Back uri $_SESSION['back'] = $_SERVER['REQUEST_URI']; -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ssl.html'); -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); +// Render page +render_page($user, $TAB, 'list_ssl'); + unset($_SESSION['ok_msg']); diff --git a/web/inc/main.php b/web/inc/main.php index 4df0ece9..03446849 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -95,6 +95,41 @@ function check_return_code($return_var,$output) { } } +function insert_scripts() { + @include_once(dirname(__DIR__) . '/templates/scripts.html'); +} + +function render_page($user, $TAB, $page) { + $__template_dir = dirname(__DIR__) . '/templates/'; + + // Header + include($__template_dir . 'header.html'); + + // Panel + top_panel(empty($_SESSION['look']) ? $_SESSION['user'] : $_SESSION['look'], $TAB); + + // Extarct global variables + // I think those variables should be passed via arguments + //* + extract($GLOBALS, EXTR_SKIP); + /*/ + $variables = array_filter($GLOBALS, function($key){return preg_match('/^(v_|[a-z])[a-z\d]+$/', $key);}, ARRAY_FILTER_USE_KEY); + extract($variables, EXTR_OVERWRITE); + //*/ + + // Body + if (($_SESSION['user'] !== 'admin') && (@include($__template_dir . "user/$page.html"))) { + // User page loaded + } else { + // Not admin or user page doesn't exist + // Load admin page + @include($__template_dir . "admin/$page.html"); + } + + // Footer + include($__template_dir . 'footer.html'); +} + function top_panel($user, $TAB) { global $panel; $command = VESTA_CMD."v-list-user '".$user."' 'json'"; @@ -107,7 +142,7 @@ function top_panel($user, $TAB) { unset($output); - // getting notifications + // getting notifications $command = VESTA_CMD."v-list-user-notifications '".$user."' 'json'"; exec ($command, $output, $return_var); $notifications = json_decode(implode('', $output), true); @@ -118,7 +153,7 @@ function top_panel($user, $TAB) { } } unset($output); - + if ( $user == 'admin' ) { include(dirname(__FILE__).'/../templates/admin/panel.html'); @@ -241,36 +276,6 @@ function send_email($to,$subject,$mailtext,$from) { mail($to, $subject, $message, $header); } -function display_error_block() { - if (!empty($_SESSION['error_msg'])) { - echo ' -
- -
-

'. htmlentities($_SESSION['error_msg']) .'

-
-
'."\n"; - unset($_SESSION['error_msg']); - } -} - function list_timezones() { $tz = new DateTimeZone('HAST'); $timezone_offsets['HAST'] = $tz->getOffset(new DateTime); diff --git a/web/list/backup/exclusions/index.php b/web/list/backup/exclusions/index.php index d03e9861..8089e8d7 100644 --- a/web/list/backup/exclusions/index.php +++ b/web/list/backup/exclusions/index.php @@ -3,22 +3,15 @@ error_reporting(NULL); $TAB = 'BACKUP'; // Main include -include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); - -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); +include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php'); // Data exec (VESTA_CMD."v-list-user-backup-exclusions $user json", $output, $return_var); $data = json_decode(implode('', $output), true); unset($output); -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_exclusions.html'); + +// Render page +render_page($user, $TAB, 'list_backup_exclusions'); // Back uri $_SESSION['back'] = $_SERVER['REQUEST_URI']; - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/list/backup/index.php b/web/list/backup/index.php index a7920572..2e29a50a 100644 --- a/web/list/backup/index.php +++ b/web/list/backup/index.php @@ -3,31 +3,24 @@ error_reporting(NULL); $TAB = 'BACKUP'; // Main include -include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); +include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php'); -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); - -// Data +// Data & Render page if (empty($_GET['backup'])){ exec (VESTA_CMD."v-list-user-backups $user json", $output, $return_var); $data = json_decode(implode('', $output), true); $data = array_reverse($data,true); unset($output); - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup.html'); + + render_page($user, $TAB, 'list_backup'); } else { - exec (VESTA_CMD."v-list-user-backup $user '".escapeshellarg($_GET['backup'])."' json", $output, $return_var); + exec (VESTA_CMD."v-list-user-backup $user ".escapeshellarg($_GET['backup'])." json", $output, $return_var); $data = json_decode(implode('', $output), true); $data = array_reverse($data,true); unset($output); - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_detail.html'); + + render_page($user, $TAB, 'list_backup_detail'); } // Back uri $_SESSION['back'] = $_SERVER['REQUEST_URI']; - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/list/cron/index.php b/web/list/cron/index.php index 19f66379..230483cb 100644 --- a/web/list/cron/index.php +++ b/web/list/cron/index.php @@ -1,16 +1,9 @@ - -
@@ -438,4 +436,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/add_db.html b/web/templates/admin/add_db.html index a69a6c14..a1e6cc2d 100644 --- a/web/templates/admin/add_db.html +++ b/web/templates/admin/add_db.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,26 +30,7 @@
- + @@ -79,7 +58,7 @@ @@ -100,7 +79,7 @@ @@ -112,13 +91,13 @@ if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected'; echo ">".htmlentities($value).""; } - ?> + ?> @@ -130,14 +109,14 @@ if ((!empty($v_host)) && ( $key == $v_host )) echo ' selected'; echo ">".htmlentities($key).""; } - ?> + ?> @@ -183,7 +162,7 @@ @@ -208,8 +187,25 @@ - - + diff --git a/web/templates/admin/add_dns.html b/web/templates/admin/add_dns.html index 564ca5fa..10285e23 100644 --- a/web/templates/admin/add_dns.html +++ b/web/templates/admin/add_dns.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@ -
@@ -68,7 +47,7 @@
- +
- +
- +
- +
- +
- +
@@ -190,33 +178,40 @@
- + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }) + $('.add-ns').show() + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + + }); + diff --git a/web/templates/admin/add_dns_rec.html b/web/templates/admin/add_dns_rec.html index 76964b4c..ddee3a00 100644 --- a/web/templates/admin/add_dns_rec.html +++ b/web/templates/admin/add_dns_rec.html @@ -12,9 +12,7 @@ } ?> - -
@@ -122,7 +120,8 @@ - - + + + diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html index de3d6372..710ae297 100644 --- a/web/templates/admin/add_firewall.html +++ b/web/templates/admin/add_firewall.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@
- @@ -54,7 +42,7 @@
@@ -67,7 +55,7 @@ @@ -128,4 +116,12 @@
- +
- +
- \ No newline at end of file + + + + diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index 9c09d8da..ed06693e 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@ - @@ -54,7 +42,7 @@
@@ -95,4 +83,12 @@
- +
- \ No newline at end of file + + + + diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html index 43b37d5d..4c3b0be0 100644 --- a/web/templates/admin/add_ip.html +++ b/web/templates/admin/add_ip.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@ - @@ -157,3 +145,11 @@
+ + + diff --git a/web/templates/admin/add_mail.html b/web/templates/admin/add_mail.html index c736f586..057e8165 100644 --- a/web/templates/admin/add_mail.html +++ b/web/templates/admin/add_mail.html @@ -12,9 +12,7 @@ } ?> - -
@@ -81,4 +79,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/add_mail_acc.html b/web/templates/admin/add_mail_acc.html index 2dd8c78d..08aaf74d 100644 --- a/web/templates/admin/add_mail_acc.html +++ b/web/templates/admin/add_mail_acc.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,53 +30,6 @@
- @@ -229,4 +180,51 @@
- + + + + diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index ec4e675c..72b9bfd1 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -12,9 +12,7 @@ } ?> - -
@@ -72,11 +70,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " . strtoupper($_SESSION['WEB_BACKEND']). "" ;?> @@ -96,13 +94,13 @@ } echo ">".$value."\n"; } - ?> + ?> - + - + " .strtoupper($_SESSION['PROXY_SYSTEM']) . "" ;?> @@ -123,11 +121,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['DNS_SYSTEM']) . "" ;?> @@ -147,7 +145,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -170,7 +168,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -380,34 +378,35 @@ - - \ No newline at end of file + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + }); + + diff --git a/web/templates/admin/add_user.html b/web/templates/admin/add_user.html index 7f978c65..aafdf253 100644 --- a/web/templates/admin/add_user.html +++ b/web/templates/admin/add_user.html @@ -12,9 +12,7 @@ } ?> - - @@ -34,24 +32,6 @@
- @@ -112,7 +92,7 @@ } echo ">".htmlentities($key)."\n"; } - ?> + ?> @@ -188,4 +168,24 @@
- \ No newline at end of file + + + + diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html index 2a917029..5b9ecf47 100644 --- a/web/templates/admin/add_web.html +++ b/web/templates/admin/add_web.html @@ -12,9 +12,7 @@ } ?> - -
@@ -33,44 +31,6 @@
- @@ -142,7 +102,7 @@ - +
@@ -164,7 +124,7 @@
- + / @@ -242,7 +202,7 @@ } echo ">" . htmlentities(__($value)) . "\n"; } - ?> + ?> @@ -429,14 +389,49 @@ + + - + diff --git a/web/templates/admin/edit_backup_exclusions.html b/web/templates/admin/edit_backup_exclusions.html index 4dd5995c..6bb489ea 100644 --- a/web/templates/admin/edit_backup_exclusions.html +++ b/web/templates/admin/edit_backup_exclusions.html @@ -12,9 +12,7 @@ } ?> - -
@@ -100,4 +98,4 @@
- \ No newline at end of file + diff --git a/web/templates/admin/edit_cron.html b/web/templates/admin/edit_cron.html index 9eb7f106..91baee27 100644 --- a/web/templates/admin/edit_cron.html +++ b/web/templates/admin/edit_cron.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,7 +30,7 @@
-
    +
    • @@ -232,7 +230,7 @@
- +
diff --git a/web/templates/admin/edit_db.html b/web/templates/admin/edit_db.html index 296f8bef..1b27ab38 100644 --- a/web/templates/admin/edit_db.html +++ b/web/templates/admin/edit_db.html @@ -12,9 +12,7 @@ } ?>
-
-
@@ -32,26 +30,6 @@ - @@ -146,8 +124,26 @@
- - + diff --git a/web/templates/admin/edit_dns.html b/web/templates/admin/edit_dns.html index 780270c1..df8ef25e 100644 --- a/web/templates/admin/edit_dns.html +++ b/web/templates/admin/edit_dns.html @@ -12,9 +12,7 @@ } ?> - -
@@ -84,7 +82,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -133,4 +131,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/edit_dns_rec.html b/web/templates/admin/edit_dns_rec.html index 446fda6b..698cb657 100644 --- a/web/templates/admin/edit_dns_rec.html +++ b/web/templates/admin/edit_dns_rec.html @@ -12,9 +12,7 @@ } ?> - -
@@ -125,4 +123,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html index 60a13e16..1b6bf359 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@
- @@ -60,7 +48,7 @@
@@ -73,7 +61,7 @@ @@ -130,4 +118,12 @@
- +
- +
- \ No newline at end of file + + + + diff --git a/web/templates/admin/edit_ip.html b/web/templates/admin/edit_ip.html index 4d013f00..811457b3 100644 --- a/web/templates/admin/edit_ip.html +++ b/web/templates/admin/edit_ip.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@
- @@ -60,7 +48,7 @@
@@ -70,7 +58,7 @@ @@ -80,7 +68,7 @@ @@ -153,4 +141,12 @@
- +
- +
- +
- \ No newline at end of file + + + + diff --git a/web/templates/admin/edit_mail.html b/web/templates/admin/edit_mail.html index 7bcfa18a..141725c7 100644 --- a/web/templates/admin/edit_mail.html +++ b/web/templates/admin/edit_mail.html @@ -12,9 +12,7 @@ } ?> - -
@@ -97,4 +95,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/edit_mail_acc.html b/web/templates/admin/edit_mail_acc.html index c4ae0926..52b66d7b 100644 --- a/web/templates/admin/edit_mail_acc.html +++ b/web/templates/admin/edit_mail_acc.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,26 +30,6 @@
- @@ -163,4 +141,23 @@
- + + + + diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index 4480fa82..8db16864 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -12,9 +12,7 @@ } ?> - -
@@ -72,11 +70,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -96,12 +94,12 @@ } echo ">".$value."\n"; } - ?> + ?> - - + + " .strtoupper($_SESSION['PROXY_SYSTEM']) . "";?> @@ -121,11 +119,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['DNS_SYSTEM']) . "";?> @@ -145,7 +143,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -381,34 +379,36 @@ - - \ No newline at end of file + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + + }); + + diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 20e49453..5272750c 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -12,9 +12,7 @@ } ?> - -
@@ -33,16 +31,7 @@
- + @@ -245,7 +234,7 @@
@@ -54,7 +43,7 @@ @@ -82,7 +71,7 @@ } echo ">".$value."\n"; } - ?> + ?>

@@ -106,7 +95,7 @@ } echo ">".$value."\n"; } - ?> + ?>

@@ -121,10 +110,10 @@ @@ -187,7 +176,7 @@
- +
- + @@ -133,10 +122,10 @@

- + @@ -145,10 +134,10 @@

- + @@ -159,7 +148,7 @@ @@ -169,7 +158,7 @@ - +
- +
- +
- +
- +
@@ -215,10 +204,10 @@ $i = 0; foreach ($dns_cluster as $key => $value) { $i++; - ?> + ?> @@ -227,7 +216,7 @@

- +
- +
- +
@@ -254,10 +243,10 @@

- + @@ -266,11 +255,11 @@

- - + + @@ -279,10 +268,10 @@

- + @@ -324,7 +313,7 @@ @@ -338,10 +327,10 @@ $i = 0; foreach ($v_mysql_hosts as $key => $value) { $i++; - ?> + ?> @@ -352,7 +341,7 @@ @@ -364,7 +353,7 @@ @@ -375,7 +364,7 @@ @@ -384,7 +373,7 @@



- + @@ -404,7 +393,7 @@ @@ -418,10 +407,10 @@ $i = 0; foreach ($v_pgsql_hosts as $key => $value) { $i++; - ?> + ?> @@ -432,7 +421,7 @@ @@ -443,7 +432,7 @@ @@ -452,7 +441,7 @@



- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -470,7 +459,7 @@ @@ -484,7 +473,7 @@ @@ -505,7 +494,7 @@ @@ -524,7 +513,7 @@ - + @@ -296,7 +261,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -430,7 +395,7 @@
- +
- +
- +
@@ -538,7 +527,7 @@ @@ -549,7 +538,7 @@ @@ -560,7 +549,7 @@ @@ -571,7 +560,7 @@ @@ -599,7 +588,7 @@
- +
- +
- +
- +
- +
@@ -638,7 +627,7 @@ @@ -651,7 +640,7 @@ @@ -690,7 +679,7 @@ '.__('Licence Key').':
'; } else { - echo + echo __('Restrict users so that they cannot use SSH and access only their home directory.').' '.__('This is a commercial module, you would need to purchace license key to enable it.'). '
'.__('Enter License Key').':
@@ -712,7 +701,7 @@
@@ -779,22 +768,28 @@ - \ No newline at end of file + }); + diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html index 8717ce3f..aa017d41 100644 --- a/web/templates/admin/edit_user.html +++ b/web/templates/admin/edit_user.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,18 +30,7 @@ - +
- +
- +
- +
- +
@@ -130,7 +117,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -171,7 +158,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -264,33 +251,46 @@
@@ -106,7 +93,7 @@ } echo ">".htmlentities($key)."\n"; } - ?> + ?>
- \ No newline at end of file + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + $('.add-ns').show(); + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + + }); + diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index 51822ec7..f8593186 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,40 +30,7 @@
- - + - - + + @@ -217,7 +182,7 @@
@@ -141,11 +106,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" . strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -166,12 +131,12 @@ } echo ">".$value."\n"; } - ?> + ?>
@@ -200,7 +165,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
/ @@ -247,7 +212,7 @@
- +
- +
# () @@ -485,16 +450,47 @@
- - + + + diff --git a/web/templates/admin/generate_ssl.html b/web/templates/admin/generate_ssl.html index a5c9a558..a9e490bb 100644 --- a/web/templates/admin/generate_ssl.html +++ b/web/templates/admin/generate_ssl.html @@ -12,9 +12,7 @@ } ?> - -
@@ -125,4 +123,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_backup.html b/web/templates/admin/list_backup.html index 365a816f..0dcac926 100644 --- a/web/templates/admin/list_backup.html +++ b/web/templates/admin/list_backup.html @@ -32,11 +32,7 @@ - - - - diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html index 2c721ba7..cabcec76 100644 --- a/web/templates/admin/list_backup_detail.html +++ b/web/templates/admin/list_backup_detail.html @@ -30,11 +30,7 @@ - - - - @@ -397,4 +393,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_backup_exclusions.html b/web/templates/admin/list_backup_exclusions.html index d9de3763..2593510f 100644 --- a/web/templates/admin/list_backup_exclusions.html +++ b/web/templates/admin/list_backup_exclusions.html @@ -29,11 +29,7 @@ - - - - diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index c05aa8ed..4ec2de21 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -51,11 +51,7 @@ - - - - @@ -79,8 +75,8 @@ } ?> -
diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index 4e5e5140..63fdcae1 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -72,11 +72,7 @@
-
- - -
@@ -109,8 +105,8 @@ ?> -
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html index 7f25b0d3..649e3073 100644 --- a/web/templates/admin/list_dns.html +++ b/web/templates/admin/list_dns.html @@ -42,11 +42,7 @@
-
- - -
@@ -69,8 +65,8 @@ } ?> -
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index e4b55877..00b7be54 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -32,11 +32,7 @@
-
- - -
diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index 73990d58..ab24069a 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -45,11 +45,7 @@ - - - - @@ -72,8 +68,8 @@ } ?> -
diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index ae6f835d..40193198 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -30,11 +30,7 @@
-
- - -
@@ -47,7 +43,7 @@ foreach ($data as $key => $value) { ++$i; list($ip,$chain) = explode(":",$key); - + ?>
diff --git a/web/templates/admin/list_ip.html b/web/templates/admin/list_ip.html index ada609a2..1875f7bb 100644 --- a/web/templates/admin/list_ip.html +++ b/web/templates/admin/list_ip.html @@ -42,11 +42,7 @@
- - - - diff --git a/web/templates/admin/list_log.html b/web/templates/admin/list_log.html index cc9011e2..34a676c6 100644 --- a/web/templates/admin/list_log.html +++ b/web/templates/admin/list_log.html @@ -14,9 +14,6 @@ - - - diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html index 27285db5..21a68ef5 100644 --- a/web/templates/admin/list_mail.html +++ b/web/templates/admin/list_mail.html @@ -50,11 +50,7 @@ - - - - @@ -86,8 +82,8 @@ ?> -
">
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index 9607d127..28e1f90b 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -49,11 +49,7 @@
-
- - -
@@ -83,7 +79,7 @@
" - v_unit_id="" v_section="mail_acc" sort-date="" sort-name="" sort-disk="" + v_unit_id="" v_section="mail_acc" sort-date="" sort-name="" sort-disk="" sort-star="">
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index d06f0608..1812bd84 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -37,11 +37,7 @@
-
- - -
@@ -56,8 +52,8 @@ ?> -
diff --git a/web/templates/admin/list_rrd.html b/web/templates/admin/list_rrd.html index 756193fb..9245ada4 100644 --- a/web/templates/admin/list_rrd.html +++ b/web/templates/admin/list_rrd.html @@ -41,11 +41,7 @@
-
- - -
@@ -115,4 +111,4 @@
- \ No newline at end of file + diff --git a/web/templates/admin/list_search.html b/web/templates/admin/list_search.html index 3db736d3..6aa243e9 100644 --- a/web/templates/admin/list_search.html +++ b/web/templates/admin/list_search.html @@ -23,9 +23,6 @@ - - - @@ -75,29 +72,9 @@ if ($key == $user) { ?>
 L
- - -
-

-
- +
 L
- - - diff --git a/web/templates/admin/list_ssl.html b/web/templates/admin/list_ssl.html index aa2addf9..41541904 100644 --- a/web/templates/admin/list_ssl.html +++ b/web/templates/admin/list_ssl.html @@ -12,9 +12,7 @@ } ?> - -
@@ -84,4 +82,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_stats.html b/web/templates/admin/list_stats.html index 46bd11a3..bc3192d2 100644 --- a/web/templates/admin/list_stats.html +++ b/web/templates/admin/list_stats.html @@ -37,11 +37,7 @@ - - - - @@ -265,4 +261,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_updates.html b/web/templates/admin/list_updates.html index 86e3c96c..4529dc24 100644 --- a/web/templates/admin/list_updates.html +++ b/web/templates/admin/list_updates.html @@ -35,11 +35,7 @@ - - - - diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index ae0651af..d52d80986 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -54,11 +54,7 @@ - - - - @@ -81,8 +77,8 @@ } ?> -
@@ -96,38 +92,9 @@ sort-bandwidth="" sort-disk="
 L
- - -
-

-
- +
 L
 ↵
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 7f610b1a..94556eb5 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -38,16 +38,13 @@
-
+ - - -
@@ -120,9 +117,9 @@ } ?> -
@@ -210,7 +207,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
@@ -222,7 +219,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
@@ -251,7 +248,7 @@ sort-name="" sort-bandwidth="" sort-dis - +
:
@@ -259,7 +256,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
:
diff --git a/web/templates/footer.html b/web/templates/footer.html index b67ab41b..a98c6d1b 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,49 +1,103 @@ + +
+ + + + + +
+

+
+ +
+ +
+

- - - - - - - - +
+ - + - -
-
@@ -112,4 +110,4 @@ - \ No newline at end of file + diff --git a/web/templates/user/edit_user.html b/web/templates/user/edit_user.html index 66600bd9..9caa9503 100644 --- a/web/templates/user/edit_user.html +++ b/web/templates/user/edit_user.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,18 +30,7 @@
- + @@ -232,33 +219,46 @@
@@ -109,7 +96,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
- + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + $('.add-ns').show(); + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + + }); + diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html index 878e9140..a40fe88e 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,40 +30,7 @@
- - +
@@ -124,7 +89,7 @@
@@ -146,7 +111,7 @@
- + / @@ -176,7 +141,7 @@ - + @@ -225,7 +190,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -359,7 +324,7 @@ - - + + + diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index 757725ad..568d045c 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -49,11 +49,7 @@ - - - - @@ -78,7 +74,7 @@ ?> -
diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index 2a80f7ab..f4e13f29 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -71,11 +71,7 @@
-
- - -
@@ -108,8 +104,8 @@ ?> -
diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index ce5c12a5..22dcbc55 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -41,11 +41,7 @@
-
- - -
@@ -68,8 +64,8 @@ } ?> -
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index 2cf428a4..71b15abd 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -30,11 +30,7 @@
-
- - -
diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 09afc610..2d3dd836 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -48,11 +48,7 @@ - - - - @@ -84,8 +80,8 @@ ?> -
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 70bc38dc..a7ff6e7a 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -47,11 +47,7 @@
-
- - -
@@ -81,8 +77,8 @@ ?> -
" v_unit_id="" v_section="mail_acc" -sort-date="" sort-name="" sort-disk="" +
" v_unit_id="" v_section="mail_acc" +sort-date="" sort-name="" sort-disk="" sort-star="">
diff --git a/web/templates/user/list_search.html b/web/templates/user/list_search.html index a8909b29..889cd094 100644 --- a/web/templates/user/list_search.html +++ b/web/templates/user/list_search.html @@ -23,9 +23,6 @@
- - -
@@ -74,29 +71,9 @@ if ($key == $user) { ?>
 L
- - -
-

-
- +
 L
- \ No newline at end of file + diff --git a/web/templates/user/list_stats.html b/web/templates/user/list_stats.html index dc9419b4..aa70d794 100644 --- a/web/templates/user/list_stats.html +++ b/web/templates/user/list_stats.html @@ -37,11 +37,7 @@ - - - - @@ -268,4 +264,4 @@ - \ No newline at end of file + diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index e71d286a..3087bc65 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -52,11 +52,7 @@ - - - - @@ -79,8 +75,8 @@ } ?> -
@@ -94,38 +90,9 @@ sort-disk="" sort-star="
 L
- - -
-

-
- +
 L
 ↵
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index 9f08d0ab..fefe74d1 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -36,18 +36,13 @@
-
- + - - - -
@@ -122,8 +117,8 @@ -