[Adjusted display for DNS fancy records Adrian Georgescu **20080713121004] hunk ./library/ngnpro_client.php 6164 + var $fancy = false; + hunk ./library/ngnpro_client.php 6470 - - Id - Customer - Zone - Record id - Name - Type - Priority - Value - TTL - Change date - Actions - hunk ./library/ngnpro_client.php 6471 + if ($this->fancy) { + print " + + Id + Customer + Zone + Record id + Name + Type + Value + Change date + Actions + + "; + } else { + print " + + Id + Customer + Zone + Record id + Name + Type + Priority + Value + TTL + Change date + Actions + + "; + } hunk ./library/ngnpro_client.php 6556 - $_record_url = $this->url.sprintf("&service=dns_records@%s&zone_filter=%s&id_filter=%s", + $_record_url = $this->url.sprintf("&service=%s@%s&zone_filter=%s&id_filter=%s", + urlencode($this->SoapEngine->service), hunk ./library/ngnpro_client.php 6575 - printf(" - - %s - %s.%s - %s - %s - %s - %s - %s - %s - %s - %s - %s - ", + if ($this->fancy) { hunk ./library/ngnpro_client.php 6577 - $bgcolor, - $index, - $_customer_url, - $record->customer, - $record->reseller, - $_zone_url, - $record->zone, - $_record_url, - $record->id, - $record->name, - $record->type, - $record->priority, - $record->value, - $record->ttl, - $record->changeDate, - $_url, - $actionText - ); + printf(" + + %s + %s.%s + %s + %s + %s + %s + %s + %s + %s + ", + + $bgcolor, + $index, + $_customer_url, + $record->customer, + $record->reseller, + $_zone_url, + $record->zone, + $_record_url, + $record->id, + $record->name, + $record->type, + $record->value, + $record->changeDate, + $_url, + $actionText + ); + } else { + printf(" + + %s + %s.%s + %s + %s + %s + %s + %s + %s + %s + %s + %s + ", + + $bgcolor, + $index, + $_customer_url, + $record->customer, + $record->reseller, + $_zone_url, + $record->zone, + $_record_url, + $record->id, + $record->name, + $record->type, + $record->priority, + $record->value, + $record->ttl, + $record->changeDate, + $_url, + $actionText + ); hunk ./library/ngnpro_client.php 6641 + } hunk ./library/ngnpro_client.php 6792 - hunk ./library/ngnpro_client.php 6793 - printf (" Priority",trim($_REQUEST['priority'])); + + if (!$this->fancy) { + printf (" Priority",trim($_REQUEST['priority'])); + } hunk ./library/ngnpro_client.php 7177 - $result = $this->SoapEngine->soapclient->getRecords($Query); + + // Call function + print "Get $this->getRecordsFunction"; + $result = call_user_func_array(array(&$this->SoapEngine->soapclient,$this->getRecordsFunction),array($Query)); hunk ./library/ngnpro_client.php 7229 + var $fancy = true; + hunk ./library/ngnpro_client.php 7236 + + var $recordTypesTemplate=array(); + + var $Fields=array( + 'type' => array('type'=>'string'), + 'value' => array('type'=>'string') + ); + + hunk ./library/ngnpro_client.php 7248 + var $recordTypes=array('MBOX' => 'Email alias' + ); hunk ./library/ngnpro_client.php 7254 + var $recordTypes=array( + 'URL' => 'URL forwarding' + ); hunk ./library/ngnpro_soap_library.php 928 + } + function &addFancyRecord($record) + { + // record is a ComplexType DnsRecord, + // refer to wsdl for more info + $record = new SOAP_Value('record', '{urn:AGProjects:NGNPro}DnsRecord', $record); + $result = $this->call('addFancyRecord', + $v = array('record' => $record), + array('namespace' => 'urn:AGProjects:NGNPro:Dns', + 'soapaction' => '', + 'style' => 'rpc', + 'use' => 'encoded')); + return $result;