<?php include_once 'CheckLogOut.php'; require_once 'CacheSessao.php'; require_once 'CacheArquivo.php'; $cacheArquivo = new CacheArquivo(); $cacheArquivo->set_valor($USERID); $cacheSessao = new CacheSessao(); $USERID = $cacheSessao->set_valor('USERID'); $USERNAME = $cacheSessao->set_valor('USERNAME'); echo '<html>'; echo '<script>'; echo 'alert("Deslogado!");'; echo 'window.location="Index.php"'; echo '</script>'; echo '</html>';
<?php include_once 'CheckLogOut.php'; require_once 'Connection.php'; require_once 'Contact.php'; // para atualizar a lista require_once 'User.php'; require_once 'CacheArquivo.php'; //////////////////////////// require_once 'Log.php'; $con = new Connection(); $c = new Contact(); $c->ContactId($_GET['contactId']); $c->DeleteContact(); // para atualizar a lista $u = new User(); $cacheArquivo = new CacheArquivo(); $cacheArquivo->set_valor($UsId); $Contacts = $u->GetAllContacts($USERID); $valor = json_encode($Contacts); $cacheArquivo->set_valor($USERID, $valor); //////////////////////////// $Log = new Log(3); // log de deleção, conforme a tabela Actions $Log->UserId($USERID); // $Log->InsertLog(); echo '<html>'; echo '<script language="JavaScript">'; echo 'window.location="Main.php"'; echo '</script>'; echo '</html>';
<?php //include_once 'cache.arquivo.php'; require_once 'CacheArquivo.php'; require_once 'CacheSessao.php'; require_once 'Connection.php'; require_once 'User.php'; $c = new Connection(); $u = new User(); $cacheArquivo = new CacheArquivo(); $cacheSessao = new CacheSessao(); $UsId = $u->GetUserIdByUserName($_REQUEST['userName']); $u->UserId($UsId); $Contacts = $u->GetAllContacts($UsId); $valor = json_encode($Contacts); $cacheArquivo->set_valor($UsId, $valor); if ($UsId > 0) { $cacheSessao->set_valor('USERID', $UsId); $cacheSessao->set_valor('USERNAME', $_REQUEST['userName']); } else { $cacheSessao->set_valor('USERID'); $cacheSessao->set_valor('USERNAME'); } $u->UserName($_REQUEST['userName']); $u->Password($_REQUEST['password']); $res = $u->VerifyLogin(); if ($res) { echo '<html>'; echo '<script language="JavaScript">'; echo 'window.location="Main.php"'; echo '</script>';