|
|
@ -201,7 +201,7 @@ if (isset($_POST["record"]) && !empty($_POST["record"])) { |
|
|
|
|
|
|
|
|
|
|
|
/* print all records, which will be deleted*/ |
|
|
|
/* print all records, which will be deleted*/ |
|
|
|
$STH = $pdo->prepare('SELECT `host`, `base32`, `base64` FROM `hosts` WHERE `host` = ? OR `host` LIKE ?'); |
|
|
|
$STH = $pdo->prepare('SELECT `host`, `base32`, `base64` FROM `hosts` WHERE `host` = ? OR `host` LIKE ?'); |
|
|
|
$STH->execute(['%'.$domain, '%'.$domain]); |
|
|
|
$STH->execute([$domain, '%'.$domain]); |
|
|
|
$hosts = $STH->fetchAll(PDO::FETCH_ASSOC); |
|
|
|
$hosts = $STH->fetchAll(PDO::FETCH_ASSOC); |
|
|
|
foreach ($hosts as $host) { |
|
|
|
foreach ($hosts as $host) { |
|
|
|
$log .= "Host: " . $host['host'] . PHP_EOL . "Base32: " . $host['base32'] . PHP_EOL . "Base64: " . $host['base64'] . PHP_EOL; |
|
|
|
$log .= "Host: " . $host['host'] . PHP_EOL . "Base32: " . $host['base32'] . PHP_EOL . "Base64: " . $host['base64'] . PHP_EOL; |
|
|
@ -210,7 +210,7 @@ if (isset($_POST["record"]) && !empty($_POST["record"])) { |
|
|
|
file_put_contents(__DIR__ . '/../logs/reg.log', $log, FILE_APPEND); |
|
|
|
file_put_contents(__DIR__ . '/../logs/reg.log', $log, FILE_APPEND); |
|
|
|
|
|
|
|
|
|
|
|
/* remove domain and subdomains if any found */ |
|
|
|
/* remove domain and subdomains if any found */ |
|
|
|
$pdo->prepare('DELETE FROM `hosts` WHERE `host` = ? OR `host` LIKE %?')->execute(['%'.$domain, '%'.$domain]); |
|
|
|
$pdo->prepare('DELETE FROM `hosts` WHERE `host` = ? OR `host` LIKE ?')->execute([$domain, '%'.$domain]); |
|
|
|
$result["reregister"] = true; |
|
|
|
$result["reregister"] = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|