list_access_key.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. // Prevent resubmit form on page refresh
  3. if (!empty($_POST["ok"])) { ?>
  4. <script>
  5. if (window.history.replaceState) {
  6. window.history.replaceState(null, null, window.location.href);
  7. }
  8. </script>
  9. <?php } ?>
  10. <!-- Begin toolbar -->
  11. <div class="toolbar">
  12. <div class="toolbar-inner">
  13. <div class="toolbar-buttons">
  14. <a class="button button-secondary button-back js-button-back" href="/list/access-key/">
  15. <i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
  16. </a>
  17. </div>
  18. </div>
  19. </div>
  20. <!-- End toolbar -->
  21. <div class="container animate__animated animate__fadeIn">
  22. <form id="main-form">
  23. <div class="form-container">
  24. <h1 class="u-mb20"><?= _("Access Key") ?></h1>
  25. <?php show_alert_message($_SESSION); ?>
  26. <?php if (!empty($key_data["ACCESS_KEY_ID"])) { ?>
  27. <div class="u-mt15 u-mb10">
  28. <label for="access_key_id" class="form-label"><?= _("Access Key ID") ?></label>
  29. <input type="text" class="form-control" id="access_key_id" maxlength="255" readonly value="<?= htmlentities(trim($key_data["ACCESS_KEY_ID"], "'")) ?>">
  30. </div>
  31. <?php } ?>
  32. <?php if (!empty($_SESSION["ok_msg"])) { ?>
  33. <?php if (!empty($key_data["ACCESS_KEY_ID"]) && !empty($key_data["SECRET_ACCESS_KEY"])) { ?>
  34. <div class="u-mb20">
  35. <label for="secret_key" class="form-label">
  36. <?= _("Secret Key") ?><br>
  37. <span class="inline-alert inline-alert-warning u-mb20"><?= _("Warning! Last chance to save secret key!") ?></span>
  38. </label>
  39. <input type="text" class="form-control" id="secret_key" maxlength="255" readonly value="<?= htmlentities(trim($key_data["SECRET_ACCESS_KEY"], "'")) ?>">
  40. </div>
  41. <?php } ?>
  42. <?php } ?>
  43. <p class="u-mb10"><?= _("Permissions") ?></p>
  44. <ul class="u-list-bulleted u-mb10">
  45. <?php foreach ($key_data["PERMISSIONS"] as $api_name) { ?>
  46. <li><?= _($api_name) ?></li>
  47. <?php } ?>
  48. </ul>
  49. <div class="u-mb10">
  50. <label for="service" class="form-label"><?= _("Comment") ?></label>
  51. <input type="text" class="form-control" id="service" maxlength="255" readonly value="<?= htmlentities(trim($key_data["COMMENT"], "'")) ?>">
  52. </div>
  53. </div>
  54. </form>
  55. </div>