Add "Logout" button.

This commit is contained in:
Tom Mortensen
2017-12-03 12:25:43 -08:00
parent 2350abadfd
commit 4841691f3e
2 changed files with 31 additions and 0 deletions

1
logout.htm Normal file
View File

@@ -0,0 +1 @@
Logged out

View File

@@ -0,0 +1,30 @@
Cond="file_exists('/etc/nginx/htpasswd')"
Menu="Buttons:1"
Title="Logout"
Icon="sign-out"
---
<?PHP
/* Copyright 2005-2017, Lime Technology
* Copyright 2012-2017, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<script>
function LogoutButton() {
$.ajax({
type: "GET",
url: "/logout.htm",
username: "logout",
password: "",
success: function (data){
$('body').html(data);
}
});
}
</script>