<?
########## 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");

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

$id = safe_query( "select * from admin", TRUE );

$werte = db_fetch_array($id);

$skmysql = $werte["mysql"];

$stdip = $werte["standardip"];

$quota = $werte["quota"];

?>

<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();
}
function doChange1()
{
document.forms[1].submit();
}
</script>
<table class="tblbgcolor" align="left" border="0" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<script>
<?
echo js_f_call_help('eiipau_title1', 'eiipau_descr1');
?>
</script>

  <TR>

    <TD width=430>

      <?

$id = safe_query( "select lokaleips from admin", TRUE );

$werte = db_fetch_array($id);

$iparray = explode(":", $werte["lokaleips"]);

$uhrzeit = date($lang_format_datetime_long, $iparray[0]);

?>

      <form method="get" action="einstellungen_ip_auto2.php">

        <b>
        <? echo ltext("eiipau_title1"); ?>

        <? echo $uhrzeit; ?>

        </b><br>

<table class="tblbgcolor" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
          <tr >

            <td class="titel-3" >
              <? echo ltext("eiipau_cell_title1"); ?>

              </td>

            <td class="titel-3" >
              <? echo ltext("eiipau_cell_selection"); ?>

              </td>

          </tr>

          <?



## installierte ips bekommen

$id = safe_query( "select ip from ipadressen", TRUE );

while ($werte = db_fetch_array($id))        {

$installierteips[] = $werte["ip"];

                                                                                }



## herausfinden welche ips eingerichtet aber nicht auf dem server sind

for ($i = 0;$i < count($installierteips);$i++)

        {

         $inst = "nein";

         for ($n = 0;$n < count($iparray);$n++)

                {

                 if ($iparray[$n] == $installierteips[$i])

                        {

                         $inst = "ja";

                        }

                }

         if ($inst == "nein")

                {

                 $nichtinstallierteips[] = $installierteips[$i];

                }

        }

## //





for ($i = 0; $i < count($nichtinstallierteips); $i++)

        {

         $iparray[] = $nichtinstallierteips[$i];

        }



for ($i = 1;$i < count($iparray);$i++)        {

$ip = $iparray[$i];

if ($ip != $stdip)        {

## checken ob schon eingerichtet

$ident = safe_query( "select * from ipadressen where ip = ? ", TRUE, new SQLString( $ip ) );

if (db_num_rows($ident) < 1)

        {

         $value = "";

        } else

        {

         $value = " checked";

        }

?>

          <tr >

            <td >

              <? echo $ip; ?>

              </td>

            <td  >

              <input type="checkbox" name="neueips[]" value="<? echo $ip; ?>"<? echo $value; ?>>

            </td>

          </tr>

          <? }

                  }

?>

          <tr >

            <td><? echo std_button(ltext("eiipau_button1"), "javascript:doChange()"); ?></td>
            <td>&nbsp;</td>

          </tr>

        </table>
      </form>

      <form action="einstellungen_ip_autoupd.php" method="post">
      <input type=hidden name=none value=none>

        <table  border="0" cellspacing="0" cellpadding="2" bordercolorlight="<? echo $color_dark_grey; ?>" bordercolordark="#FFFFFF">

          <tr >
            <td><? echo std_button(ltext("eiipau_button2"), "javascript:doChange1()"); ?></td>
          </tr>

        </table>

      </form>

    </TD>

  </TR>

</TABLE>

</TABLE>
</BODY>

</HTML>



<?

db_close();

?>
