Ejemplo n.º 1
0
    $note = _("Your Message has been sent.");
}
if (isset($note)) {
    echo html_tag('div', '<b>' . $note . '</b>', 'center') . "<br />\n";
}
if (sqgetGlobalVar('just_logged_in', $just_logged_in, SQ_SESSION)) {
    if ($just_logged_in == true) {
        $just_logged_in = false;
        sqsession_register($just_logged_in, 'just_logged_in');
        if (strlen(trim($motd)) > 0) {
            echo html_tag('table', html_tag('tr', html_tag('td', html_tag('table', html_tag('tr', html_tag('td', $motd, 'center')), '', $color[4], 'width="100%" cellpadding="5" cellspacing="1" border="0"'))), 'center', $color[9], 'width="70%" cellpadding="0" cellspacing="3" border="0"');
        }
    }
}
if ($aMailbox['EXISTS'] > 0) {
    showMessagesForMailbox($imapConnection, $aMailbox);
} else {
    $string = '<b>' . _("THIS FOLDER IS EMPTY") . '</b>';
    echo '    <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="' . $color[9] . '">';
    echo '     <tr><td>';
    echo '       <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="' . $color[4] . '">';
    echo '        <tr><td><br />';
    echo '            <table cellpadding="1" cellspacing="5" align="center" border="0">';
    echo '              <tr>' . html_tag('td', $string . "\n", 'left') . '</tr>';
    echo '            </table>';
    echo '        <br /></td></tr>';
    echo '       </table></td></tr>';
    echo '    </table>';
}
do_hook('right_main_bottom');
sqimap_logout($imapConnection);
Ejemplo n.º 2
0
 * registered session data.  :)                                      *
 *********************************************************************/
if (!isset($use_mailbox_cache)) {
    $use_mailbox_cache = 0;
}
if ($use_mailbox_cache && sqsession_is_registered('msgs')) {
    showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
} else {
    if (sqsession_is_registered('msgs')) {
        unset($msgs);
    }
    if (sqsession_is_registered('msort')) {
        unset($msort);
    }
    if (sqsession_is_registered('numMessages')) {
        unset($numMessages);
    }
    $numMessages = sqimap_get_num_messages($imapConnection, $mailbox);
    // set 8th argument to false in order to make sure that cache is not used.
    showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, false);
    if (sqsession_is_registered('msgs') && isset($msgs)) {
        sqsession_register($msgs, 'msgs');
    }
    if (sqsession_is_registered('msort') && isset($msort)) {
        sqsession_register($msort, 'msort');
    }
    sqsession_register($numMessages, 'numMessages');
}
do_hook('right_main_bottom');
sqimap_logout($imapConnection);
echo '</body></html>';
Ejemplo n.º 3
0
if (isset($mail_sent) && $mail_sent == 'yes') {
    $note = _("Your mail has been sent.");
}
if (isset($note)) {
    $oTemplate->assign('note', sm_encode_html_special_chars($note));
    $oTemplate->display('note.tpl');
}
if ($temp_just_logged_in || $show_motd) {
    $motd = trim($motd);
    if ($show_motd || strlen($motd) > 0) {
        $oTemplate->assign('motd', $motd);
        $oTemplate->display('motd.tpl');
    }
}
if ($aMailbox['EXISTS'] > 0) {
    $aTemplateVars = showMessagesForMailbox($imapConnection, $aMailbox, $aProps, $iError);
    if ($iError) {
    }
    foreach ($aTemplateVars as $k => $v) {
        $oTemplate->assign($k, $v);
    }
    /*
     * TODO: To many config related vars. We should move all config related vars to
     * one single associative array and assign that to the template
     */
    $oTemplate->assign('page_selector', $page_selector);
    $oTemplate->assign('page_selector_max', $page_selector_max);
    $oTemplate->assign('compact_paginator', $compact_paginator);
    $oTemplate->assign('javascript_on', checkForJavascript());
    $oTemplate->assign('base_uri', sqm_baseuri());
    $oTemplate->assign('enablesort', isset($aProps['config']['enablesort']) ? $aProps['config']['enablesort'] : false);
Ejemplo n.º 4
0
    }
    if (sq_is8bit($imaplaskut_password)) {
        $query .= ' {' . strlen($imaplaskut_password) . "}\r\n{$imaplaskut_password}";
    } else {
        $query .= ' "' . quoteimap($imaplaskut_password) . '"';
    }
    $read = sqimap_run_command($imap_stream, $query, false, $response, $message);
    if ($response != "OK") {
        echo date("d.m.Y @ G:i:s") . ": Login failed!\n";
        echo date("d.m.Y @ G:i:s") . ": Response: {$response} {$message}\n";
        exit;
    }
    // Haetaan ostoreskontran laskut
    showMessagesForMailbox($imap_stream, $imaplaskut_in_box, $imaplaskut_ok_box, $imaplaskut_er_box, $imaplaskut_domain, $imaplaskut_skannauskansio);
    // listataan kaikki Matkalasku-mailboxit
    $query = "LIST \"\" \"*\"";
    $read_list = sqimap_run_command_list($imap_stream, $query, true, $response, $message, '');
    foreach ($read_list[0] as $r) {
        if (preg_match("/ \"([^\"]*?Matkalaskut\\/[a-z]*)\"/i", $r, $matches)) {
            $skannauskansio = $imaplaskut_skannauskansio . "/" . strtolower($matches[1]) . "/";
            $in_box = $matches[1];
            $ok_box = $matches[1] . "/Ok";
            $er_box = $matches[1] . "/Error";
            // Haetaan matkalaskujen kuitit
            showMessagesForMailbox($imap_stream, $in_box, $ok_box, $er_box, $imaplaskut_domain, $skannauskansio);
        }
    }
    sqimap_logout($imap_stream);
} else {
    echo date("d.m.Y @ G:i:s") . ": Failure: " . $errno . $errstr . "\n\n";
}