list_access_key.php 2.2 KB

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