* Waste logo on every page

* username displayed right on every page
This commit is contained in:
lukas-heiligenbrunner 2020-01-12 11:23:47 +01:00
parent 7c8a0d3018
commit 86dc38a8da
8 changed files with 93 additions and 81 deletions

View File

@ -23,7 +23,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" <img src="/favicon.png"
alt="AdminLTE Logo" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -271,5 +271,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
</body> </body>
</html> </html>

View File

@ -47,7 +47,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -440,12 +440,16 @@
<script type="text/javascript" <script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script> src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="js/dashboard.js"></script>
<!-- DataTables --> <!-- DataTables -->
<script src="lib/AdminLTE/plugins/datatables/jquery.dataTables.js"></script> <script src="lib/AdminLTE/plugins/datatables/jquery.dataTables.js"></script>
<script src="lib/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script> <script src="lib/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<!-- OWN -->
<script type="text/javascript" src="js/dashboard.js"></script>
<script src="js/userManager.js"></script>
</body> </body>
</html> </html>

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -288,6 +288,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
<script src="js/device.js"></script> <script src="js/device.js"></script>
</body> </body>
</html> </html>

View File

@ -1,74 +1,77 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" dir="ltr"> <html lang="en" dir="ltr">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Login Page</title> <title>Login Page</title>
<!--Made with love by Mutiullah Samim --> <!--Made with love by Mutiullah Samim -->
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="lib/bootstrap.min.css"> <link rel="stylesheet" href="lib/bootstrap.min.css">
<!-- jQuery library --> <!-- jQuery library -->
<script src="lib/jquery.min.js"></script> <script src="lib/jquery.min.js"></script>
<!-- Popper JS --> <!-- Popper JS -->
<script src="lib/popper.min.js"></script> <script src="lib/popper.min.js"></script>
<!-- Latest compiled JavaScript --> <!-- Latest compiled JavaScript -->
<script src="lib/bootstrap.min.js"></script> <script src="lib/bootstrap.min.js"></script>
<!--Fontawesome CDN--> <!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!--Custom styles--> <!--Custom styles-->
<link rel="stylesheet" type="text/css" href="css/index.css"> <link rel="stylesheet" type="text/css" href="css/index.css">
<script type="text/javascript" src="js/index.js"></script> <script type="text/javascript" src="js/index.js"></script>
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" href="/favicon.png">
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div class="d-flex justify-content-center h-100"> <div class="d-flex justify-content-center h-100">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h3>Sign In</h3> <h3>Sign In</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
<form> <form>
<div class="input-group form-group"> <div class="input-group form-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-user"></i></span> <span class="input-group-text"><i class="fas fa-user"></i></span>
</div> </div>
<input type="text" class="form-control" placeholder="username" id="userfield"> <input type="text" class="form-control" placeholder="username" id="userfield">
</div> </div>
<div class="input-group form-group"> <div class="input-group form-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-key"></i></span> <span class="input-group-text"><i class="fas fa-key"></i></span>
</div> </div>
<input type="password" class="form-control" placeholder="password" id="passfield"> <input type="password" class="form-control" placeholder="password" id="passfield">
</div> </div>
<div class="row align-items-center remember"> <div class="row align-items-center remember">
<input type="checkbox">Remember Me <input type="checkbox">Remember Me
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="submit" value="Login" class="btn float-right login_btn" id="loginbtn"> <input type="submit" value="Login" class="btn float-right login_btn" id="loginbtn">
</div> </div>
</form> </form>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<div class="d-flex justify-content-center links"> <div class="d-flex justify-content-center links">
Don't have an account?<a href="register.html">Sign Up</a> Don't have an account?<a href="register.html">Sign Up</a>
</div> </div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<a href="#">Forgot your password?</a> <a href="#">Forgot your password?</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,17 +1,4 @@
$(document).ready(function () { $(document).ready(function () {
console.log("page loaded");
$.post('/senddata/checkloginstate', 'action=getloginstate', function (data) {
console.log(data);
if (data.loggedin == true) {
$("#userlabel").html(" " + data.username);
if (data.permission > 0) {
$("#adminpanel").show();
}
} else {
$("#userlabel").html(" not logged in!!");
}
}, 'json');
//load total collections //load total collections
$.post('/senddata/wastedata', 'action=getStartHeaderData', function (data) { $.post('/senddata/wastedata', 'action=getStartHeaderData', function (data) {
console.log(data); console.log(data);
@ -27,7 +14,7 @@ $(document).ready(function () {
//load version footer //load version footer
// //
$.post('/senddata/wastedata', 'action=getversionandbuildtime', function (data) { $.post('/senddata/wastedata', 'action=getversionandbuildtime', function (data) {
$("#version-footer-label").html("<b>Version</b> "+data.version+" <b>Build</b> "+data.buildtime); $("#version-footer-label").html("<b>Version</b> " + data.version + " <b>Build</b> " + data.buildtime);
}, 'json'); }, 'json');
@ -112,7 +99,7 @@ $(document).ready(function () {
if (data.query == "ok") { if (data.query == "ok") {
$('#picupdates-tablebody').html(""); $('#picupdates-tablebody').html("");
$(".delbtndate").off(); $(".delbtndate").off();
for (var i = 0; i < data.data.length; i++) { for (var i = 0; i < data.data.length; i++) {
$('#picupdates-tablebody').append("<tr>" + $('#picupdates-tablebody').append("<tr>" +
@ -156,11 +143,11 @@ $(document).ready(function () {
}); });
} }
datetable = $("#table-pickupdates").DataTable({ datetable = $("#table-pickupdates").DataTable({
"order": [[ 3, "asc" ]] "order": [[3, "asc"]]
} ); });
//todo picupdates-tablebody //todo picupdates-tablebody
},"json"); }, "json");
} }
reloadtable(); reloadtable();
@ -274,7 +261,7 @@ $(document).ready(function () {
dropdata.html(""); dropdata.html("");
console.log("clickeeeed"); console.log("clickeeeed");
$.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html()+'&zonename='+$("#dropdown-zone").html(), function (data) { $.post('/senddata/newdate', 'action=gettypes&cityname=' + $("#dropdown-city").html() + '&zonename=' + $("#dropdown-zone").html(), function (data) {
console.log(data); console.log(data);
if (data.query == "ok") { if (data.query == "ok") {
for (var i = 0; i < data.data.length; i++) { for (var i = 0; i < data.data.length; i++) {
@ -291,7 +278,6 @@ $(document).ready(function () {
}); });
}); });

View File

@ -0,0 +1,14 @@
$(document).ready(function () {
console.log("page loaded");
$.post('/senddata/checkloginstate', 'action=getloginstate', function (data) {
console.log(data);
if (data.loggedin == true) {
$("#userlabel").html(" " + data.username);
if (data.permission > 0) {
$("#adminpanel").show();
}
} else {
$("#userlabel").html(" not logged in!!");
}
}, 'json');
});

View File

@ -45,7 +45,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4"> <aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo --> <!-- Brand Logo -->
<a href="dashboard.html" class="brand-link"> <a href="dashboard.html" class="brand-link">
<img src="lib/AdminLTE/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" <img src="/favicon.png" alt="AdminLTE Logo"
class="brand-image img-circle elevation-3" class="brand-image img-circle elevation-3"
style="opacity: .8"> style="opacity: .8">
<span class="brand-text font-weight-light">Waste Control</span> <span class="brand-text font-weight-light">Waste Control</span>
@ -289,5 +289,7 @@
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script> <script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
<script src="js/userManager.js"></script>
</body> </body>
</html> </html>