/** * Sets editor language * @param string $lang abbreviation of the language code * @param string $out_charset output charset */ function setLanguage($lang = '', $out_charset = '') { $this->lang = new SpawLang($lang); if ($out_charset != null && $out_charset != '') { $this->lang->setOutputCharset($out_charset); } }
*/ error_reporting(E_ALL); include_once "../spaw.inc.php"; $module = SpawVars::getGetVar("module"); if (strpos($module, '/') || strpos($module, "\\")) { die("illegal module name"); } $dialog = SpawVars::getGetVar("dialog"); if (strpos($dialog, '/') || strpos($dialog, "\\")) { die("illegal dialog name"); } $lang = new SpawLang(SpawVars::getGetVar("lang")); $charset = $lang->getCharset(); if (SpawVars::getGetVar('charset') != '') { $charset = SpawVars::getGetVar('charset'); $lang->setOutputCharset($charset); } if (SpawVars::getGetVar("scid") != '' && session_id() == '') { session_start(); } $config = new SpawConfig(); $config->restoreSecureConfig(SpawVars::getGetVar("scid")); $theme = SpawTheme::getTheme(SpawVars::getGetVar("theme")); $htpl = $theme->getTemplateDialogHeader(); $htpl = str_replace('{SPAW DIALOG TITLE}', $lang->m('title', $dialog, $module), $htpl); $htpl = str_replace('{SPAW DIR}', SpawConfig::getStaticConfigValue('SPAW_DIR'), $htpl); $ftpl = $theme->getTemplateDialogFooter(); $ftpl = str_replace('{SPAW DIR}', SpawConfig::getStaticConfigValue('SPAW_DIR'), $ftpl); ob_start(); ?>