Location: PHPKode > projects > phlyMail Lite > phlymail/handlers/email/topbuttonbar.php
<?php
/**
 * @package phlyMail Nahariya 4.0+, Branch MessageCenter
 * @subpackage Handler Email
 * @copyright 2001-2010 phlyLabs, Berlin (http://phlylabs.de)
 * @version 4.0.1 2010-04-06
 */
// Only valid within phlyMail
if (!defined('_IN_PHM_')) die();

class topbuttonbar_email
{
    public function __construct(&$_PM_)
    {
        $this->tpl = new fxl_cached_template($_PM_['path']['frontend'].'/templates/topbuttonbar.email.tpl', $_PM_['path']['tplcache'].'topbuttonbar.email.tpl');
        if (isset($_PM_['customsize']['email_previewheight']) && $_PM_['customsize']['email_previewheight']
                && (!isset($_PM_['core']['resize_mainwindows']) || $_PM_['core']['resize_mainwindows'])) {
            $this->tpl->fill_block('customheight', 'height', $_PM_['customsize']['contacts_previewheight']);
        }
        // Helper assignment. Saves huge API for just having a nice translation of the root node everywhere necessary
        if (!isset($_SESSION['phM_uniqe_handlers']['email']['i18n'])) {
            $_SESSION['phM_uniqe_handlers']['email']['i18n'] = 'Emails';
        }
        $passthru = give_passthrough(1);
        $this->tpl->assign(array
                ('msg_mailbox' => $GLOBALS['WP_msg']['all']
                ,'msg_profile' => $GLOBALS['WP_msg']['profile']
                ,'msg_mail' => $GLOBALS['WP_msg']['mail']
                ,'msg_filters' => $GLOBALS['WP_msg']['FilterTopFilterRules']
                ,'msg_getmessages' => $GLOBALS['WP_msg']['MainGetMsg']
                ,'msg_newmail' => phm_addcslashes($GLOBALS['WP_msg']['WorkerNewMail'], "'")
                ,'msg_getmessages' => phm_addcslashes($GLOBALS['WP_msg']['MainGetMsg'])
                ,'msg_dlingmessages' => phm_addcslashes($GLOBALS['WP_msg']['DownloadingMessages'])
                ,'msg_updatingindex' => phm_addcslashes($GLOBALS['WP_msg']['UpdatingIndex'])
                ,'checkmail_url' => PHP_SELF.'?load=worker&handler=email&'.$passthru.'&what=recheck'
                ,'fetcher_url' => PHP_SELF.'?handler=email&load=fetcher.run&'.$passthru
                ,'mailops_url' => PHP_SELF.'?load=worker&handler=email&'.$passthru.'&what=mail_'
                ));
        // Allow direct fetching of individual profiles
        $t_p = $this->tpl->get_block('fetchprof');
        foreach ($GLOBALS['DB']->get_accidx($_SESSION['phM_uid'], null, true) as $pid => $data) {
            $t_p->assign(array
                    ('theme_path' => $_PM_['path']['theme']
                    ,'msg_mailbox' => addcslashes($data['accname'], "'")
                    ,'handler' => $_PM_['handler']['name']
                    ,'passthrough' => $passthru
                    ,'pid' => $pid
                    ,'PHP_SELF' => PHP_SELF
                    ));
            $this->tpl->assign('fetchprof', $t_p);
            $t_p->clear();
        }
        require_once(dirname(__FILE__).'/boilerplates.php');
        $EBP = new boilerplates($_SESSION['phM_uid']);
        if (isset($EBP->enabled) && $EBP->enabled) {
            $t_ebp = $this->tpl->get_block('boilerplates');
            $t_ebp->assign(array
                    ('theme_path' => $_PM_['path']['theme']
                    ,'msg_boilerplates' => addcslashes($GLOBALS['WP_msg']['BPlateMenu'], "'")
                    ,'handler' => $_PM_['handler']['name']
                    ,'passthrough' => $passthru
                    ,'PHP_SELF' => PHP_SELF
                    ));
            $this->tpl->assign('boilerplates', $t_ebp);
        }
        return true;
    }

    public function get()
    {
        return $this->tpl;
    }
}
?>
Return current item: phlyMail Lite