<?php //----------------------------- // Programmer : SH.Jafarkhani // Date : 94.06 //----------------------------- require_once getenv("DOCUMENT_ROOT") . '/framework/session.php'; session::sec_session_start(); session::logout(); ?> <script> window.location = "login.php"; </script>
/** * Checks if a user has attempted to login to many times or has been caught hacking the site */ function locked() { if ($_SESSION['wrong'] >= 3 || $_SESSION['hack'] >= 3) { // if the user has three wrongs or three hack attempts // logout the user, then add the IP of the user to the Blacklist global $dbl; global $mem; if ($mem->loggedIn()) { session::logout(); } // if they are logged in log them out $ip = getRealIp(); // get users ip $dbl->blacklist($ip); // add top blacklist writeLog('Locked out automatically.'); sendLocked(); } }
<?php if (!defined('INTERFACE_ACCESS')) { die('Direct access not premitted'); } $session_id = $_REQUEST["session_id"]; echo json_encode(session::logout($session_id));