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

if (file_exists($_PM_['path']['handler'].'/calendar/lang.'.$WP_msg['language'].'.php')) {
    require($_PM_['path']['handler'].'/calendar/lang.'.$WP_msg['language'].'.php');
} else {
    require($_PM_['path']['handler'].'/calendar/lang.de.php');
}
class topbuttonbar_calendar
{
    public function __construct(&$_PM_)
    {
        global $WP_msg;

    	$year = date('Y');
    	$mnth = date('n');
    	$day  = date('j');

        $this->tpl = new fxl_cached_template($_PM_['path']['frontend'].'/templates/topbuttonbar.calendar.tpl', $_PM_['path']['tplcache'].'topbuttonbar.calendar.tpl');
        // Permissions
        if ($_SESSION['phM_privs']['all'] || $_SESSION['phM_privs']['calendar_add_event']) {
            $this->tpl->assign_block('has_new_event');
        }
        if ($_SESSION['phM_privs']['all'] || $_SESSION['phM_privs']['calendar_add_task']) {
            $this->tpl->assign_block('has_new_task');
        }
        if ($_SESSION['phM_privs']['all'] || $_SESSION['phM_privs']['calendar_export_events'] || $_SESSION['phM_privs']['calendar_import_events']) {
            $this->tpl->assign_block('has_exchange');
        }
        $this->tpl->assign(array
                ('alert_url' => PHP_SELF.'?load=alert_event&handler=calendar&'.give_passthrough().'&eid='
                ,'year' => $year
                ,'msg_newevent' => $WP_msg['CalNewEvt']
                ,'msg_newtask' => $WP_msg['TskNewTask']
                ,'msg_setup_calendar' => $WP_msg['CalCalendar']
                ,'msg_killconfirm' => $WP_msg['killJSconfirm']
                ,'head_reminder' => $WP_msg['CalEvtReminder']
                ));
        // Helper assignment. Saves huge API for just having a nice translation of the root node everywhere necessary
        if (!isset($_SESSION['phM_uniqe_handlers']['calendar']['i18n'])) {
            $_SESSION['phM_uniqe_handlers']['calendar']['i18n'] = $WP_msg['CalCalendar'];
        }
        return true;
    }

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