15 lines
407 B
PHP
15 lines
407 B
PHP
<?php
|
|
|
|
function regListUserDomains($username) {
|
|
return query('select', 'registry', ['username' => $username], 'domain');
|
|
}
|
|
|
|
function regCheckDomainPossession($domain) {
|
|
if (in_array($domain, regListUserDomains($_SESSION['username']), true) !== true)
|
|
userError("You don't own this domain.");
|
|
}
|
|
|
|
function regIsFree($domain) {
|
|
return empty(query('select', 'registry', ['domain' => $domain], 'domain'));
|
|
}
|