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


include_once("auth.php");



## mysql verbindung aufbauen

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

## /mysql verbindung aufbauen



## Daten aus vorherigem Formular überprüfen

## Eingabevariablen auf Typengültigkeit überprüfen

# checkboxen

if (($maxkundenlimit == "1") && ($maxkunden == "-1"))

        {

         $fehlertext = ltext("anan2_error1");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxkblimit == "1") && ($maxkb == "-1"))

        {

         $fehlertext = ltext("anan2_error2");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxpoplimit == "1") && ($maxpop == "-1"))

        {

         $fehlertext = ltext("anan2_error3");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxemaillimit == "1") && ($maxemail == "-1"))

        {

         $fehlertext = ltext("anan2_error4");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxautoresponderlimit == "1") && ($maxautoresponder == "-1"))

        {

         $fehlertext = ltext("anan2_error5");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxftplimit == "1") && ($maxftp == "-1"))

        {

         $fehlertext = ltext("anan2_error6");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($ftp == 0) && ($maxftp != 0))

        {

         $fehlertext = ltext("anan2_error7");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxdomainslimit == "1") && ($maxdomains == "-1"))

        {

         $fehlertext = ltext("anan2_error8");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($maxsubdomainslimit == "1") && ($maxsubdomains == "-1"))

        {

         $fehlertext = ltext("anan2_error9");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }

if ( $maxwildcardslimit == 1  && $maxwildcards == -1 )
{
    $fehlertext = ltext("anan2_error41");
    db_close();
    include("anbieter_anlegen.php");
    exit();
}

if ( $maxatdomainslimit == 1 && $maxatdomains == -1 )
{
    $fehlertext = ltext("anan2_error42");
    db_close();
    include("anbieter_anlegen.php");
    exit();
}

if (($maxmysqllimit == "1") && ($maxmysql == "-1"))

        {

         $fehlertext = ltext("anan2_error10");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }

if($maxcronjobslimit == "1" && $maxcronjobs == "-1")
{
	$fehlertext = ltext("anan2_error34");
	db_close();
	include("anbieter_anlegen.php");
	exit();
}


if($maxmaillistlimit == "1" && $maxmaillist == "-1")
{
	$fehlertext = ltext("anan2_error37");
	db_close();
	include("anbieter_anlegen.php");
	exit();
}


if (istleer($maxkundenlimit)) { $maxkundenlimit = 0; }

if (istleer($maxkblimit)) { $maxkblimit = 0; }

if (istleer($maxpoplimit)) { $maxpoplimit = 0; }

if (istleer($maxemaillimit)) { $maxemaillimit = 0; }

if (istleer($maxautoresponderlimit)) { $maxautoresponderlimit = 0; }

if (istleer($maxftplimit)) { $maxftplimit = 0; }

if (istleer($maxdomainslimit)) { $maxdomainslimit = 0; }

if (istleer($maxsubdomainslimit)) { $maxsubdomainslimit = 0; }

if (istleer($maxatdomainslimit)) { $maxatdomainslimit = 0; }

if (istleer($maxmysqllimit)) { $maxmysqllimit = 0; }

if (istleer($maxcronjobslimit)) { $maxcronjobslimit = 0; }

if ( !$maxmaillistlimit ) { $maxmaillistlimit = 0; }
if ( !$maxmaillist ) { $maxmaillist = 0; }
if ( !$maxatdomains ) { $maxatdomains = 0; }
if ( !$maxwildcardslimit ) { $maxwildcardslimit = 0; }
if ( !$maxwildcards ) { $maxwildcards = 0; }

# /checkboxen



if (($maxkunden > 32768) || ($maxkunden == 0) || ($maxkunden < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxkunden)))

 {

  $fehlertext = ltext("anan2_error11");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



## muss vor multiplikation mit 1024, fals man z.B. "0.5" angibt ist's nacher ne richtige zahl, bei eingabe nicht

if (!ereg("^(0|-?[1-9][0-9]*)$",$maxkb))

 {

  $fehlertext = ltext("anan2_error12");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }

## /muss...



## MB/GB in KB bei "max. Speicherplatz vom Anbieter" umwandeln

if ($maxkb <> -1) {

$maxkb2 = $maxkb * 1024;

if ($maxkb_mbgb == 'GB') { $maxkb2 = $maxkb2 * 1024; }

} else { $maxkb2 = $maxkb; }

## /MB/GB in KB bei "max. Speicherplatz vom Anbieter" umwandeln



if ((($maxkb2 < 1024) && ($maxkb2 <> -1))|| ($maxkb2 > 2147283647) || ($maxkb2 < -1))

 {

  $fehlertext = ltext("anan2_error13");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxpop > 8388607) || ($maxpop < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxpop)))

 {

  $fehlertext = ltext("anan2_error14");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }

if (($maxemail > 8388607) || ($maxemail < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxemail)))

 {

  $fehlertext = ltext("anan2_error15");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxautoresponder > 8388607) || ($maxautoresponder < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxautoresponder)))

 {

  $fehlertext = ltext("anan2_error16");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



# wenn email < pop dann fehler

if ((($maxemail < $maxpop) && ($maxpop > 0) && ($maxemail <> -1)) || (($maxpop == -1) && ($maxemail <> -1)))

 {

  $fehlertext = ltext("anan2_error17");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }

# /wenn email < pop dann fehler



# wenn email < autoresponder dann fehler

if ((($maxemail < $maxautoresponder) && ($maxautoresponder > 0) && ($maxemail <> -1)) || (($maxautoresponder == -1) && ($maxemail <> -1)))

 {

  $fehlertext = ltext("anan2_error18");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }

# /wenn email < pop dann fehler



if ((($maxdomains < $maxkunden) && ($maxdomains <> "-1")) || (($maxkunden == "-1") && ($maxdomains <> "-1")))

 {

  $fehlertext = ltext("anan2_error19");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxftp > 8388607) || ($maxftp < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxftp)))

 {

  $fehlertext = ltext("anan2_error20");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }





if ( $maxwildcards > 0x7FFFFF || $maxwildcards < -1 || !ereg ( "^(0|-?[1-9][0-9]*)$" , $maxwildcards ) )
{
    $fehlertext = ltext("anan2_error43");
    db_close();
    include("anbieter_anlegen.php");
    exit();
}

if ( $maxatdomains > 0x7FFFFF || $maxatdomains < -1 || !ereg ( "^(0|-?[1-9][0-9]*)$" , $maxatdomains ) )
{
    $fehlertext = ltext("anan2_error44");
    db_close();
    include("anbieter_anlegen.php");
    exit();
}





if (($maxtransfer < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxtransfer)))

 {

  $fehlertext = ltext("anan2_error21");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



## MB/GB in KB bei "max. transfer vom Anbieter" umwandeln

if ($transferkb <> -1) {

$maxtransfer2 = $maxtransfer * 1024;

if ($maxtransfer_mbgb == 'GB') { $maxtransfer2 = $maxtransfer2 * 1024; }

} else { $maxtransfer2 = $transferkb; }

## /MB/GB in KB bei "max. transfer vom Anbieter" umwandeln



if ($maxtransfer2 > 2147283647)

 {

  $fehlertext = ltext("anan2_error22");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxdomains > 8388607) || ($maxdomains < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxdomains)))

 {

  $fehlertext = ltext("anan2_error23");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxsubdomains > 8388607) || ($maxsubdomains < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxsubdomains)))

 {

  $fehlertext = ltext("anan2_error24");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxwildcards > $maxsubdomains) && ($maxsubdomains != -1))

 {

  $fehlertext = ltext("anan2_error26");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($maxmysql > 32767) || ($maxmysql < -1) || (!ereg("^(0|-?[1-9][0-9]*)$",$maxmysql)))

 {

  $fehlertext = ltext("anan2_error27");

  db_close();

  include("anbieter_anlegen.php");

  exit();

 }



if (($shell == 1) && ($ftp == 0)){
  $fehlertext = ltext("anan2_error28");

  db_close();

  include("anbieter_anlegen.php");

  exit();
}



if (($stdcgi == 1) && ($perl != 1))

        {

         $fehlertext = ltext("anan2_error29");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($dbext == 1) && ($maxmysql == 0))

        {

         $fehlertext = ltext("anan2_error30");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }



if (($php == 0) && ($phpupload == 1))

        {

         $fehlertext = ltext("anan2_error31");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }

## Wenn DNR dann muss auch DNS erlaubt sein
if (($dns == 0) && ($dnr == 1))

        {

         $fehlertext = ltext("anan2_error32");

         db_close();

         include("anbieter_anlegen.php");

         exit();

        }

if ($maxcronjobs)
{
	if (!ereg("^(0|-?[1-9][0-9]*)$",$maxcronjobs))
	{
		$fehlertext = ltext("anan2_error33");
		db_close();
		include("anbieter_anlegen.php");
		exit();
	}
}
else
{
	$maxcronjobs=0;
}
if($maxpop == 0) { $spamfilter = 0; }


if ($maxmaillist)
{
	if (!ereg("^(0|-?[1-9][0-9]*)$",$maxmaillist))
	{
		$fehlertext = ltext("anan2_error38");
		db_close();
		include("anbieter_anlegen.php");
		exit();
	}
}
else
{
	$maxmaillist = 0;	
}


## /Wenn DNR dann muss auch DNS erlaubt sein



## /Eingabevariablen auf Typengültigkeit überprüfen


## /Daten aus vorherigem Formular überprüfen

###############################################

?>


<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" HEIGHT="300">

  <TR>

    <td class="titel-3" >

<script>
<?
echo js_f_call_help('anan2_descr1', 'anan2_descr2');
?>
</script>
      <form method="post" action="anbieter_anlegen3.php">

              <? echo ltext("anan2_cell_description"); ?>

              </td>

            <td class="titel-3" >
              <? echo ltext("anan2_cell_input"); ?>
              </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_gender"); ?>
              </td>
            <td  >
              <select name="gender">
               <option value="m" <? if ($gender=="m") { echo selected; } ?>><? echo ltext("anan2_cell_gender1"); ?>
               <option value="f" <? if ($gender=="f") { echo selected; } ?>><? echo ltext("anan2_cell_gender2"); ?>
              </select>    
            </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_firstname"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="firstname" value="<? if (isset($name)) { echo $firstname; } ?>">
            </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_name"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="name" value="<? if (isset($name)) { echo $name; } ?>">
            </td>
          </tr>
          <tr >
            <td   align="right">
              <? echo ltext("anan2_cell_firm"); ?>
              </td>
            <td  >
              <input type="text" name="firma" value="<? if (isset($firma)) { echo $firma; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_address"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="anschrift" value="<? if (isset($anschrift)) { echo $anschrift; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_city"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="ort" value="<? if (isset($ort)) { echo $ort; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_zip"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="plz" value="<? if (isset($plz)) { echo $plz; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_country"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="land" value="<? if (isset($land)) { echo $land; } ?>">
            </td>

          </tr>

          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_tel"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="telefon" value="<? if (isset($telefon)) { echo $telefon; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_fax"); ?>
              </td>
            <td  >
              <input type="text" name="fax" value="<? if (isset($fax)) { echo $fax; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_email"); ?>
              <? if($dnr) echo "<sup>*</sup>";?>
              </td>
            <td  >
              <input type="text" name="emailadresse" value="<? if (isset($emailadresse)) { echo $emailadresse; } ?>">
            </td>
          </tr>
          <tr >
            <td  align="right">
              <? echo ltext("anan2_cell_cid"); ?>
              </td>
            <td  >
              <input type="text" name="kundennummer" value="<? if (isset($kundennummer)) { echo $kundennummer; } ?>">
            </td>
          </tr>

          <tr >

            <td class="titel-3" >
              <? echo ltext("anan2_cell_userdeffields"); ?>
              </td>
            <td class="titel-3" >
              <? echo ltext("anan2_cell_input"); ?>
              </td>
          </tr>

          <tr >

            <td  align="right">

              <input type="text" name="freifeldname1" value="<? if (isset($freifeldname1)) { echo $freifeldname1; } ?>">

            </td>

            <td  >

              <input type="text" name="freifeldwert1" value="<? if (isset($freifeldwert1)) { echo $freifeldwert1; } ?>">

            </td>

          </tr>

          <tr >

            <td  align="right">

              <input type="text" name="freifeldname2" value="<? if (isset($freifeldname2)) { echo $freifeldname2; } ?>">

            </td>

            <td  >

              <input type="text" name="freifeldwert2" value="<? if (isset($freifeldwert2)) { echo $freifeldwert2; } ?>">

            </td>

          </tr>

          <tr >

            <td  align="right">

              <input type="text" name="freifeldname3" value="<? if (isset($freifeldname3)) { echo $freifeldname3; } ?>">

            </td>

            <td  >

              <input type="text" name="freifeldwert3" value="<? if (isset($freifeldwert3)) { echo $freifeldwert3; } ?>">

            </td>

          </tr>

          <tr >

            <td colspan="2" height="49">

              <? echo ltext("anan2_cell_descr1"); ?>

              <input type="radio" name="kundendatenanzeigen" value="1"<? if ($kundendatenanzeigen == "0") { echo ""; } else { echo " checked"; } ?>>

              <b>

              <? echo ltext("g_yes"); ?>

              </b>

              <input type="radio" name="kundendatenanzeigen" value="0"<? if ($kundendatenanzeigen == "0") { echo " checked"; } ?>>

              <b>

              <? echo ltext("g_no"); ?>

              </b></td>

          </tr>

          <tr >

            <td >&nbsp;</td>

            <td  >
            
            <table cellpadding="0" cellspacing="0" border="0">
            <tr>
            <td><input type=image border=0 src="<?=$strSkinName?>/pics/buttons/bt_img_left.gif"></td>
            <td background="<?=$strSkinName?>/pics/buttons/bt_img_middle.jpg"><a href="javascript:doChange()"  class="button-1"><? echo ltext("anan2_button1"); ?></a></td>
            <td><input type=image border=0 src="<?=$strSkinName?>/pics/buttons/bt_changepass.gif"></td>
            </tr>
            </table></a>
            </td>

          </tr>

        </table>

        <input type="hidden" name="maxkundenlimit" value="<? echo $maxkundenlimit; ?>">
        <input type="hidden" name="maxkblimit" value="<? echo $maxkblimit; ?>">
        <input type="hidden" name="maxpoplimit" value="<? echo $maxpoplimit; ?>">
        <input type="hidden" name="maxemaillimit" value="<? echo $maxemaillimit; ?>">
        <input type="hidden" name="maxautoresponderlimit" value="<? echo $maxautoresponderlimit; ?>">
        <input type="hidden" name="maxftplimit" value="<? echo $maxftplimit; ?>">
        <input type="hidden" name="maxsubdomainslimit" value="<? echo $maxsubdomainslimit; ?>">
        <input type="hidden" name="maxdomainslimit" value="<? echo $maxdomainslimit; ?>">
        <input type="hidden" name="maxmysqllimit" value="<? echo $maxmysqllimit; ?>">
        <input type="hidden" name="maxkunden" value="<? echo $maxkunden; ?>">
        <input type="hidden" name="maxkb" value="<? echo $maxkb; ?>">
        <input type="hidden" name="maxkb_mbgb" value="<? echo $maxkb_mbgb; ?>">
        <input type="hidden" name="maxpop" value="<? echo $maxpop; ?>">
        <input type="hidden" name="maxemail" value="<? echo $maxemail; ?>">
        <input type="hidden" name="maxautoresponder" value="<? echo $maxautoresponder; ?>">
        <input type="hidden" name="maxftp" value="<? echo $maxftp; ?>">
        <input type="hidden" name="maxtransfer" value="<? echo $maxtransfer; ?>">
        <input type="hidden" name="maxtransfer_mbgb" value="<? echo $maxtransfer_mbgb; ?>">
        <input type="hidden" name="maxsubdomains" value="<? echo $maxsubdomains; ?>">
        <input type="hidden" name="maxdomains" value="<? echo $maxdomains; ?>">
        <input type="hidden" name="maxwildcards" value="<? echo $maxwildcards; ?>">
        <input type="hidden" name="maxwildcardslimit" value="<? echo $maxwildcardslimit; ?>">
        <input type="hidden" name="maxatdomains" value="<? echo $maxatdomains; ?>">
        <input type="hidden" name="maxatdomainslimit" value="<? echo $maxatdomainslimit; ?>">
        <input type="hidden" name="maxmysql" value="<? echo $maxmysql; ?>">
        <input type="hidden" name="ftp" value="<? echo $ftp; ?>">
        <input type="hidden" name="php" value="<? echo $php; ?>">
        <input type="hidden" name="perl" value="<? echo $perl; ?>">
        <input type="hidden" name="modpython" value="<? echo $modpython; ?>">
        <input type="hidden" name="ssi" value="<? echo $ssi; ?>">
        <input type="hidden" name="ssl" value="<? echo $ssl; ?>">
        <input type="hidden" name="frontpage" value="<? echo $frontpage; ?>">
        <input type="hidden" name="shell" value="<? echo $shell; ?>">
        <input type="hidden" name="scponly" value="<? echo $scponly; ?>">
        <input type="hidden" name="statistik" value="<? echo $statistik; ?>">
        <input type="hidden" name="pwschutz" value="<? echo $pwschutz; ?>">
        <input type="hidden" name="fehlerseiten" value="<? echo $fehlerseiten; ?>">
        <input type="hidden" name="webftp" value="<? echo $webftp; ?>">
        <input type="hidden" name="webmail" value="<? echo $webmail; ?>">
        <input type="hidden" name="stdcgi" value="<? echo $stdcgi; ?>">
        <input type="hidden" name="phpupload" value="<? echo $phpupload; ?>">
        <input type="hidden" name="dirlist" value="<? echo $dirlist; ?>">
        <input type="hidden" name="dbext" value="<? echo $dbext; ?>">
        <input type="hidden" name="wap" value="<? echo $wap; ?>">
        <input type="hidden" name="coldfusion" value="<? echo $coldfusion; ?>">
        <input type="hidden" name="dns" value="<? echo $dns; ?>">
        <input type="hidden" name="dnr" value="<? echo $dnr; ?>">
        <input type="hidden" name="maxcronjobs" value="<? echo $maxcronjobs; ?>">
        <input type="hidden" name="maxcronjobslimit" value="<? echo $maxcronjobslimit; ?>">
        <input type="hidden" name="spamfilter" value="<? echo $spamfilter; ?>">
        <input type="hidden" name="maxmaillist" value="<? echo $maxmaillist; ?>">
        <input type="hidden" name="maxmaillistlimit" value="<? echo $maxmaillistlimit; ?>">

      </form>



</BODY>

</HTML>



<?

db_close();

?>
