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

include_once( "../include/class.SQLInteger.php" );
include_once( "../include/class.SQLString.php" );
include_once("auth.php");

db_connect($db_host, $db_user, $db_pass);
$id = safe_query( "select * from users where parent = ?  and kunde = ? ", TRUE, new SQLInteger( $parent ), new SQLString( $PHP_AUTH_USER ) );
if (db_num_rows($id) < 2)	{
$fehlertext = ltext("topwlo_error1");
$ident = $parent;
include("tools_pwschutz_aendern.php");
exit();
				}
$id = safe_query( "select * from pwschutz where ident = ?  and kunde = ? ", TRUE, new SQLInteger( $parent ), new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$pfad = $werte["pfad"];

safe_query( "delete from users where ident = ?  and kunde = ? ", TRUE, new SQLInteger($ident), new SQLString($PHP_AUTH_USER) );
$id = safe_query( "select * from htaccess where pfad = ?  and kunde = ? ", TRUE, new SQLString( $pfad ), new SQLString( $PHP_AUTH_USER ) );
if (db_num_rows($id) < 1)	{
safe_query( "insert into htaccess (pfad, kunde) VALUES (  ? ,  ?  )", TRUE, new SQLString( $pfad ), new SQLString( $PHP_AUTH_USER ) );
				}

safe_query( "update allgemein set htaccess='1'", TRUE );
db_close();

$fehlertitel = ltext("topwlo_errortitle");
$fehlertext = ltext("topwlo_error2");
$ident = $parent;
include("tools_pwschutz_aendern.php");
exit();
?>
