Exemplo n.º 1
0
                flush();
            } else {
                array_push($foldersdone, $name);
            }
        }
        $level++;
    }
    ksort($tree);
    print '<ul>' . printTree($tree, "INBOX", ".") . '</ul>';
    print '<p class="submit"><input type="submit" value="' . $GLOBALS['I18N']->get('Process Selected Folders') . '"></p></form>';
} else {
    $all_emails = array();
    while (list($key, $folder) = each($_POST["checkfolder"])) {
        print '<br/>';
        flush();
        $emails = processImapFolder($_POST["server"], $_POST["user"], $_POST["password"], $folder, $_POST["selected_header_fields"]);
        if (is_array($emails)) {
            foreach ($emails as $email => $list) {
                if (!is_array($all_emails[$email])) {
                    $all_emails[$email] = array();
                }
                #      $emaillist = array_merge($emaillist,$emails);
                foreach ($list as $key => $rec) {
                    array_push($all_emails[$email], $rec);
                }
            }
            print "... " . $GLOBALS['I18N']->get('ok');
        } else {
            print "... " . $GLOBALS['I18N']->get('failed');
        }
        flush();
Exemplo n.º 2
0
                flush();
            } else {
                array_push($foldersdone, $name);
            }
        }
        ++$level;
    }
    ksort($tree);
    print '<ul>' . printTree($tree, 'INBOX', '.') . '</ul>';
    print '<p class="submit"><input type="submit" value="' . $GLOBALS['I18N']->get('Process Selected Folders') . '"></p></form>';
} else {
    $all_emails = array();
    while (list($key, $folder) = each($_POST['checkfolder'])) {
        print '<br/>';
        flush();
        $emails = processImapFolder($_POST['server'], $_POST['user'], $_POST['password'], $folder, $_POST['selected_header_fields']);
        if (is_array($emails)) {
            foreach ($emails as $email => $list) {
                if (!is_array($all_emails[$email])) {
                    $all_emails[$email] = array();
                }
                #      $emaillist = array_merge($emaillist,$emails);
                foreach ($list as $key => $rec) {
                    array_push($all_emails[$email], $rec);
                }
            }
            print '... ' . $GLOBALS['I18N']->get('ok');
        } else {
            print '... ' . $GLOBALS['I18N']->get('failed');
        }
        flush();