servnest/pg-view/ht/del.php
2023-01-21 04:16:02 +01:00

19 lines
807 B
PHP

<form method="post">
<label for="site"><?= _('Access to delete') ?></label><br>
<select required="" name="site" id="site">
<option value="" disabled="" selected="">—</option>
<?php
foreach (query('select', 'sites', ['username' => $_SESSION['id'] ?? '']) as $site) {
$url = match ($site['type']) {
'subpath' => 'https://' . CONF['ht']['subpath_domain'] . '/' . $site['address'] . '/',
'subdomain' => 'https://' . $site['address'] . '.' . CONF['ht']['subdomain_domain'] . '/',
'onion' => 'http://' . $site['address'] . '/',
'dns' => 'https://' . $site['address'] . '/',
};
echo ' <option value="' . $site['type'] . ':' . $site['address'] . '">' . $url . ' vers /' . $site['site_dir'] . '</option>' . LF;
}
?>
</select>
<br>
<input type="submit" value="<?= _('Delete access') ?>">
</form>