/**
  * @param Domain $domain
  * @return PollTransferResponse 
  */
 public function PollTransfer(Domain $domain)
 {
     $params["domain"] = $this->MakeNameIDNCompatible($domain->GetHostName());
     $response = $this->Request("StatusDomainTransfer", $params);
     if ($response->Succeed) {
         mparse_str(str_replace("\n", "&", $response->Data), $resp);
         $tstatus = trim($resp["property"]["transfer status"][0]);
         if (!$tstatus) {
             if (stripos($response->Data, "[SUCCESSFUL]") !== false) {
                 $tstatus = TRANSFER_STATUS::APPROVED;
             } elseif (stripos($response->Data, "[FAILED]") !== false) {
                 $tstatus = TRANSFER_STATUS::DECLINED;
             } else {
                 $tstatus = TRANSFER_STATUS::PENDING;
             }
         } else {
             if ($tstatus == "SUCCESSFUL") {
                 $tstatus = TRANSFER_STATUS::APPROVED;
             } elseif ($tstatus == "FAILED") {
                 $tstatus = TRANSFER_STATUS::DECLINED;
             } else {
                 $tstatus = TRANSFER_STATUS::PENDING;
             }
         }
         $resp = new PollTransferResponse($status, $response->ErrMsg, $response->Code);
         $resp->HostName = $domain->GetHostName();
         $resp->TransferStatus = $tstatus;
         return $resp;
     } else {
         throw new Exception(sprintf(_("StatusDomainTransfer failed: %s"), $response->ErrMsg));
     }
 }
Example #2
0
		        	{
		        		$smarty_contact['too_many_items'] = true;
		        	}
		            
		            $display["contacts"][] = $smarty_contact;
				}
			}
		}
	}
	
	if ($_POST)
	{
		if ($post_add_data)
		{
			//Parse url encoded extra fields
			mparse_str($post_add_data, $extra_data);
			$post_add_data = $extra_data;
		}
		else
		{
			// Empty extra
			$extra_data = array();
		}
		
		// Merge extra fields with std POST fields
		$extra_data = array_merge($extra_data, $_POST);
		$extra_data = array_map('trim', $extra_data);
		
		$XmlConfig = $Registry->GetManifest()->GetSectionConfig();
		$trnFields = $XmlConfig->domain->transfer->fields;
		if ($trnFields->children())