function popup()
{
    $cyrus = new cyrus();
    $array = $cyrus->ListMailboxes($_GET["userid"]);
    $array[null] = "{all}";
    unset($array["INBOX"]);
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'><div id='empty-div'>\n\t\t<img src='img/poubelle-128.png'></td>\n\t\t</div>\n\t<td valign='top'>\n\t\t\t<div class=explain>{empty_this_mailbox_explain}</div>\n\t\t\t<table style='width:99%' class=form>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:13px'>{size_of_message}:</td>\n\t\t\t\t<td style='font-size:14px'>" . Field_text("size_of_message", null, "width:50px;font-size:14px;padding:3px", null, null, null, false, "empty_this_mailbox_perform_check(event)") . "&nbsp;MB</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:13px'>{age_of_message}:</td>\n\t\t\t\t<td style='font-size:14px'>" . Field_text("age_of_message", 30, "width:50px;font-size:14px;padding:3px", null, null, null, false, "empty_this_mailbox_perform_check(event)") . "&nbsp;{days}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:13px'>{submailbox}:</td>\n\t\t\t\t<td style='font-size:14px'>" . Field_array_Hash($array, "submailbox", "Junk", null, null, 0, "font-size:14px;padding:3px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'><hr>\n\t\t\t\t\t" . button("{delete}", "empty_this_mailbox_perform()") . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Ejemplo n.º 2
0
function Start_sync()
{
    build_progress("{restarting}: Saslauthd", 20);
    system('/etc/init.d/saslauthd restart');
    sleep(2);
    build_progress("{restarting}: Cyrus-Imap", 50);
    system('/etc/init.d/cyrus-imapd restart');
    sleep(2);
    build_progress("{restarting}: Postfix", 80);
    system('/etc/init.d/postfix restart');
    sleep(2);
    build_progress("{listing_mailboxes}", 90);
    $cyrus = new cyrus();
    $mbx = $cyrus->ListMailboxes($cn);
    while (list($num, $box) = each($mbx)) {
        echo "Found Mailbox \"{$num}\"\n";
    }
    sleep(10);
    build_progress("{done}", 100);
}