'ISO-8859-15', 'en_US' => 'iso-8859-1', 'en_GB' => 'UTF-8', 'es_ES' => 'iso-8859-1', 'fr_FR' => 'iso-8859-1', 'it_IT' => 'UTF-8', 'nl_NL' => 'ISO-8859-15', 'tr_TR' => 'iso-8859-9', 'zh_CN' => 'GBK'); $charset = $charsets[$_REQUEST['htmllang']]; // Set the site_charset in the conf array Config::set('site_charset',$charsets[$_REQUEST['htmllang']],'1'); /* load_gettext mojo */ load_gettext(); header ("Content-Type: text/html; charset=" . Config::get('site_charset')); require_once 'templates/show_install_config.inc.php'; break; case 'create_account': $results = parse_ini_file($configfile); Config::set_by_array($results,'1'); if (!install_create_account($username,$password)) { require_once Config::get('prefix') . '/templates/show_install_account.inc.php'; break; } if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } else { $http_type = "http://"; } $web_path = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; header ("Location: " . $web_path . "/login.php"); break; case 'show_create_account': $results = parse_ini_file($configfile); /* Make sure we've got a valid config file */ if (!check_config_values($results)) { require_once Config::get('prefix') . '/templates/show_install_config.inc.php'; break; } /* Get the variables for the language */ $htmllang = $_REQUEST['htmllang']; $charset = $_REQUEST['charset']; // Set the lang in the conf array Config::set('lang',$htmllang,'1'); // We need the charset for the different languages $charsets = array('de_DE' => 'ISO-8859-15', 'en_US' => 'iso-8859-1', 'en_GB' => 'UTF-8', 'es_ES' => 'iso-8859-1', 'fr_FR' => 'iso-8859-1', 'it_IT' => 'UTF-8', 'nl_NL' => 'ISO-8859-15', 'tr_TR' => 'iso-8859-9', 'zh_CN' => 'GBK'); $charset = $charsets[$_REQUEST['htmllang']]; // Set the site_charset in the conf array Config::set('site_charset',$charsets[$_REQUEST['htmllang']],'1'); /* load_gettext mojo */ load_gettext(); header ("Content-Type: text/html; charset=" . Config::get('site_charset')); require_once Config::get('prefix') . '/templates/show_install_account.inc.php'; break; case 'init': /* First step of installation */ // Get the language $htmllang = $_POST['htmllang']; // Set the lang in the conf array Config::set('lang',$htmllang,'1'); // We need the charset for the different languages $charsets = array('de_DE' => 'ISO-8859-15', 'en_US' => 'iso-8859-1', 'en_GB' => 'UTF-8', 'es_ES' => 'iso-8859-1', 'fr_FR' => 'iso-8859-1', 'it_IT' => 'UTF-8', 'nl_NL' => 'ISO-8859-15', 'tr_TR' => 'iso-8859-9', 'zh_CN' => 'GBK'); $charset = $charsets[$_POST['htmllang']]; // Set the site_charset in the conf array Config::set('site_charset',$charsets[$_POST['htmllang']],'1'); // Now we make voodoo with the Load gettext mojo load_gettext(); // Page ready :) header ("Content-Type: text/html; charset=$charset"); require_once 'templates/show_install.inc.php'; break; default: /* Do some basic tests here... most common error, no mysql */ if (!function_exists('mysql_query')) { header ("Location: test.php"); } $htmllang = "en_US"; header ("Content-Type: text/html; charset=UTF-8"); /* Show the language options first */ require_once 'templates/show_install_lang.inc.php'; break; } // end action switch ?>