servnest/pg-view/ht/del.php

21 lines
868 B
PHP
Raw Normal View History

2023-07-17 19:15:18 +00:00
<?php declare(strict_types=1); ?>
<form method="post">
<label for="site"><?= _('Access to delete') ?></label><br>
<select required="" name="site" id="site">
2023-01-21 03:16:02 +00:00
<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'] . '">' . ' ' . sprintf(_('%1$s to %2$s'), $url, '/' . $site['site_dir']) . '</option>' . LF;
}
?>
</select>
<br>
<input type="submit" value="<?= _('Delete access') ?>">
</form>