From fc42984e4ab37167e2c961ccf6ed587a48b76e1f Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 28 Jan 2018 23:54:27 -0700 Subject: [PATCH] Upgrade to Bootstrap 4.0, FontAwesome 5.0, jQuery 3.3.1 --- app.php | 247 +- index.php | 131 +- lib/getusertable.php | 2 +- pages.php | 14 +- pages/404.php | 10 +- pages/authlog.php | 59 +- pages/clearlog.php | 27 +- pages/deluser.php | 35 +- pages/edituser.php | 49 +- pages/groups.php | 211 +- pages/home.php | 51 +- pages/managers.php | 117 +- pages/permissions.php | 118 +- pages/users.php | 28 +- static/css/app.css | 121 +- static/css/bootstrap.min.css | 16 +- static/css/datatables.min.css | 10 +- static/css/fa-svg-with-js.css | 343 +++ static/css/font-awesome.min.css | 4 - static/css/index.css | 11 + static/css/material-color | 2 +- static/css/tables.css | 32 +- static/fonts/FontAwesome.otf | Bin 134808 -> 0 bytes static/fonts/fontawesome-webfont.eot | Bin 165742 -> 0 bytes static/fonts/fontawesome-webfont.svg | 2671 ----------------- static/fonts/fontawesome-webfont.ttf | Bin 165548 -> 0 bytes static/fonts/fontawesome-webfont.woff | Bin 98024 -> 0 bytes static/fonts/fontawesome-webfont.woff2 | Bin 77160 -> 0 bytes static/fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes static/fonts/glyphicons-halflings-regular.svg | 288 -- static/fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes static/img/minus-square.svg | 1 + static/img/search-plus.svg | 1 + static/js/authlog.js | 2 +- static/js/bootstrap.min.js | 12 +- static/js/datatables.min.js | 431 +-- static/js/fontawesome-all.min.js | 5 + static/js/groups.js | 5 +- static/js/jquery-3.2.1.min.js | 4 - static/js/jquery-3.3.1.min.js | 2 + static/js/managers.js | 8 +- static/js/permissions.js | 10 +- static/js/users.js | 4 +- 45 files changed, 1188 insertions(+), 3894 deletions(-) create mode 100644 static/css/fa-svg-with-js.css delete mode 100644 static/css/font-awesome.min.css create mode 100644 static/css/index.css delete mode 100644 static/fonts/FontAwesome.otf delete mode 100644 static/fonts/fontawesome-webfont.eot delete mode 100644 static/fonts/fontawesome-webfont.svg delete mode 100644 static/fonts/fontawesome-webfont.ttf delete mode 100644 static/fonts/fontawesome-webfont.woff delete mode 100644 static/fonts/fontawesome-webfont.woff2 delete mode 100644 static/fonts/glyphicons-halflings-regular.eot delete mode 100644 static/fonts/glyphicons-halflings-regular.svg delete mode 100644 static/fonts/glyphicons-halflings-regular.ttf delete mode 100644 static/fonts/glyphicons-halflings-regular.woff delete mode 100644 static/fonts/glyphicons-halflings-regular.woff2 create mode 100644 static/img/minus-square.svg create mode 100644 static/img/search-plus.svg create mode 100644 static/js/fontawesome-all.min.js delete mode 100644 static/js/jquery-3.2.1.min.js create mode 100644 static/js/jquery-3.3.1.min.js diff --git a/app.php b/app.php index d73b6ea..95b6886 100644 --- a/app.php +++ b/app.php @@ -1,11 +1,10 @@ - + + + -
-
-
- - - + + strip_tags($_GET['arg'])], false); + } + $alerttype = MESSAGES[$_GET['msg']]['type']; + $alerticon = "square-o"; + switch (MESSAGES[$_GET['msg']]['type']) { + case "danger": + $alerticon = "times"; + break; + case "warning": + $alerticon = "exclamation-triangle"; + break; + case "info": + $alerticon = "info-circle"; + break; + case "success": + $alerticon = "check"; + break; + } + echo << +
+
+ + $alertmsg +
- + +
- + \n"; diff --git a/index.php b/index.php index 852cc53..0072492 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,10 @@ - - + -
-
-
-
+
+
+ +
+
+
+
+
+
+
- - -
-
-
-

-
-
- - -
- -
- + +
+ - " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
- " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
- -
-
- - - -
- -
- " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
- - - - - -
-
+ if ($multiauth != true) { + ?> + " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
+ " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
+ +
+
+ + + +
+ +
+ " required="required" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus />
+ + + + +
-
- - - + +
+ + + \ No newline at end of file diff --git a/lib/getusertable.php b/lib/getusertable.php index ecff26c..2db906b 100644 --- a/lib/getusertable.php +++ b/lib/getusertable.php @@ -123,7 +123,7 @@ if ($filter) { $out['recordsFiltered'] = $recordsFiltered; for ($i = 0; $i < count($users); $i++) { $users[$i]["2fa"] = (is_empty($users[$i]["2fa"]) ? false : true); - $users[$i]["editbtn"] = ' ' . lang("edit", false) . ''; + $users[$i]["editbtn"] = ' ' . lang("edit", false) . ''; } $out['users'] = $users; diff --git a/pages.php b/pages.php index 7e2c125..9540e13 100644 --- a/pages.php +++ b/pages.php @@ -10,12 +10,12 @@ define("PAGES", [ "home" => [ "title" => "home", "navbar" => true, - "icon" => "home" + "icon" => "fas fa-home" ], "users" => [ "title" => "users", "navbar" => true, - "icon" => "users", + "icon" => "fas fa-users", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" @@ -39,7 +39,7 @@ define("PAGES", [ "groups" => [ "title" => "groups", "navbar" => true, - "icon" => "object-group", + "icon" => "fas fa-object-group", "styles" => [ "static/css/easy-autocomplete.min.css" ], @@ -51,7 +51,7 @@ define("PAGES", [ "authlog" => [ "title" => "security log", "navbar" => true, - "icon" => "list", + "icon" => "fas fa-list", "styles" => [ "static/css/datatables.min.css", "static/css/tables.css" @@ -68,7 +68,7 @@ define("PAGES", [ "managers" => [ "title" => "managers", "navbar" => true, - "icon" => "id-card-o", + "icon" => "fas fa-id-card", "styles" => [ "static/css/easy-autocomplete.min.css" ], @@ -80,7 +80,7 @@ define("PAGES", [ "permissions" => [ "title" => "permissions", "navbar" => true, - "icon" => "key", + "icon" => "fas fa-key", "styles" => [ "static/css/easy-autocomplete.min.css" ], @@ -92,7 +92,7 @@ define("PAGES", [ "export" => [ "title" => "report export", "navbar" => true, - "icon" => "download", + "icon" => "fas fa-download", "scripts" => [ "static/js/export.js" ] diff --git a/pages/404.php b/pages/404.php index 751ccba..4273bcb 100644 --- a/pages/404.php +++ b/pages/404.php @@ -1,11 +1,5 @@ - -
-
+
+

\ No newline at end of file diff --git a/pages/authlog.php b/pages/authlog.php index fbae314..ad178b6 100644 --- a/pages/authlog.php +++ b/pages/authlog.php @@ -1,5 +1,4 @@
- +
- - - - - + + + + + @@ -28,35 +27,31 @@ redirectifnotloggedin(); - - - - - + + + + +

-
-
-
-
-

- -

-
-
-
- select('logtypes', 'typename'); - foreach ($types as $type) { - ?> -
- -
- +
+
+

+ +

+
+ select('logtypes', 'typename'); + foreach ($types as $type) { ?> -
+
+ +
+
diff --git a/pages/clearlog.php b/pages/clearlog.php index 3a8ac8a..9e98d2b 100644 --- a/pages/clearlog.php +++ b/pages/clearlog.php @@ -1,5 +1,4 @@ -
-
-
-
-

- -

-
-
-
-

-

-
+
+
+
+

+ +

+
+

+

-
diff --git a/pages/deluser.php b/pages/deluser.php index 2da3e68..1cfa502 100644 --- a/pages/deluser.php +++ b/pages/deluser.php @@ -1,5 +1,4 @@ -
-
-
-
-

- -

-
-
-
-

-

-
+
+
+
+

+ +

+
+

+

- +
- +
- +
-
diff --git a/pages/edituser.php b/pages/edituser.php index f7e0701..5f2c433 100644 --- a/pages/edituser.php +++ b/pages/edituser.php @@ -1,5 +1,4 @@
-
-
-

+
+

+ + "" . htmlspecialchars($userdata['realname']) . ""]); ?> - "" . htmlspecialchars($userdata['realname']) . ""]); ?> - - - -

-
-
+ + +

+
@@ -86,20 +83,20 @@ if ($userdata['typecode'] != "LOCAL") { } ?>
- + " required="required" value="" />
- + class="form-control" name="username" id="username" placeholder="" required="required" value="" />
- + " value="" />
@@ -108,14 +105,14 @@ if ($userdata['typecode'] != "LOCAL") {
- + autocomplete="new-password" class="form-control" name="pass" id="pass" placeholder="" />
- + -