diff --git a/includes/general.php b/includes/general.php index f459793..abc752f 100644 --- a/includes/general.php +++ b/includes/general.php @@ -12,9 +12,6 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more details. */ -// header("Content-Type: text/html; charset=UTF-8"); -// header("Content-Transfer-Encoding: 8bit"); - if($_SERVER[HTTP_HOST] != "www.cacert.org" && $_SERVER[HTTP_HOST] != "secure.cacert.org" && $_SERVER[HTTP_HOST] != "202.87.16.201") { if($_SERVER[HTTPS] == "on") @@ -38,7 +35,8 @@ $_SESSION['_config']['translations'] = array("da_DK" => "Dansk", "de_DE" => "Deutsch", "en_AU" => "English", "es_ES" => "Español", "fr_FR" => "Français", "it_IT" => "Italiano", - "hu_HU" => "Magyar", "nl_NL" => "Nederlands", "pt_PT" => "Português"); + "hu_HU" => "Magyar", "nl_NL" => "Nederlands", "pt_PT" => "Português", + "zh_CN" => "Chinese"); if($_SESSION['_config']['language'] == "") { @@ -92,6 +90,12 @@ } } + if($_SESSION['_config']['language'] == "zh_CN") + { + header("Content-Type: text/html; charset=gb2312"); +// header("Content-Transfer-Encoding: 8bit"); + } + putenv("LANG=".$_SESSION['_config']['language']); setlocale(LC_ALL, $_SESSION['_config']['language']); @@ -115,7 +119,7 @@ function loadem($section = "index") { - if($section != "index" && $section != "account" && $section != "help") + if($section != "index" && $section != "account") { $section = "index"; } @@ -125,15 +129,12 @@ if($section == "index") include_once("/home/cacert/includes/general_stuff.php"); - - if($section == "help") - include_once("/home/cacert/includes/general_stuff.php"); } function includeit($id = "0", $section = "index") { $id = intval($id); - if($section != "index" && $section != "account" && $section != "wot") + if($section != "index" && $section != "account" && $section != "wot" && $section != "help") { $section = "index"; } diff --git a/includes/general_stuff.php b/includes/general_stuff.php index 09ed86a..d54f6b8 100644 --- a/includes/general_stuff.php +++ b/includes/general_stuff.php @@ -60,6 +60,7 @@ google_color_border = "FFFFFF";