LobbySIO/logout.php

42 lines
2.0 KiB
PHP
Raw Normal View History

2018-10-15 15:14:36 -04:00
<?php
/*
* Copyright (C) 2018 josh.north
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION
ini_set('session.gc_probability', 1); // GC RATES
ini_set('session.gc_divisor', 100); // TIMES
session_save_path('.tmp'); // TEMP
session_start(); // START
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
$StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // CLASSES
if(!isset($_COOKIE['app_disp_lang'])) { $app_disp_lang = $StaticFunctions->getDefaultLanguage(); } else { $app_disp_lang = $_COOKIE['app_disp_lang']; };
$Translate = new \App\LobbySIO\Language\Translate($app_disp_lang);
$transLang = $Translate->userLanguage(); // SETUP TRANSLATOR
$app_current_pagename = $transLang['LOGOUT']; // PAGE FUNCTION
$app_current_pageicon = '<i class="fas fa-sign-out"></i> '; // PAGE ICON
require_once("inc/header.inc.php"); // SHOW HEADER
if ($StaticFunctions->getSessionStatus() == false) { // CHECK STATUS
echo $StaticFunctions->killSession(); // ELSE DIE
} else { ?>
<!-- CONTENT START -->
<?php echo $StaticFunctions->killSession(); ?>
<!-- CONTENT END -->
<?php }; require_once("inc/footer.inc.php");