8 if ( !isset($_GET[
'key']) ) trigger_error(
"No key specified", E_USER_ERROR);
10 $sql =
"select `value` from `".TRANSLATION_PAGE_TABLE.
"` where `key` = '".addslashes($_GET[
'key']).
"'";
11 $res = mysql_query($sql,
$app->db());
12 if ( !$res ) trigger_error(mysql_error(
$app->db()), E_USER_ERROR);
13 if ( mysql_num_rows($res) == 0 ) trigger_error(
"Sorry the specified key was invalid.", E_USER_ERROR);
14 list($content) = mysql_fetch_row($res);
15 @mysql_free_result($res);
17 if ( function_exists(
'tidy_parse_string') ){
18 $config = array(
'show-body-only'=>
true,
'output-encoding'=>
'utf8');
20 $html = tidy_repair_string($content, $config,
"utf8");
21 $content = trim($html);
24 df_display(array(
'content'=>$content),
'TranslationPageTemplate.html');