コード例 #1
0
/**
 * Returns a list of all folders, subscribed or not
 *
 * Since 1.5.1 code moved to sqimap_get_mailboxes()
 *
 * @param stream $imap_stream imap connection resource
 * @return array see sqimap_mailbox_parse()
 * @since 1.0 or older
 */
function sqimap_mailbox_list_all($imap_stream)
{
    global $show_only_subscribed_folders;
    // fourth argument prevents registration of retrieved list of mailboxes in session
    $boxes = sqimap_get_mailboxes($imap_stream, true, false, false);
    return $boxes;
}
コード例 #2
0
ファイル: left_main.php プロジェクト: teammember8/roundcube
                // surpress the NO response. Unless we're on Mecury, which
                // will just subscribe a folder again if it's already
                // subscribed.
                if (strtolower($imap_server_type) != 'mercury32' || !sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
                    sqimap_subscribe($imapConnection, $folder, false);
                    $folders_created = true;
                }
            }
        }
    }
    /* Let the world know that autocreation is complete! Hurrah! */
    $auto_create_done = TRUE;
    sqsession_register($auto_create_done, 'auto_create_done');
    // reload mailbox list
    if ($folders_created) {
        $mailboxes = sqimap_get_mailboxes($imapConnection, true, $show_only_subscribed_folders);
    }
}
$clock = '';
if ($date_format != 6) {
    /* First, display the clock. */
    if ($hour_format == 1) {
        $hr = 'H:i';
        if ($date_format == 4) {
            $hr .= ':s';
        }
    } else {
        if ($date_format == 4) {
            $hr = 'g:i:s a';
        } else {
            $hr = 'g:i a';
コード例 #3
0
ファイル: empty_trash.php プロジェクト: teammember8/roundcube
 *    parent.
 */
/** First create the top node in the tree **/
$numboxes = count($boxes);
for ($i = 0; $i < $numboxes; $i++) {
    if ($boxes[$i]['unformatted'] == $mailbox && strlen($boxes[$i]['unformatted']) == strlen($mailbox)) {
        $foldersTree[0]['value'] = $mailbox;
        $foldersTree[0]['doIHaveChildren'] = false;
        continue;
    }
}
/*
 * Now create the nodes for subfolders of the parent folder
 * You can tell that it is a subfolder by tacking the mailbox delimiter
 *    on the end of the $mailbox string, and compare to that.
 */
$j = 0;
for ($i = 0; $i < $numboxes; $i++) {
    if (substr($boxes[$i]['unformatted'], 0, strlen($mailbox . $delimiter)) == $mailbox . $delimiter) {
        addChildNodeToTree($boxes[$i]['unformatted'], $boxes[$i]['unformatted-dm'], $foldersTree);
    }
}
// now lets go through the tree and delete the folders
walkTreeInPreOrderEmptyTrash(0, $imap_stream, $foldersTree);
// update mailbox cache
$mailboxes = sqimap_get_mailboxes($imap_stream, true, $show_only_subscribed_folders);
sqimap_logout($imap_stream);
// close session properly before redirecting
session_write_close();
$location = get_location();
header("Location: {$location}/left_main.php");