<?
########## 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 lastchange from dns where domain = ? ", TRUE, new SQLString( $domain ) );

$werte = db_fetch_array($id);

$lastchange = $werte["lastchange"];

  $sn_date = substr ($lastchange, 0, 8);
  if($sn_date != date("Ymd")){
      $seriennummer = date("Ymd")."01";
  }else{
      $sn_id = substr ($lastchange, -2)+1;
      if(strlen($sn_id)==1){
         $sn_id="0".$sn_id;
      }
      $seriennummer = date("Ymd").$sn_id;
  }

safe_query( "update dns set zonefile = ? , lastchange = ? , neu= '1' where domain = ? ", TRUE, new SQLString( $zonefile ), new SQLInteger( $seriennummer ), new SQLString( $domain ) );
safe_query( "update allgemein set dns = '1'", TRUE );

db_close();



$fehlertitel = ltext("eihtdoaesp_errortitle");

$fehlertext = ltext("eihtdoaesp_error1");

include("einstellungen_dnsspezial_domain_aendern.php");

?>
