forked from extern/egroupware
Clean up some of the code
This commit is contained in:
parent
7803b5c945
commit
0003ec27a0
65
logout.php
65
logout.php
@ -12,53 +12,36 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["flags"]["disable_message_class"] = True;
|
$phpgw_info = array();
|
||||||
$phpgw_info["flags"]["disable_send_class"] = True;
|
$phpgw_info['flags'] = array(
|
||||||
$phpgw_info["flags"]["disable_nextmatchs_class"] = True;
|
'disable_template_class' => True,
|
||||||
$phpgw_info["flags"]["disable_template_class"] = True;
|
'currentapp' => 'logout',
|
||||||
$phpgw_info["flags"]["currentapp"] = "logout";
|
'noheader' => True,
|
||||||
$phpgw_info["flags"]["noheader"] = True;
|
'nofooter' => True,
|
||||||
|
'nonavbar' => True
|
||||||
|
);
|
||||||
|
|
||||||
include("./header.inc.php");
|
include('./header.inc.php');
|
||||||
|
|
||||||
$sep = $phpgw->common->filesystem_separator();
|
if ($phpgw->session->verify($sessionid))
|
||||||
|
{
|
||||||
/*
|
if (file_exists($phpgw_info['server']['temp_dir'] . sep . $sessionid))
|
||||||
|
{
|
||||||
if ($installed[cron_apps] != "Y") {
|
$dh = opendir($phpgw_info['server']['temp_dir'] . sep . $sessionid);
|
||||||
$dh = opendir($phpgw_info["server"]["temp_dir"]);
|
while ($file = readdir($dh))
|
||||||
while ($dir = readdir($dh)) {
|
{
|
||||||
if ($dir != "." && $dir != "..") {
|
if ($file != '.' && $file != '..')
|
||||||
if (substr($dir,0,strlen(time())) <= (time() - 3600)) {
|
{
|
||||||
echo $phpgw_info["server"]["temp_dir"] . $sep . $dir;
|
unlink($phpgw_info['server']['temp_dir'] . sep . $sessionid . sep . $file);
|
||||||
$fh = opendir($phpgw_info["server"]["temp_dir"] . $sep . $dir);
|
|
||||||
while ($file = readdir($fh)) {
|
|
||||||
if ($file != "." && $file != "..") {
|
|
||||||
unlink($phpgw_info["server"]["temp_dir"] . $sep . $dir . $sep . $file);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rmdir($phpgw_info["server"]["temp_dir"] . $sep . $dir);
|
rmdir($phpgw_info['server']['temp_dir'] . sep . $sessionid);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($phpgw->session->verify($sessionid)) {
|
|
||||||
if (file_exists($phpgw_info["server"]["temp_dir"] . $sep . $sessionid)) {
|
|
||||||
$dh = opendir($phpgw_info["server"]["temp_dir"] . $sep . $sessionid);
|
|
||||||
while ($file = readdir($dh)) {
|
|
||||||
if ($file != "." && $file != "..") {
|
|
||||||
unlink($phpgw_info["server"]["temp_dir"] . $sep . $sessionid . $sep . $file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rmdir($phpgw_info["server"]["temp_dir"] . $sep . $sessionid);
|
|
||||||
}
|
}
|
||||||
$phpgw->session->destroy();
|
$phpgw->session->destroy();
|
||||||
}
|
}
|
||||||
Setcookie("sessionid");
|
Setcookie('sessionid');
|
||||||
Setcookie("kp3");
|
Setcookie('kp3');
|
||||||
Setcookie("domain");
|
Setcookie('domain');
|
||||||
|
|
||||||
$phpgw->redirect($phpgw_info["server"]["webserver_url"]."/login.php?cd=1");
|
$phpgw->redirect($phpgw_info['server']['webserver_url'].'/login.php?cd=1');
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user