<?
########## 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 admin", TRUE );
$werte = db_fetch_array($id);
$skmysql = $werte["mysql"];
$quota = $werte["quota"];

$id = safe_query( "select * from ipadressen where ip = ? ", TRUE, new SQLString( $ip ) );
$werte = db_fetch_array($id);
$kunde = $werte["kunde"];
$anbieter = $werte["anbieter"];
if ((istleer($anbieter)) && (istleer($kunde))) {
safe_query( "delete from ipadressen where ip = ? ", TRUE, new SQLString($ip) );
$fehlertitel = ltext("eiiplo_errortitle");
$fehlertext = ltext("eiiplo_error1");
db_close();
include("einstellungen_ip.php");
exit();
					} else	{
if ((istleer($kunde)) && ($wirklich != "ja")) {

## wirklich löschen?
?>
<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>

<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<br><? include("../fehler.inc.php"); ?>
<script>
function doChange()
{
document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>

<script>
<?
echo js_f_call_help('', 'eiiplo_title1');
?>
</script>

    <TD><? echo ltext("eiiplo_descr1",array($ip)); ?><br><br>
      <form action="einstellungen_ip_loeschen.php" method="post">
      <? echo std_button(ltext("eiiplo_button1"), "javascript:doChange()"); ?>
        <input type="hidden" name="ip" value="<? echo $ip ?>">
        <input type="hidden" name="wirklich" value="ja">
      </form>
    </TD>
  </TR>
</TABLE>
</BODY>
</HTML>

<?
} else {
if ($wirklich == "ja") {

## löschen
safe_query( "delete from ipadressen where ip = ? ", TRUE, new SQLString($ip) );
$timestamp = time();
safe_query( "insert into billing_del ( date, kunde, anbieter, type, item ) VALUES (  ? ,  '',  ? ,  'ip',  ?  )", TRUE, new SQLInteger( $timestamp ), new SQLString( $anbieter ), new SQLString( $ip ) );
$fehlertitel = ltext("eiiplo_errortitle");
$fehlertext = ltext("eiiplo_error1");
db_close();
include("einstellungen_ip.php");
exit();

} else {
$fehlertext = ltext("eiiplo_error2");
db_close();
include("einstellungen_ip.php");
exit();
}
}
						}
?>
