edit_dns_rec.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <!-- Begin toolbar -->
  2. <div class="l-center edit">
  3. <div class="l-sort clearfix">
  4. <div class="l-unit-toolbar__buttonstrip">
  5. <a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/dns/?domain=<?=htmlentities(trim($v_domain, "'"))?>&token=<?=$_SESSION['token']?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
  6. </div>
  7. <div class="l-unit-toolbar__buttonstrip float-right">
  8. <a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i><?=_('Save');?></a>
  9. </div>
  10. </div>
  11. </div>
  12. <!-- End toolbar -->
  13. <div class="l-separator"></div>
  14. <div class="l-center animated fadeIn">
  15. <form id="vstobjects" name="v_edit_dns_rec" method="post" class="<?=$v_status?>">
  16. <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
  17. <input type="hidden" name="save" value="save" />
  18. <table class='data'>
  19. <tr class="data-add">
  20. <td class="data-dotted">
  21. <table class="data-col1">
  22. <tr>
  23. <td>
  24. </td>
  25. </tr>
  26. </table>
  27. </td>
  28. <td class="data-dotted">
  29. <table class="data-col2">
  30. <tr>
  31. <td class="step-top">
  32. <span class="page-title"><?=_('Editing DNS Record');?></span>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td>
  37. <?php show_error_panel($_SESSION);?>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="vst-text step-top">
  42. <?=_('Domain');?>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td>
  47. <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
  48. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="vst-text input-label">
  53. <?=_('Record');?>
  54. </td>
  55. </tr>
  56. <tr>
  57. <td>
  58. <input type="text" size="20" class="vst-input" name="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>">
  59. <input type="hidden" name="v_record_id" value="<?=htmlentities($v_record_id)?>">
  60. <small class="hint"></small>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="vst-text input-label">
  65. <?=_('Type');?>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td>
  70. <select class="vst-list" name="v_type">
  71. <option value="A" <?php if ($v_type == 'A') echo selected; ?>>A</option>
  72. <option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option>
  73. <option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option>
  74. <option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option>
  75. <option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option>
  76. <option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option>
  77. <option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option>
  78. <option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option>
  79. <option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option>
  80. <option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option>
  81. <option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option>
  82. <option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option>
  83. <option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option>
  84. <option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option>
  85. </select>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td class="vst-text input-label">
  90. <?=_('IP or Value');?>
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>
  95. <select class="vst-list" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
  96. <option value="">clear</option>
  97. <?php
  98. foreach ($v_ips as $ip => $value) {
  99. $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
  100. echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
  101. }
  102. ?>
  103. </select>
  104. <input type="text" size="20" class="vst-input vst-list-editor" name="v_val" value="<?=htmlentities(trim($v_val, "'"))?>">
  105. </td>
  106. </tr>
  107. <tr>
  108. <td class="vst-text input-label">
  109. <?=_('Priority');?> <span class="optional">(<?=_('optional');?>)</span>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>
  114. <input type="text" size="20" class="vst-input" name="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>">
  115. </td>
  116. </tr>
  117. <tr>
  118. <td class="vst-text input-label">
  119. <?=_('TTL');?> <span class="optional">(<?=_('optional');?>)</span>
  120. </td>
  121. </tr>
  122. <tr>
  123. <td>
  124. <input type="text" size="20" class="vst-input" name="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
  125. </td>
  126. </tr>
  127. <tr>
  128. <td>
  129. <input type="hidden" size="20" class="vst-input" name="v_record_id" value="<?=htmlentities(trim($v_record_id, "'"))?>">
  130. </td>
  131. </tr>
  132. </table>
  133. <table class="data-col2"></table>
  134. </td>
  135. </tr>
  136. </table>
  137. </form>
  138. </div>
  139. <script>
  140. GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>";
  141. </script>