<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####


include_once("auth.php");
$languages = get_langs();

#if (!in_array($language,$languages)) #php4
$in_array = 0;
for ($i=0;$i<count($languages["short"]);$i++)
	{
	 if ($languages["short"][$i] == $language) { $in_array = 1; }
	}

if (!$in_array)
	{
	 $fehlertext = ltext("alsp2_error1");
	 include("allgemein_sprache.php");
	 exit();
	 db_close();
	}

db_connect($db_host, $db_user, $db_pass);
db_query("update admin set language = '$language'");
db_query( "UPDATE anbieter SET language = '$language' WHERE anbieter = 'res0'" );
db_query( "UPDATE kunden SET language = '$language' WHERE kunde = '$user_prefix" . "0'" );
db_query( "UPDATE ftp SET language = '$language' WHERE kunde = '$user_prefix" . "0'" );
db_query( "UPDATE pop3 SET language = '$language' WHERE kunde = '$user_prefix" . "0'" );
$skin *= 1;
if($skin)
{
	db_query("delete from skins where cuser='admin'");
	db_query("insert into skins (cuser, skin_id) VALUES ('admin','$skin')");
}
$oldskins *= 1;
db_query("UPDATE admin SET oldskins='$oldskins'");
db_close();
?>
<script>

<?
$id = db_query("SELECT version FROM custom_skins WHERE id=$skin");
$res = db_fetch_array($id);

if($confixx_interface_version != $res['version'] || $res['version'] == 'classic20'): ?>
top.location.href = 'index.php';
<? else: ?>
top.leftFrame.location.href = 'ver_xp30_frame_left_nav_tree.php?op_block=general&op_item=design_language';
<? endif; ?>

</script>
<?
include("allgemein_sprache.php");
?>
