<?php
/**
* phlyMail 4.x Theme handler
* @package phlyMail Nahariya 4.0+ Default Branch
* @copyright 2001-2010 phlyLabs, Berlin (http://phlylabs.de)
* @version 4.0.8 2010-05-07
*/
// Only valid within phlyMail
if (!defined('_IN_PHM_')) die();
$WP_theme['version'] = 'phlyMail';
if (!isset($WP_theme['content_type'])) $WP_theme['content_type'] = 'text/html';
if (!isset($WP_theme['metainfo'])) $WP_theme['metainfo'] = '';
if (!isset($WP_theme['base_colour'])) $WP_theme['base_colour'] = '';
if (!isset($WP_theme['charset'])) $WP_theme['charset'] = 'UTF-8';
$WP_theme['bidi-dir'] = isset($WP_msg['html_bidi']) ? $WP_msg['html_bidi'] : 'ltr';
$WP_theme['metainfo'] .= '<meta http-equiv="content-type" content="'.$WP_theme['content_type'].'; charset='.$WP_theme['charset'].'"></meta>'.LF;
if (isset($_PM_['core']['provider_name']) && $_PM_['core']['provider_name'] != '') {
$WP_theme['version'] = $_PM_['core']['provider_name'];
} elseif (file_exists($_PM_['path']['conf'].'/build.name')) {
$WP_theme['version'] = file_get_contents($_PM_['path']['conf'].'/build.name');
}
$WP_theme['currbuild'] = file_get_contents($_PM_['path']['conf'].'/current.build');
// Load and fill template
if (isset($_PM_['temp']['load_tpl_auth'])) {
$t_theme = new fxl_cached_template($_PM_['path']['theme'].'/auth.tpl', $_PM_['path']['themecache'].'auth.tpl');
$t_theme->assign('phlymail_content', $tpl);
// Session cookie
if (!isset($_PM_['auth']['session_cookie']) || $_PM_['auth']['session_cookie']) {
$t_theme->fill_block('sessioncookie_on', 'msg_cookie_warning', $WP_msg['SessionCookieInfo']);
}
} elseif ($load || 'flist' == $action) {
$t_theme = new fxl_cached_template($_PM_['path']['theme'].'/'.$outer_template, $_PM_['path']['themecache'].str_replace('/', '_', $outer_template));
$t_theme->assign('phlymail_content', $tpl);
} else {
$t_theme = &$tpl;
}
$tpl_defaults = new fxl_cached_template($_PM_['path']['frontend'].'/templates/core.defaults.tpl', $_PM_['path']['tplcache'].'core.defaults.tpl');
$t_theme->assign('metainfo', $tpl_defaults->get());
$t_theme->assign(array
('version' => $WP_theme['version']
,'metainfo' => $WP_theme['metainfo']
,'theme_path' => $_PM_['path']['theme']
,'frontend_path' => $_PM_['path']['frontend']
,'bidi-direction' => $WP_theme['bidi-dir']
,'iso_language' => $WP_msg['language']
,'current_build' => $WP_theme['currbuild']
,'theme_base_colour' => $WP_theme['base_colour']
,'microtime' => microtime(true)
));
header('ETag: "'.uniqid().'"');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()-10) . ' GMT');
header('Expires: '.gmdate('D, d M Y H:i:s', time()-10) . ' GMT');
header('Pragma: no-cache');
header('Cache-Control: max-age=1, s-maxage=1, no-cache, must-revalidate');
header('Content-Type: '.$WP_theme['content_type'].'; charset="'.$WP_theme['charset'].'"');
$t_theme->display();
?>