Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

logout.php 663B

123456789101112131415161718192021222324
  1. <?PHP
  2. define('NOLOGINREF', true); // So we don't go round in circles
  3. define('NOTACREF', true);
  4. require_once('lib/common.php');
  5. require_once('lib/database.php');
  6. require_once('lib/account.php');
  7. if (defined('SPOOF')) {
  8. $sql = 'UPDATE sessions SET session_spoof = 0 WHERE session_ident = \'';
  9. $sql .= m($_COOKIE['utdsid']).'\'';
  10. mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  11. logger::log('Stopped spoofing user '.USER, logger::normal, SPOOF);
  12. header('Location: '.CP_PATH);
  13. exit;
  14. } else {
  15. logger::log('Manual logout',logger::info);
  16. setcookie('utdsid','', time()-24*24*60, '/');
  17. header('Location: '.CP_PATH.'login');
  18. exit;
  19. }
  20. ?>