function session_settings() { $lang = DirFolders('ressources/language'); $list = DirFolders('ressources/templates'); unset($list["default"]); $list[null] = "{default}"; $lang[null] = "{default}"; $field = Field_array_Hash($list, 'template', $_COOKIE["artica-template"]); $field_lang = Field_array_Hash($lang, 'lang', $_COOKIE["artica-language"]); $html = "<h1>{session_settings}</H1>\n\t<H3>{template}</H3>\n\t<p class=caption>{template_text}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t<td class='legend'>{template}:</td>\n\t<td>{$field}</td>\n\t</tr>\n\t<tr>\n\t<td class='legend'>{language}:</td>\n\t<td>{$field_lang}</td>\n\t</tr>\t\n\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:SaveSession();\" value='{edit} »'></td>\n\t</tr>\n\t</table>\n\t\n\t\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function session_settings() { $lang = DirFolders('ressources/language'); $list = DirFolders('ressources/templates'); unset($list["default"]); $list[null] = "{default}"; $lang[null] = "{default}"; $field = Field_array_Hash($list, 'template', $_COOKIE["artica-template"]); $field_lang = Field_array_Hash($lang, 'lang', $_COOKIE["artica-language"]); $html = "<h1>{session_settings}</H1>\n\t<H3>{template}</H3>\n\t<p class=caption>{template_text}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t<td class='legend'>{template}:</td>\n\t<td>{$field}</td>\n\t</tr>\n\t<tr>\n\t<td class='legend'>{language}:</td>\n\t<td>{$field_lang}</td>\n\t</tr>\t\n\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:SaveSession();\" value='{apply} »'></td>\n\t</tr>\n\t</table>\n\t\n\t\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); if ($GLOBALS["DEBUG_TEMPLATE"]) { error_log("[{$_SESSION["uid"]}]::FINISH:LANG:[{$_SESSION["detected_lang"]}] => language: _COOKIE=`{$_COOKIE["artica-language"]}` _SESSION=`{$_SESSION["detected_lang"]}` function:" . __FUNCTION__ . " in " . basename(__FILE__) . " line " . __LINE__); } }