logout.php

来自「For Email POP3. by PHP. but it has some 」· PHP 代码 · 共 44 行

PHP
44
字号
<?
$ignoresession = true;
include("session_management.php");
if(is_array($sess["headers"]) && file_exists($userfolder)) {

	$inboxdir = $userfolder."inbox/";

	if(is_array($attachs = $sess["attachments"])) {
		for($i=0;$i<count($attachs);$i++) {
			if(file_exists($attachs[$i]["localname"])) @unlink($attachs[$i]["localname"]);
		}
	}
	$filelist = Array();
	if(is_array($headers = $sess["headers"])) {
		for($i=0;$i<count($headers);$i++) {
			$filelist[] = $headers[$i]["localname"];
		}
	}

	$d = dir("$inboxdir");

	while($entry=$d->read()) {
		if(!in_array($inboxdir.$entry,$filelist))
			@unlink($inboxdir.$entry);
	}

	$d->close();
	$att = $userfolder."_attachments/";
	$d = dir($att);
	while($entry=$d->read())
		@unlink($att.$entry);
	$d->close();
	if($empty_trash) {
		$trsh = $userfolder."trash/";
		$d = dir($trsh);
		while($entry=$d->read())
			@unlink($trsh.$entry);
		$d->close();
	}
}
delete_session();

header("Location: ./\r\n");
?> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?