예제 #1
0
$uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : 0;
$max_rows = isset($_REQUEST['max_rows']) ? $_REQUEST['max_rows'] : $_SESSION['GO_SESSION']['max_rows_list'];
$first_row = isset($_REQUEST['first_row']) ? $_REQUEST['first_row'] : 0;
$table_tabindex = isset($_REQUEST['table_tabindex']) ? $_REQUEST['table_tabindex'] : null;
$return_to = isset($_REQUEST['return_to']) && $_REQUEST['return_to'] != '' ? $_REQUEST['return_to'] : null;
$link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
$task = isset($_REQUEST['task']) && $_REQUEST['task'] != '' ? $_REQUEST['task'] : '';
$print = isset($_REQUEST['print']) ? true : false;
$part = isset($_REQUEST['part']) ? $_REQUEST['part'] : '';
$query = isset($_REQUEST['query']) ? $_REQUEST['query'] : '';
$account = $email->get_account($account_id);
if ($account && $mail->open($account['host'], $account['type'], $account['port'], $account['username'], $GO_CRYPTO->decrypt($account['password']), $mailbox, 0, $account['use_ssl'], $account['novalidate_cert'])) {
    if ($task == 'move_mail') {
        $messages = array($uid);
        $move_to_mailbox = smartstrip($_REQUEST['move_to_mailbox']);
        if ($mail->move($move_to_mailbox, $messages) && $mail->reopen($move_to_mailbox)) {
            header('Location: ' . $GO_MODULES->url . 'index.php?account_id=' . $account_id . '&mailbox=' . $mailbox);
            exit;
        }
    }
    //sort messages for determination of previous and next message
    if ($query != '') {
        $mail->search($em_settings['sort_field'], $em_settings['sort_order'], base64_decode($query));
    } else {
        $mail->sort($em_settings['sort_field'], $em_settings['sort_order']);
    }
    $content = $mail->get_message($uid, 'html', $part);
    $subject = !empty($content["subject"]) ? $content["subject"] : $ml_no_subject;
} else {
    require $GO_THEME->theme_path . 'header.inc';
    echo '<table border="0" cellpadding="10" width="100%"><tr><td>';