logout.php 427 B

12345678910111213141516
  1. <?php
  2. require_once 'init.php';
  3. if ($_SESSION['userid']) {
  4. $record = array();
  5. $record['updated'] = date('Y-m-d H:i:s');
  6. $record['user'] = $_SESSION['userid'];
  7. $record['host'] = $_SERVER['REMOTE_ADDR'];
  8. $record['operation'] = 'logout';
  9. $rs2 = $adodb->SelectLimit("SELECT * FROM qb_changelog", 1);
  10. $adodb->Execute($adodb->GetInsertSQL($rs2, $record));
  11. }
  12. session_destroy();
  13. header('Location: logout2.php');
  14. ?>