Esempio n. 1
0
    // If this is an Ajax call, print the header, then exit
    if ($atmail->Ajax) {
        $var['folder'] = str_replace('&', '&', $var['folder']);
        echo <<<_EOF
<?xml version="1.0" ?>

<MovedMsgs>
<status>1</status>
<message>Deleted {$cnt} messages from {$var['folder']}</message>
</MovedMsgs>

_EOF;
        $atmail->end();
    }
}
list($var['unread'], $var['total']) = $mail->showunread($var['folder']);
$var['fulltotal'] = $var['total'];
// Create the sideframe for the Simple interface containing the list of mailbox folders.
if ($atmail->LoginType == "simple") {
    // Toggle our sort opposite if the user clicks the header again
    $var['ordersort'] = $var['order'] == "desc" ? "" : "desc";
    $name = 'count' . $var['folder'];
    $var[$name] = $var['unread'];
    // Create the default folders on the left sidebar
    foreach (array('Inbox', 'Trash', 'Sent', 'Drafts', 'Spam') as $fol) {
        $foldertranslate = Language::folder_language($fol, $atmail->Language, '1');
        // If we are the currently selected folder
        if ($fol == $var['folder']) {
            $folicon = "sidebar_" . strtolower($fol) . "_on.gif";
            $count = 'count' . $var['folder'];
            if ($var[$count] > 0) {