Esempio n. 1
0
         $output = json_encode(array("status" => "error", "msg" => "Missing data for add_record."));
     }
 }
 // Delete Record
 if ($_GET['action'] == 'delete_record') {
     if (!empty($_GET['record_id'])) {
         $response = $PowerDNS->deleteRecord($_GET['record_id']);
         $output = json_encode($response);
     } else {
         $output = json_encode(array("status" => "error", "msg" => "Missing data for delete_record."));
     }
 }
 // Get Domains by SolusVM Container ID
 if ($_GET['action'] == 'get_domains_by_solusvmid') {
     if (!empty($_GET['solusvm_cid'])) {
         $response = $PowerDNS->getDomainsBySolusVMID($_GET['solusvm_cid']);
         $output = json_encode($response);
     } else {
         $output = json_encode(array("status" => "error", "msg" => "Missing data for get_domains_by_solusvmid."));
     }
 }
 // Get Records by Domain ID
 if ($_GET['action'] == 'get_records_by_domain_id') {
     if (!empty($_GET['domain_id'])) {
         $response = $PowerDNS->getRecordsByDomainID($_GET['domain_id']);
         $output = json_encode($response);
     } else {
         $output = json_encode(array("status" => "error", "msg" => "Missing data for get_records_by_domain_id."));
     }
 }
 // Create solusvm_cid Row