<?php
// mcrypt_logout.php
// RJM Programming
// December, 2018
// Messaging Web Application via PHP Mcrypt
// Thanks to http://php.net/manual/en/function.mdecrypt-generic.php

  session_start();
  if ($_SESSION['username']) {
      if ($_SESSION['usernumber']) {
       $unum='' . $_SESSION['usernumber'];
       if (file_exists("./mcrypt_actives.php")) {
            file_put_contents("./mcrypt_actives.php", str_replace("ac" . $unum . "tive", "inact" . $unum . "ive", file_get_contents("./mcrypt_actives.php")));
       } 
      }
      session_destroy();
      header("Location: ./mcrypt_login.php");
      exit;
  }
    
?>

