mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-10 16:58:34 +02:00
Fixed whois and rdap status display
This commit is contained in:
parent
8dcbaed649
commit
c5cb152f6e
2 changed files with 34 additions and 0 deletions
|
@ -350,6 +350,16 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) {
|
||||||
$stmt2->execute();
|
$stmt2->execute();
|
||||||
$statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0);
|
$statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||||
|
|
||||||
|
// Add rgpstatus to statuses if it's not empty
|
||||||
|
if (!empty($domainDetails['rgpstatus'])) {
|
||||||
|
$statuses[] = $domainDetails['rgpstatus'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// If statuses array is empty, add 'ok' to it
|
||||||
|
if (empty($statuses)) {
|
||||||
|
$statuses[] = 'ok';
|
||||||
|
}
|
||||||
|
|
||||||
// Query: Get DNSSEC details
|
// Query: Get DNSSEC details
|
||||||
$stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id");
|
$stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id");
|
||||||
$stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT);
|
$stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT);
|
||||||
|
@ -1570,6 +1580,16 @@ function handleDomainSearchQuery($request, $response, $pdo, $searchPattern, $c,
|
||||||
$stmt2->execute();
|
$stmt2->execute();
|
||||||
$statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0);
|
$statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||||
|
|
||||||
|
// Add rgpstatus to statuses if it's not empty
|
||||||
|
if (!empty($domainDetails['rgpstatus'])) {
|
||||||
|
$statuses[] = $domainDetails['rgpstatus'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// If statuses array is empty, add 'ok' to it
|
||||||
|
if (empty($statuses)) {
|
||||||
|
$statuses[] = 'ok';
|
||||||
|
}
|
||||||
|
|
||||||
// Query: Get DNSSEC details
|
// Query: Get DNSSEC details
|
||||||
$stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id");
|
$stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id");
|
||||||
$stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT);
|
$stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT);
|
||||||
|
|
|
@ -171,8 +171,22 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool
|
||||||
$stmt4->bindParam(':domain_id', $f['id'], PDO::PARAM_INT);
|
$stmt4->bindParam(':domain_id', $f['id'], PDO::PARAM_INT);
|
||||||
$stmt4->execute();
|
$stmt4->execute();
|
||||||
|
|
||||||
|
$statusFound = false;
|
||||||
|
|
||||||
while ($f2 = $stmt4->fetch(PDO::FETCH_ASSOC)) {
|
while ($f2 = $stmt4->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$res .= "\nDomain Status: " . $f2['status'] . " https://icann.org/epp#" . $f2['status'];
|
$res .= "\nDomain Status: " . $f2['status'] . " https://icann.org/epp#" . $f2['status'];
|
||||||
|
$statusFound = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for additional statuses
|
||||||
|
if (!empty($f['rgpstatus'])) {
|
||||||
|
$res .= "\nDomain Status: " . $f['rgpstatus'] . " https://icann.org/epp#" . $f['rgpstatus'];
|
||||||
|
$statusFound = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no status is found, default to 'ok'
|
||||||
|
if (!$statusFound) {
|
||||||
|
$res .= "\nDomain Status: ok https://icann.org/epp#ok";
|
||||||
}
|
}
|
||||||
|
|
||||||
$query5 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email
|
$query5 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email
|
||||||
|
|
Loading…
Add table
Reference in a new issue