<?php
/**
* @package phlyMail Nahariya 4.0+, Branch MessageCenter
* @subpackage Handler Files
* @copyright 2001-2010 phlyLabs, Berlin (http://phlylabs.de)
* @version 0.1.4 2010-02-08
*/
// Only valid within phlyMail
if (!defined('_IN_PHM_')) die();
if (file_exists($_PM_['path']['handler'].'/files/lang.'.$GLOBALS['WP_msg']['language'].'.php')) {
require($_PM_['path']['handler'].'/files/lang.'.$GLOBALS['WP_msg']['language'].'.php');
} else {
require($_PM_['path']['handler'].'/files/lang.de.php');
}
class topbuttonbar_files
{
public function __construct(&$_PM_)
{
global $WP_msg;
$passthru = give_passthrough(1);
// Helper assignment. Saves huge API for just having a nice translation of the root node everywhere necessary
if (!isset($_SESSION['phM_uniqe_handlers']['files']['i18n'])) {
$_SESSION['phM_uniqe_handlers']['files']['i18n'] = $WP_msg['FilesMyName'];
}
$this->tpl = new fxl_cached_template($_PM_['path']['frontend'].'/templates/topbuttonbar.files.tpl', $_PM_['path']['tplcache'].'topbuttonbar.files.tpl');
// Permissions
if ($_SESSION['phM_privs']['all'] || $_SESSION['phM_privs']['files_add_file']) {
$this->tpl->assign_block('has_new_file');
}
$this->tpl->assign(array
('handler' => 'files'
,'handlername' => $WP_msg['FilesMyName']
,'but_upload' => $WP_msg['FileUpload']
// ,'rootcollapsed' => (isset($_PM_['foldercollapses']) && isset($_PM_['foldercollapses']['files_']) && $_PM_['foldercollapses']['files_']) ? 0 : 1
// ,'iframesrcurl' => PHP_SELF.'?handler=files&load=ilist&'.$passthru.'&workfolder='
));
return true;
}
public function get()
{
return $this->tpl;
}
}
?>