function check_session()
{
+ if (!empty($_SESSION['sys']['login']) && !empty($_GET['logout'])) {
+ session_destroy();
+ header('Location: ./?login=true');
+ exit();
+ }
+
if (!empty($_POST['login']) && !empty($_POST['passwd'])) {
require_once('lib/login.php');
if (check_passwd()) {