Exemple #1
0
  Description: Mailbox loader file

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
if (!defined('PARENT') || !isset($MSTEAM->mailbox)) {
    $HEADERS->err403(true);
}
define('MAILBOX_LOADER', 1);
// Is mailbox enabled?
if ($MSTEAM->mailbox == 'no') {
    $HEADERS->err403(true);
}
// Load mail params
include REL_PATH . 'control/mail-data.php';
// Mail class..
include PATH . 'control/classes/class.mailbox.php';
$MSMB = new mailBox();
$MSMB->settings = $SETTINGS;
$MSMB->datetime = $MSDT;
// Folder management..
include PATH . 'control/system/mailbox/folder.php';
$title = $msg_adheader61 . ' (' . $msg_mailbox . ')';
$loadJQAlertify = true;
$boxName = $msg_mailbox;
$temp = 'mailbox-folder.php';
$toLoad = 'inbox';
// Run auto purge..
if ($MSTEAM->mailPurge > 0 && !isset($_SESSION['autoPurgeRan'])) {
    $MSMB->autoPurge($MSTEAM->id, $MSTEAM->mailPurge);
    // We`ll set a session cookie here, this prevents it being run again in this session..
    $_SESSION['autoPurgeRan'] = true;
}
 public function emptyBin($staff)
 {
     mysql_query("DELETE FROM `" . DB_PREFIX . "mailassoc`\n  WHERE `staffID` = '{$staff}'\n  AND `folder` = 'bin'\n  ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
     // Any messages now deleted by all users can be deleted..
     mailBox::assocChecker();
 }