<?php
/**
 * Redirect To Login page
 *
 * PHP version 7.3
 *
 * @package        SMS
 * @version        Release 1.0.0
 * @create_by      Mohammad aljaouni
 * @create_date    10-08-2020
 * @edited_by      Mohammad aljaouni
 * @last_edit_date 10-08-2020
 * @todo           Nothing
 */
ob_start();
session_start();
include("../config/config.php");
include("../conn.php");
$queryInsertMove = "INSERT INTO `move_archive` (userId,`type`,`date`) VALUES ";
$queryInsertMove .= "('".$_SESSION["userId"]."','4','".time()."')";
$resultInsertMove = mysqli_query($conn, $queryInsertMove);

$language = $_SESSION["Language"];
$langSymbol = $_SESSION["langSymbol"];
unset($_SESSION["userPassword"]);
unset($_SESSION["adminName"]);
unset($_SESSION["userId"]);
unset($_SESSION["power"]);
unset($_SESSION["userAccount"]);
unset($_SESSION);
session_destroy();
unset($_SESSION);
session_start();
$_SESSION["language"] = $language;
header("location: login.php");
exit;
ob_end_flush();
?>
