<?php /** * @package Simple Groupware * @link http://www.simple-groupware.de * @copyright Simple Groupware Solutions Thomas Bley 2002-2012 * @license GPLv2 */ if (!defined("MAIN_SCRIPT")) { exit; } require sys_trans("core/functions/funcs.php"); function sys_trans($file) { $cache_file = SIMPLE_CACHE . "/lang/" . basename($file) . "_" . LANG . "_" . filemtime($file) . ".php"; if (!file_exists($cache_file)) { @mkdir(SIMPLE_CACHE . "/lang/"); file_put_contents($cache_file, preg_replace("!<\\?\\s!", "<?php ", trans(file_get_contents($file))), LOCK_EX); if (DEBUG and empty($_REQUEST["iframe"]) and ob_get_level() == 0) { echo "reload lang " . $file; } } return $cache_file; } function trans($content) { return preg_replace_callback("!\\{t\\}([^\\{]+)\\{/t\\}!", "tr", $content); } function t($str, $params = null) { if ($params != null) {
function render($php) { ob_start(); include sys_trans(sys_custom($php), "tpl_" . substr(basename($php), 0, -4)); return ob_get_clean(); }