1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php declare(strict_types=1); ?>
- <form method="post">
- <input type="radio" name="print" id="table" value="table" checked="">
- <label for="table"><?= _('Records table') ?></label>
- <br>
- <input type="radio" name="print" id="ds" value="ds">
- <label for="ds"><?= _('DS record') ?></label>
- <br>
- <input type="radio" name="print" id="raw" value="raw">
- <label for="raw"><?= _('Raw zonefile') ?></label>
- <br>
- <label for="zone"><?= _('Selected zone') ?></label>
- <select required="" name="zone" id="zone">
- <option value="" disabled="" selected="">-</option>
- <?php
- foreach (nsListUserZones() as $zone)
- echo ' <option value="' . $zone . '">' . $zone . '</option>' . LF;
- ?>
- </select>
- <br>
- <input type="submit" value="<?= _('Display') ?>">
- </form>
- <?php
- if (isset($data['zone-raw']))
- echo '<pre>' . htmlspecialchars($data['zone-raw']) . '</pre>';
- if (isset($data['zone-table'])) { ?>
- <table class="zone">
- <tr>
- <th><?= _('Domain') ?></th>
- <th><?= _('TTL') ?></th>
- <th><?= _('Type') ?></th>
- <th><?= _('Value') ?></th>
- </tr>
- <?php
- foreach ($data['zone-table'] as $zone_line) {
- echo ' <tr>' . LF;
- foreach ($zone_line as $element)
- echo ' <td><code>' . htmlspecialchars($element) . '</code></td>' . LF;
- echo ' </tr>' . LF;
- }
- }
- ?>
- </table>
- <?php
- if (isset($data['zone-ds'])) { ?>
- <dl>
- <dt><?= _('Zone') ?></dt>
- <dd>
- <code><?= $_POST['zone'] ?></code>
- </dd>
- <dt><?= _('Tag') ?></dt>
- <dd>
- <code><?= $data['zone-ds']['tag'] ?></code>
- </dd>
- <dt><?= _('Algorithm') ?></dt>
- <dd>
- <code><?= $data['zone-ds']['algo'] ?></code><?= ($data['zone-ds']['algo'] === '15') ? ' (Ed25519)' : '' ?>
- </dd>
- <dt><?= _('Digest type') ?></dt>
- <dd>
- <code><?= $data['zone-ds']['digest_type'] ?></code><?= ($data['zone-ds']['digest_type'] === '2') ? ' (SHA-256)' : '' ?>
- </dd>
- <dt><?= _('Digest') ?></dt>
- <dd>
- <code><?= $data['zone-ds']['digest'] ?></code>
- </dd>
- </dl>
- <?php
- }
|