0byt3m1n1
Path:
/
data
/
applications
/
aps
/
owl
/
1.0-0
/
standard
/
htdocs
/
[
Home
]
File: logout.php
<?php /* * logout.php * * Author: Steve Bourgeois <owl@bozzit.com> * * Copyright (c) 2006-2009 Bozz IT Consulting Inc * * Licensed under the GNU GPL. For full terms see the file LICENSE. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ $sess = $_GET['sess']; require_once(dirname(__FILE__) . "/config/owl.php"); require_once($default->owl_fs_root . "/lib/disp.lib.php"); require_once($default->owl_fs_root . "/lib/owl.lib.php"); if ($default->auth == 0 or $default->auth == 2) { if (!isset($_COOKIE["owl_sessid"])) { $sql = new Owl_DB; if ($default->active_session_ip) { $sql->query("DELETE FROM $default->owl_sessions_table WHERE sessid = '$sess' and ip <> '0'"); } else { $sql->query("DELETE FROM $default->owl_sessions_table WHERE sessid = '$sess' and ip = '0'"); } } $tmpDir = $default->owl_tmpdir . "/owltmp.$sess"; if (file_exists($tmpDir)) { myDelete($tmpDir); } owl_syslog(LOGOUT, $userid, 0, 0, $owl_lang->log_detail, "LOGIN"); } else { if (!isset($_COOKIE["owl_sessid"])) { $sql = new Owl_DB; if ($default->active_session_ip) { $sql->query("DELETE FROM $default->owl_sessions_table WHERE sessid = '$sess' and ip <> '0'"); } else { $sql->query("DELETE FROM $default->owl_sessions_table WHERE sessid = '$sess' and ip = '0'"); } } $tmpDir = $default->owl_tmpdir . "/owltmp.$sess"; if (file_exists($tmpDir)) { myDelete($tmpDir); } owl_syslog(LOGOUT, $userid, 0, 0, $owl_lang->log_detail, "LOGIN"); } print('<script type="text/javascript">'); print('window.close();'); print('</script> '); ?>