if (Is_Error($Result)) { return $Link->GetError(); } #----------------------------------------------------------------------------- $dDomainsOrders = MySQL::Result($Result); if (Is_Error($dDomainsOrders)) { return ERROR | @Trigger_Error(500); } #----------------------------------------------------------------------------- $DomainsOrders = new Tag('DomainsOrders'); #----------------------------------------------------------------------------- foreach ($dDomainsOrders as $dDomainsOrder) { #--------------------------------------------------------------------------- $Domain = $dDomainsOrder['domen']; #--------------------------------------------------------------------------- $DomainOrder = new Tag('DomainOrder', new Tag('CreateDate', $dDomainsOrder['dateorder']), new Tag('ExpirationDate', (string) JulianDayToGregorian($dDomainsOrder['reg'])), new Tag('DomainName', SubStr($Domain, 0, $Index = StrRpos($Domain, '.')))); #--------------------------------------------------------------------------- $Zone = SubStr($Domain, $Index); #--------------------------------------------------------------------------- $Result = $Link->Query(SPrintF("SELECT * FROM `tarifdom` WHERE `name` = '%s'", $Zone)); if (Is_Error($Result)) { return $Link->GetError(); } #--------------------------------------------------------------------------- $dDomainScheme = MySQL::Result($Result); if (Is_Error($dDomainScheme)) { return ERROR | @Trigger_Error(500); } #--------------------------------------------------------------------------- $dDomainScheme = Current($dDomainScheme); #---------------------------------------------------------------------------
#--------------------------------------------------------------------------- $Domain = $dDomainsOrder['domen']; #--------------------------------------------------------------------------- $DomainOrder = new Tag('DomainOrder'); #--------------------------------------------------------------------------- $DomainOrder->AddChild(new Tag('OrderDate', $dDomainsOrder['dateorder'])); $DomainOrder->AddChild(new Tag('ExpirationDate', (string) JulianDayToGregorian($dDomainsOrder['reg']))); #--------------------------------------------------------------------------- $Parse = WhoIs_Parse($Domain); #--------------------------------------------------------------------------- switch (ValueOf($Parse)) { case 'error': return ERROR | @Trigger_Error(500); case 'false': #----------------------------------------------------------------------- $DomainName = SubStr($Domain, 0, $Index = StrRpos($Domain, '.')); $DomainZone = SubStr($Domain, $Index + 1); break; case 'array': #----------------------------------------------------------------------- $DomainName = $Parse['DomainName']; $DomainZone = $Parse['DomainZone']; break; default: return ERROR | @Trigger_Error(101); } #--------------------------------------------------------------------------- $DomainOrder->AddChild(new Tag('DomainName', $DomainName)); #--------------------------------------------------------------------------- $Result = $Link->Query(SPrintF("SELECT * FROM `tarifdom` WHERE `name` = '.%s'", $DomainZone)); if (Is_Error($Result)) {