diff --git a/web/inc/main.php b/web/inc/main.php
index 039cd1419..034468499 100644
--- a/web/inc/main.php
+++ b/web/inc/main.php
@@ -95,6 +95,10 @@ 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/';
@@ -115,18 +119,14 @@ function render_page($user, $TAB, $page) {
// Body
if (($_SESSION['user'] !== 'admin') && (@include($__template_dir . "user/$page.html"))) {
- // User page exists
- // Use user page
- $__template_base = $__template_dir . "user/$page";
+ // User page loaded
} else {
// Not admin or user page doesn't exist
- // Use admin page
- $__template_base = $__template_dir . "admin/$page";
- include($__template_base . '.html');
+ // Load admin page
+ @include($__template_dir . "admin/$page.html");
}
// Footer
- $JS_FILE = $__template_base . '.js.html';
include($__template_dir . 'footer.html');
}
diff --git a/web/templates/admin/add_db.html b/web/templates/admin/add_db.html
index 426ba7d6d..a1e6cc2d6 100644
--- a/web/templates/admin/add_db.html
+++ b/web/templates/admin/add_db.html
@@ -186,3 +186,26 @@
+
+
+
+
diff --git a/web/templates/admin/add_db.js.html b/web/templates/admin/add_db.js.html
deleted file mode 100644
index 2ea6d5783..000000000
--- a/web/templates/admin/add_db.js.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
diff --git a/web/templates/admin/add_dns.html b/web/templates/admin/add_dns.html
index 3598113d4..10285e233 100644
--- a/web/templates/admin/add_dns.html
+++ b/web/templates/admin/add_dns.html
@@ -178,3 +178,40 @@
+
+
+
diff --git a/web/templates/admin/add_dns.js.html b/web/templates/admin/add_dns.js.html
deleted file mode 100644
index 51633f5b1..000000000
--- a/web/templates/admin/add_dns.js.html
+++ /dev/null
@@ -1,35 +0,0 @@
-
diff --git a/web/templates/admin/add_dns_rec.html b/web/templates/admin/add_dns_rec.html
index 00824c6d4..ddee3a004 100644
--- a/web/templates/admin/add_dns_rec.html
+++ b/web/templates/admin/add_dns_rec.html
@@ -119,3 +119,9 @@
+
+
+
+
diff --git a/web/templates/admin/add_dns_rec.js.html b/web/templates/admin/add_dns_rec.js.html
deleted file mode 100644
index a068a53b5..000000000
--- a/web/templates/admin/add_dns_rec.js.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html
index 36c1d78d2..710ae297a 100644
--- a/web/templates/admin/add_firewall.html
+++ b/web/templates/admin/add_firewall.html
@@ -117,3 +117,11 @@
+
+
+
diff --git a/web/templates/admin/add_firewall.js.html b/web/templates/admin/add_firewall.js.html
deleted file mode 100644
index 5f644f8b8..000000000
--- a/web/templates/admin/add_firewall.js.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html
index bbcecdcd4..ed06693ef 100644
--- a/web/templates/admin/add_firewall_banlist.html
+++ b/web/templates/admin/add_firewall_banlist.html
@@ -84,3 +84,11 @@
+
+
+
diff --git a/web/templates/admin/add_firewall_banlist.js.html b/web/templates/admin/add_firewall_banlist.js.html
deleted file mode 100644
index 5f644f8b8..000000000
--- a/web/templates/admin/add_firewall_banlist.js.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html
index 26887c3bc..4c3b0be02 100644
--- a/web/templates/admin/add_ip.html
+++ b/web/templates/admin/add_ip.html
@@ -145,3 +145,11 @@
+
+
+
diff --git a/web/templates/admin/add_ip.js.html b/web/templates/admin/add_ip.js.html
deleted file mode 100644
index 5f644f8b8..000000000
--- a/web/templates/admin/add_ip.js.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/web/templates/admin/add_mail_acc.html b/web/templates/admin/add_mail_acc.html
index 49abd9904..08aaf74d6 100644
--- a/web/templates/admin/add_mail_acc.html
+++ b/web/templates/admin/add_mail_acc.html
@@ -180,3 +180,51 @@
+
+
+
+
diff --git a/web/templates/admin/add_mail_acc.js.html b/web/templates/admin/add_mail_acc.js.html
deleted file mode 100644
index 8f55a8900..000000000
--- a/web/templates/admin/add_mail_acc.js.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html
index 94de1957c..72b9bfd1a 100644
--- a/web/templates/admin/add_package.html
+++ b/web/templates/admin/add_package.html
@@ -378,3 +378,35 @@
+
+
+
+
diff --git a/web/templates/admin/add_package.js.html b/web/templates/admin/add_package.js.html
deleted file mode 100644
index 9c580fb16..000000000
--- a/web/templates/admin/add_package.js.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
diff --git a/web/templates/admin/add_user.html b/web/templates/admin/add_user.html
index e469a4dcb..aafdf2534 100644
--- a/web/templates/admin/add_user.html
+++ b/web/templates/admin/add_user.html
@@ -169,3 +169,23 @@
+
+
+
diff --git a/web/templates/admin/add_user.js.html b/web/templates/admin/add_user.js.html
deleted file mode 100644
index 3a79e6f88..000000000
--- a/web/templates/admin/add_user.js.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html
index 15b108fdf..5b9ecf478 100644
--- a/web/templates/admin/add_web.html
+++ b/web/templates/admin/add_web.html
@@ -388,3 +388,50 @@
+
+
+
+
diff --git a/web/templates/admin/add_web.js.html b/web/templates/admin/add_web.js.html
deleted file mode 100644
index 891100e1c..000000000
--- a/web/templates/admin/add_web.js.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
diff --git a/web/templates/admin/edit_db.html b/web/templates/admin/edit_db.html
index 6e71678b0..1b27ab386 100644
--- a/web/templates/admin/edit_db.html
+++ b/web/templates/admin/edit_db.html
@@ -124,3 +124,26 @@
+
+
+
+
diff --git a/web/templates/admin/edit_db.js.html b/web/templates/admin/edit_db.js.html
deleted file mode 100644
index c8938bea1..000000000
--- a/web/templates/admin/edit_db.js.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html
index 6f144ebbd..1b6bf359c 100644
--- a/web/templates/admin/edit_firewall.html
+++ b/web/templates/admin/edit_firewall.html
@@ -119,3 +119,11 @@
+
+
+
diff --git a/web/templates/admin/edit_firewall.js.html b/web/templates/admin/edit_firewall.js.html
deleted file mode 100644
index 434b66e68..000000000
--- a/web/templates/admin/edit_firewall.js.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/web/templates/admin/edit_ip.html b/web/templates/admin/edit_ip.html
index c9ea2c723..811457b30 100644
--- a/web/templates/admin/edit_ip.html
+++ b/web/templates/admin/edit_ip.html
@@ -142,3 +142,11 @@
+
+
+
diff --git a/web/templates/admin/edit_ip.js.html b/web/templates/admin/edit_ip.js.html
deleted file mode 100644
index 434b66e68..000000000
--- a/web/templates/admin/edit_ip.js.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/web/templates/admin/edit_mail_acc.html b/web/templates/admin/edit_mail_acc.html
index 24c76e6dd..52b66d7bf 100644
--- a/web/templates/admin/edit_mail_acc.html
+++ b/web/templates/admin/edit_mail_acc.html
@@ -141,3 +141,23 @@
+
+
+
+
diff --git a/web/templates/admin/edit_mail_acc.js.html b/web/templates/admin/edit_mail_acc.js.html
deleted file mode 100644
index ee6fc04ea..000000000
--- a/web/templates/admin/edit_mail_acc.js.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html
index 343595449..8db168646 100644
--- a/web/templates/admin/edit_package.html
+++ b/web/templates/admin/edit_package.html
@@ -379,3 +379,36 @@
+
+
+
+
diff --git a/web/templates/admin/edit_package.js.html b/web/templates/admin/edit_package.js.html
deleted file mode 100644
index 790fe975c..000000000
--- a/web/templates/admin/edit_package.js.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html
index 04a96eada..5272750c6 100644
--- a/web/templates/admin/edit_server.html
+++ b/web/templates/admin/edit_server.html
@@ -767,3 +767,29 @@
+
+
+
diff --git a/web/templates/admin/edit_server.js.html b/web/templates/admin/edit_server.js.html
deleted file mode 100644
index d9512cedc..000000000
--- a/web/templates/admin/edit_server.js.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html
index 567db42fb..aa017d41b 100644
--- a/web/templates/admin/edit_user.html
+++ b/web/templates/admin/edit_user.html
@@ -251,3 +251,46 @@
+
+
+
diff --git a/web/templates/admin/edit_user.js.html b/web/templates/admin/edit_user.js.html
deleted file mode 100644
index ef48eec9b..000000000
--- a/web/templates/admin/edit_user.js.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html
index 09c9edb3f..f85931866 100644
--- a/web/templates/admin/edit_web.html
+++ b/web/templates/admin/edit_web.html
@@ -450,3 +450,47 @@
+
+
+
+
diff --git a/web/templates/admin/edit_web.js.html b/web/templates/admin/edit_web.js.html
deleted file mode 100644
index 59eaf3303..000000000
--- a/web/templates/admin/edit_web.js.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
diff --git a/web/templates/footer.html b/web/templates/footer.html
index bab46cf05..a98c6d1b6 100644
--- a/web/templates/footer.html
+++ b/web/templates/footer.html
@@ -1,22 +1,17 @@
+
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
diff --git a/web/templates/user/edit_user.html b/web/templates/user/edit_user.html
index 2b1b24173..9caa95039 100644
--- a/web/templates/user/edit_user.html
+++ b/web/templates/user/edit_user.html
@@ -219,3 +219,46 @@
+
+
+
diff --git a/web/templates/user/edit_user.js.html b/web/templates/user/edit_user.js.html
deleted file mode 100644
index ef48eec9b..000000000
--- a/web/templates/user/edit_user.js.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html
index 013c24741..a40fe88e8 100644
--- a/web/templates/user/edit_web.html
+++ b/web/templates/user/edit_web.html
@@ -379,3 +379,47 @@
+
+
+
+
diff --git a/web/templates/user/edit_web.js.html b/web/templates/user/edit_web.js.html
deleted file mode 100644
index e3776fc20..000000000
--- a/web/templates/user/edit_web.js.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-