Viewing file: logout.php (2.62 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
############################################################################
# DWmail
# - version 4.0
# - Copyright (c) 2003-2006 Dominion Web Design
# - http://www.dominion-web.com/products/dwmail/
############################################################################
#
# The contents of this file are subject to the DWmail License version
# 2.2 ('License'). You may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.dominion-web.com/products/dwmail/license.php
# Software distributed under the License is distributed on an "AS IS" basis,
# without warranty of any kind, either express or implied.
#
# This code is Copyright (c) 2003-2006 Dominion Web Design.
# All rights reserved.
#
# This software may not be redistributed outside the terms of the
# license agreement.
#
############################################################################
*/
require ("./includes/init.inc.php");
require ("./includes/global.inc.php");
require ("./includes/imap.inc.php");
require ("./includes/functions.inc.php");
require ("./includes/config.inc.php");
$MainSettings = new GlobalInit();
$TransIDEnabled = $MainSettings->INIGet('session.use_trans_sid');
session_cache_limiter($DefaultSessionCache);
session_start();
require ("./includes/options.inc.php");
if ($EmptyTrash == 1 && ($_SESSION['servertype'] == 'imap' || $_SESSION['servertype'] == 'imapssl')) {
if (!$_SESSION['DefaultLang']) {
$_SESSION['DefaultLang'] = $DefaultLang;
}
require ("./lang/" . strip_tags(str_replace("..", "", trim($_SESSION['DefaultLang']))) . "/global.inc.php");
$getFile = new fileProperties($DefaultTemplate);
if (($_SESSION['sess_u'] == "") && ($_SESSION['sess_p'] == "")) {
echo ("<p>" . $lang['SErrors']['Session'] . "</p>");
exit;
}
$_SESSION['folder'] = $IMAPTrash;
$IMAPConnection = new WM_IMAPConnection($_SESSION);
$securitycheck = $IMAPConnection->WM_IMAPCheckSecurity();
if ($securitycheck == 0) {
echo ("<p>" . $lang['SErrors']['IP'] . "</p>");
exit;
}
$mailbox = $IMAPConnection->WM_IMAPConnect();
$numberofmessages = $IMAPConnection->WM_IMAPNumMessages();
$sortmessages = $IMAPConnection->WM_IMAPList(1, $numberofmessages);
if ($sortmessages <> "") {
while(list($key, $value) = each($sortmessages)) {
$DeleteConfirm = $IMAPConnection->WM_IMAPDelete($sortmessages[$key]['message_uid']);
var_dump ($DeleteConfirm);
}
}
$IMAPConnection->WM_IMAPExpungeMailbox();
$IMAPConnection->WM_IMAPClose();
}
session_unset();
session_destroy();
header("Location: ./");
?>
|