add-subpath.php 976 B

12345678910111213141516171819
  1. <?php declare(strict_types=1); ?>
  2. <p>
  3. <?= sprintf(_('The path can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters.'), '<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="path"><?= _('Path') ?></label><br>
  7. <code>https://<?= CONF['ht']['subpath_domain'] ?>/</code><input required="" pattern="<?= SUBPATH_REGEX ?>" placeholder="path" id="path" name="path" type="text"><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('subpath') 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>