2021-02-17 21:48:49 +00:00
|
|
|
<?php
|
|
|
|
|
2021-02-18 21:40:16 +00:00
|
|
|
function regListUserDomains($username) {
|
2022-06-11 23:31:16 +00:00
|
|
|
return query('select', 'registry', ['username' => $username], 'domain');
|
2021-02-18 21:40:16 +00:00
|
|
|
}
|
|
|
|
|
2021-02-19 12:23:26 +00:00
|
|
|
function regCheckDomainPossession($domain) {
|
2022-06-15 13:30:18 +00:00
|
|
|
if (in_array($domain, regListUserDomains($_SESSION['username']), true) !== true)
|
2022-05-20 00:19:45 +00:00
|
|
|
userError("You don't own this domain.");
|
2021-02-18 21:40:16 +00:00
|
|
|
}
|
|
|
|
|
2021-02-19 12:23:26 +00:00
|
|
|
function regIsFree($domain) {
|
2022-06-12 01:28:43 +00:00
|
|
|
return empty(query('select', 'registry', ['domain' => $domain], 'domain'));
|
2021-02-17 21:48:49 +00:00
|
|
|
}
|