True, "nonavbar" => True, "currentapp" => "home", "noapi" => True); include("./inc/functions.inc.php"); include("../header.inc.php"); // Authorize the user to use setup app and load the database // Does not return unless user is authorized if (!$phpgw_setup->auth("Config")){ Header("Location: index.php"); exit; } $phpgw_setup->loaddb(); include($phpgw_info["server"]["api_inc"]."/class.common.inc.php"); $common = new common; $sep = $common->filesystem_separator(); } else { $newinstall = True; $lang_selected["en"] = "en"; $submit = True; } if ($submit) { if (count($lang_selected)) { if ($upgrademethod == "dumpold") { $phpgw_setup->db->query("delete from lang"); //echo "
Test: dumpold"; } while (list($null,$lang) = each($lang_selected)) { $addlang = False; if ($upgrademethod == "addonlynew") { //echo "
Test: addonlynew - select count(*) from lang where lang='$lang'"; $phpgw_setup->db->query("select count(*) from lang where lang='$lang'"); $phpgw_setup->db->next_record(); if ($phpgw_setup->db->f(0) == 0) { //echo "
Test: addonlynew - True"; $addlang = True; } } if (($addlang && $upgrademethod == "addonlynew") || ($upgrademethod != "addonlynew")) { //echo '
Test: loop above file()'; $raw_file = file($phpgw_info["server"]["server_root"] . "/setup/phpgw_" . strtolower($lang) . ".lang"); while (list($null,$line) = each($raw_file)) { $addit = False; list($message_id,$app_name,$phpgw_setup->db_lang,$content) = explode("\t",$line); $message_id = addslashes(chop($message_id)); $app_name = addslashes(chop($app_name)); $phpgw_setup->db_lang = addslashes(chop($phpgw_setup->db_lang)); $content = addslashes(chop($content)); if ($upgrademethod == "addmissing") { //echo "
Test: addmissing"; $phpgw_setup->db->query("select count(*) from lang where message_id='$message_id' and lang='$phpgw_setup->db_lang'"); $phpgw_setup->db->next_record(); if ($phpgw_setup->db->f(0) == 0) { //echo "
Test: addmissing - True - Total: " . $phpgw_setup->db->f(0); $addit = True; } } if ($addit || ($upgrademethod == "dumpold" || $newinstall || $upgrademethod == "addonlynew")) { //echo "
adding - insert into lang values ('$message_id','$app_name','$phpgw_setup->db_lang','$content')"; $phpgw_setup->db->query("insert into lang values ('$message_id','$app_name','$phpgw_setup->db_lang','$content')"); } } } } } if (! $included) { Header("Location: index.php"); exit; } } else { if (! $included) { $phpgw_setup->show_header(); ?>

"> >Select which languages you would like to use.
':""); ?> Select which method of upgrade you would like to do' . '
 Delete all old langagues and install new ones' . '
 Only add new pharses' . '
 only add languages that are not in the database already.' . ''; } ?>
"> Multi-Language support setup
">This program will help you upgrade or installing different languages for phpGroupWare
'; } }