コード例 #1
0
ファイル: ajax_list_mails.php プロジェクト: fbone/mediboard4
        break;
    case 'archived':
        $nb_mails = CUserMail::countArchived($account_id);
        $mails = CUserMail::loadArchived($account_id, $page, $limit_list);
        break;
    case 'favorites':
        $nb_mails = CUserMail::countFavorites($account_id);
        $mails = CUserMail::loadFavorites($account_id, $page, $limit_list);
        break;
    case 'sentbox':
        $nb_mails = CUserMail::countSent($account_id);
        $mails = CUserMail::loadSent($account_id, $page, $limit_list);
        break;
    case 'drafts':
        $nb_mails = CUserMail::countDrafted($account_id);
        $mails = CUserMail::loadDrafted($account_id, $page, $limit_list);
        break;
}
/** @var $mails CUserMail[] */
foreach ($mails as $_mail) {
    $_mail->loadReadableHeader();
    $_mail->loadRefsFwd();
    $_mail->checkApicrypt();
}
//smarty
$smarty = new CSmartyDP();
$smarty->assign("mails", $mails);
$smarty->assign("page", $page);
$smarty->assign("nb_mails", $nb_mails);
$smarty->assign("account_id", $account_id);
$smarty->assign("user", $user);