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

include('auth.php');

db_connect($db_host, $db_user, $db_pass);

$redir = 'allgemein_start.php';

$loUser = new SQLString($PHP_AUTH_USER);

if($_GET['user'] && $_GET['type'])
{
	$loKunde = new SQLString($_GET['user']);

	if($_GET['type'] == USERTYPE_USER)
	{
		$id = safe_query2("SELECT kunde FROM kunden WHERE kunde=? AND anbieter=?", $loKunde, $loUser );
		if(db_num_rows($id))
		{
			addSUser($_GET['user'], '', USERTYPE_USER);
			$redir = '/user/' . $_GET['user'] . '/';
		}
		if(!session_is_registered('_del_settings'))
		{
			session_register('_del_settings');
		}
		$_SESSION['_del_settings'][$_GET['user']] = array('confixx_interface_version' => $confixx_interface_version, 'strSkinName' => $strSkinName, 'shortlang' => $shortlang);
	}

}

db_close();

header('Location: ' . $redir);

?>
