edit_dns_rec.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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
  38. if (!empty($_SESSION['error_msg'])) {
  39. $msg_icon = 'fa-exclamation-circle status-icon red';
  40. $msg_text = htmlentities($_SESSION['error_msg']);
  41. $msg_id = 'vst-error';
  42. } else {
  43. if (!empty($_SESSION['ok_msg'])) {
  44. $msg_icon = 'fa-check-circle status-icon green';
  45. $msg_text = $_SESSION['ok_msg'];
  46. $msg_id = 'vst-ok';
  47. }
  48. }
  49. ?>
  50. <span class="<?=$msg_id;?>"> <i class="fas <?=$msg_icon;?>"></i> <?=$msg_text;?></span>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="vst-text step-top">
  55. <?=_('Domain');?>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60. <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
  61. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  62. </td>
  63. </tr>
  64. <tr>
  65. <td class="vst-text input-label">
  66. <?=_('Record');?>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>
  71. <input type="text" size="20" class="vst-input" name="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>">
  72. <input type="hidden" name="v_record_id" value="<?=htmlentities($v_record_id)?>">
  73. <small class="hint"></small>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td class="vst-text input-label">
  78. <?=_('Type');?>
  79. </td>
  80. </tr>
  81. <tr>
  82. <td>
  83. <select class="vst-list" name="v_type">
  84. <option value="A" <?php if ($v_type == 'A') echo selected; ?>>A</option>
  85. <option value="AAAA" <?php if ($v_type == 'AAAA') echo selected; ?>>AAAA</option>
  86. <option value="CAA" <?php if ($v_type == 'CAA') echo selected; ?>>CAA</option>
  87. <option value="CNAME" <?php if ($v_type == 'CNAME') echo selected; ?>>CNAME</option>
  88. <option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo selected; ?>>DNSKEY</option>
  89. <option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo selected; ?>>IPSECKEY</option>
  90. <option value="KEY" <?php if ($v_type == 'KEY') echo selected; ?>>KEY</option>
  91. <option value="MX" <?php if ($v_type == 'MX') echo selected; ?>>MX</option>
  92. <option value="NS" <?php if ($v_type == 'NS') echo selected; ?>>NS</option>
  93. <option value="PTR" <?php if ($v_type == 'PTR') echo selected; ?>>PTR</option>
  94. <option value="SPF" <?php if ($v_type == 'SPF') echo selected; ?>>SPF</option>
  95. <option value="SRV" <?php if ($v_type == 'SRV') echo selected; ?>>SRV</option>
  96. <option value="TLSA" <?php if ($v_type == 'TLSA') echo selected; ?>>TLSA</option>
  97. <option value="TXT" <?php if ($v_type == 'TXT') echo selected; ?>>TXT</option>
  98. </select>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td class="vst-text input-label">
  103. <?=_('IP or Value');?>
  104. </td>
  105. </tr>
  106. <tr>
  107. <td>
  108. <select class="vst-list" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
  109. <option value="">clear</option>
  110. <?php
  111. foreach ($v_ips as $ip => $value) {
  112. $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
  113. echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
  114. }
  115. ?>
  116. </select>
  117. <input type="text" size="20" class="vst-input vst-list-editor" name="v_val" value="<?=htmlentities(trim($v_val, "'"))?>">
  118. </td>
  119. </tr>
  120. <tr>
  121. <td class="vst-text input-label">
  122. <?=_('Priority');?> <span class="optional">(<?=_('optional');?>)</span>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td>
  127. <input type="text" size="20" class="vst-input" name="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>">
  128. </td>
  129. </tr>
  130. <tr>
  131. <td class="vst-text input-label">
  132. <?=_('TTL');?> <span class="optional">(<?=_('optional');?>)</span>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td>
  137. <input type="text" size="20" class="vst-input" name="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
  138. </td>
  139. </tr>
  140. <tr>
  141. <td>
  142. <input type="hidden" size="20" class="vst-input" name="v_record_id" value="<?=htmlentities(trim($v_record_id, "'"))?>">
  143. </td>
  144. </tr>
  145. </table>
  146. <table class="data-col2"></table>
  147. </td>
  148. </tr>
  149. </table>
  150. </form>
  151. </div>
  152. <script>
  153. GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>";
  154. </script>