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

include_once( "../include/class.SQLString.php" );
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);
safe_query( "update kunden set language = ?  where kunde = ? ", TRUE, new SQLString( $language ), new SQLString( $PHP_AUTH_USER ) );
db_close();

?>
<script>

<?
if($confixx_interface_version == 'classic20'): ?>
top.location.href = 'index.php';
<? else: ?>
top.leftFrame.location.href = 'ver_xp30_frame_left_nav_tree.php?op_block=general&op_item=select_language';
<? endif; ?>

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