edit_dns_rec.html 9.1 KB

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