From 1fa3c4b3fbb7332fa419c3a1d3f19dceb5940cf8 Mon Sep 17 00:00:00 2001 From: Flat Date: Mon, 4 Jul 2016 21:26:41 +0900 Subject: [PATCH] Move content of .js.html files to .html --- web/inc/main.php | 14 +++--- web/templates/admin/add_db.html | 23 +++++++++ web/templates/admin/add_db.js.html | 21 -------- web/templates/admin/add_dns.html | 37 ++++++++++++++ web/templates/admin/add_dns.js.html | 35 -------------- web/templates/admin/add_dns_rec.html | 6 +++ web/templates/admin/add_dns_rec.js.html | 4 -- web/templates/admin/add_firewall.html | 8 ++++ web/templates/admin/add_firewall.js.html | 6 --- web/templates/admin/add_firewall_banlist.html | 8 ++++ .../admin/add_firewall_banlist.js.html | 6 --- web/templates/admin/add_ip.html | 8 ++++ web/templates/admin/add_ip.js.html | 6 --- web/templates/admin/add_mail_acc.html | 48 +++++++++++++++++++ web/templates/admin/add_mail_acc.js.html | 46 ------------------ web/templates/admin/add_package.html | 32 +++++++++++++ web/templates/admin/add_package.js.html | 30 ------------ web/templates/admin/add_user.html | 20 ++++++++ web/templates/admin/add_user.js.html | 18 ------- web/templates/admin/add_web.html | 47 ++++++++++++++++++ web/templates/admin/add_web.js.html | 45 ----------------- web/templates/admin/edit_db.html | 23 +++++++++ web/templates/admin/edit_db.js.html | 21 -------- web/templates/admin/edit_firewall.html | 8 ++++ web/templates/admin/edit_firewall.js.html | 6 --- web/templates/admin/edit_ip.html | 8 ++++ web/templates/admin/edit_ip.js.html | 6 --- web/templates/admin/edit_mail_acc.html | 20 ++++++++ web/templates/admin/edit_mail_acc.js.html | 18 ------- web/templates/admin/edit_package.html | 33 +++++++++++++ web/templates/admin/edit_package.js.html | 31 ------------ web/templates/admin/edit_server.html | 26 ++++++++++ web/templates/admin/edit_server.js.html | 24 ---------- web/templates/admin/edit_user.html | 43 +++++++++++++++++ web/templates/admin/edit_user.js.html | 41 ---------------- web/templates/admin/edit_web.html | 44 +++++++++++++++++ web/templates/admin/edit_web.js.html | 42 ---------------- web/templates/footer.html | 17 +++---- web/templates/scripts.html | 8 ++++ web/templates/user/edit_user.html | 43 +++++++++++++++++ web/templates/user/edit_user.js.html | 41 ---------------- web/templates/user/edit_web.html | 44 +++++++++++++++++ web/templates/user/edit_web.js.html | 42 ---------------- 43 files changed, 550 insertions(+), 507 deletions(-) delete mode 100644 web/templates/admin/add_db.js.html delete mode 100644 web/templates/admin/add_dns.js.html delete mode 100644 web/templates/admin/add_dns_rec.js.html delete mode 100644 web/templates/admin/add_firewall.js.html delete mode 100644 web/templates/admin/add_firewall_banlist.js.html delete mode 100644 web/templates/admin/add_ip.js.html delete mode 100644 web/templates/admin/add_mail_acc.js.html delete mode 100644 web/templates/admin/add_package.js.html delete mode 100644 web/templates/admin/add_user.js.html delete mode 100644 web/templates/admin/add_web.js.html delete mode 100644 web/templates/admin/edit_db.js.html delete mode 100644 web/templates/admin/edit_firewall.js.html delete mode 100644 web/templates/admin/edit_ip.js.html delete mode 100644 web/templates/admin/edit_mail_acc.js.html delete mode 100644 web/templates/admin/edit_package.js.html delete mode 100644 web/templates/admin/edit_server.js.html delete mode 100644 web/templates/admin/edit_user.js.html delete mode 100644 web/templates/admin/edit_web.js.html create mode 100644 web/templates/scripts.html delete mode 100644 web/templates/user/edit_user.js.html delete mode 100644 web/templates/user/edit_web.js.html diff --git a/web/inc/main.php b/web/inc/main.php index 039cd141..03446849 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 426ba7d6..a1e6cc2d 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 2ea6d578..00000000 --- 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 3598113d..10285e23 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 51633f5b..00000000 --- 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 00824c6d..ddee3a00 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 a068a53b..00000000 --- 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 36c1d78d..710ae297 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 5f644f8b..00000000 --- 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 bbcecdcd..ed06693e 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 5f644f8b..00000000 --- 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 26887c3b..4c3b0be0 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 5f644f8b..00000000 --- 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 49abd990..08aaf74d 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 8f55a890..00000000 --- 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 94de1957..72b9bfd1 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 9c580fb1..00000000 --- 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 e469a4dc..aafdf253 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 3a79e6f8..00000000 --- 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 15b108fd..5b9ecf47 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 891100e1..00000000 --- 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 6e71678b..1b27ab38 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 c8938bea..00000000 --- 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 6f144ebb..1b6bf359 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 434b66e6..00000000 --- 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 c9ea2c72..811457b3 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 434b66e6..00000000 --- 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 24c76e6d..52b66d7b 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 ee6fc04e..00000000 --- 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 34359544..8db16864 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 790fe975..00000000 --- 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 04a96ead..5272750c 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 d9512ced..00000000 --- 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 567db42f..aa017d41 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 ef48eec9..00000000 --- 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 09c9edb3..f8593186 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 59eaf330..00000000 --- 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 bab46cf0..a98c6d1b 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 2b1b2417..9caa9503 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 ef48eec9..00000000 --- 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 013c2474..a40fe88e 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 e3776fc2..00000000 --- a/web/templates/user/edit_web.js.html +++ /dev/null @@ -1,42 +0,0 @@ - -