add-subdomain.php 1.0 KB

12345678910111213141516171819
  1. <?php declare(strict_types=1); ?>
  2. <p>
  3. <?= sprintf(_('The subdomain can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters. It can\'t have an hyphen (%3$s) in first, last or both third and fourth position.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>-</code>') ?>
  4. </p>
  5. <form method="post">
  6. <label for="subdomain"><?= _('Subdomain') ?></label><br>
  7. <input required="" placeholder="label" id="subdomain" name="subdomain" type="text"><code>.<?= CONF['ht']['subdomain_domain'] ?></code><br>
  8. <label for="dir"><?= _('Target directory') ?></label><br>
  9. <select required="" name="dir" id="dir">
  10. <option value="" disabled="" selected="">—</option>
  11. <?php
  12. foreach (dirsStatuses('subdomain') as $dir => $alreadyEnabled)
  13. echo ' <option' . ($alreadyEnabled ? ' disabled=""' : '') . ' value="' . $dir . '">' . $dir . '</option>' . LF;
  14. ?>
  15. </select>
  16. <br>
  17. <input type="submit" value="<?= _('Setup access') ?>">
  18. </form>