edit_dns_rec.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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" title="<?=__('Save')?>" 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. <!-- /.l-separator -->
  13. <div class="l-center animated fadeIn">
  14. <?php
  15. $back = $_SESSION['back'];
  16. if (empty($back)) {
  17. $back = "location.href='/list/dns/?domain=".htmlentities($_GET['domain'])."'";
  18. } else {
  19. $back = "location.href='".$back."'";
  20. }
  21. ?>
  22. <form id="vstobjects" name="v_edit_dns_rec" method="post" class="<?=$v_status?>">
  23. <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
  24. <input type="hidden" name="save" value="save" />
  25. <table class='data'>
  26. <tr class="data-add">
  27. <td class="data-dotted">
  28. <table class="data-col1">
  29. <tr>
  30. <td>
  31. </td>
  32. </tr>
  33. </table>
  34. </td>
  35. <td class="data-dotted">
  36. <table class="data-col2">
  37. <tr>
  38. <td class="step-top">
  39. <span class="page-title"><?=__('Editing DNS Record')?></span>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td>
  44. <?php
  45. if (!empty($_SESSION['error_msg'])) {
  46. echo "<span class=\"vst-error\"> <i class=\"fas fa-exclamation-circle status-icon red\"></i> ".htmlentities($_SESSION['error_msg'])."</span>";
  47. } else {
  48. if (!empty($_SESSION['ok_msg'])) {
  49. echo "<span class=\"vst-ok\"> <i class=\"fas fa-check-circle status-icon green\"></i> ".$_SESSION['ok_msg']."</span>";
  50. }
  51. }
  52. ?>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="vst-text step-top">
  57. <?=__('Domain');?>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>
  62. <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled >
  63. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  64. </td>
  65. </tr>
  66. <tr>
  67. <td class="vst-text input-label">
  68. <?php print __('Record');?>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>
  73. <input type="text" size="20" class="vst-input" name="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>">
  74. <input type="hidden" name="v_record_id" value="<?=htmlentities($v_record_id)?>">
  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="NS" <?php if ($v_type == 'NS') echo selected; ?>>NS</option>
  88. <option value="CNAME" <?php if ($v_type == 'CNAME') echo selected; ?>>CNAME</option>
  89. <option value="MX" <?php if ($v_type == 'MX') echo selected; ?>>MX</option>
  90. <option value="TXT" <?php if ($v_type == 'TXT') echo selected; ?>>TXT</option>
  91. <option value="SRV" <?php if ($v_type == 'SRV') echo selected; ?>>SRV</option>
  92. <option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo selected; ?>>DNSKEY</option>
  93. <option value="KEY" <?php if ($v_type == 'KEY') echo selected; ?>>KEY</option>
  94. <option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo selected; ?>>IPSECKEY</option>
  95. <option value="PTR" <?php if ($v_type == 'PTR') echo selected; ?>>PTR</option>
  96. <option value="SPF" <?php if ($v_type == 'SPF') echo selected; ?>>SPF</option>
  97. <option value="TLSA" <?php if ($v_type == 'TLSA') echo selected; ?>>TLSA</option>
  98. <option value="CAA" <?php if ($v_type == 'CAA') echo selected; ?>>CAA</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" 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 class="vst-text input-label">
  143. <?php print __('Record Number');?> <span class="optional">(<?=__('internal');?>)</span>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td>
  148. <input type="text" size="20" class="vst-input" name="v_record_id" value="<?=htmlentities(trim($v_record_id, "'"))?>">
  149. </td>
  150. </tr>
  151. </table>
  152. <table class="data-col2">
  153. </table>
  154. </td>
  155. </tr>
  156. </table>
  157. </form>
  158. </div>