add_dns_rec.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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="javascript:window.history.back();"><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. <form id="vstobjects" name="v_add_dns_rec" method="post">
  15. <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
  16. <input type="hidden" name="ok_rec" value="add" />
  17. <table class="data mode-add">
  18. <tr class="data-add">
  19. <td class="data-dotted">
  20. <table class="data-col1">
  21. <tr><td></td></tr>
  22. </table>
  23. </td>
  24. <td class="data-dotted">
  25. <table class="data-col2" width="600px">
  26. <tr>
  27. <td class="step-top">
  28. <span class="page-title"><?=__('Adding DNS Record')?></span>
  29. </td>
  30. </tr>
  31. <tr>
  32. <td>
  33. <?php
  34. if (!empty($_SESSION['error_msg'])) {
  35. echo "<span class=\"vst-error\"> <i class=\"fas fa-exclamation-circle status-icon red\"></i> ".htmlentities($_SESSION['error_msg'])."</span>";
  36. } else {
  37. if (!empty($_SESSION['ok_msg'])) {
  38. echo "<span class=\"vst-ok\"> <i class=\"fas fa-check-circle status-icon green\"></i> ".$_SESSION['ok_msg']."</span>";
  39. }
  40. }
  41. ?>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="vst-text step-top">
  46. <?php print __('Domain');?>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td>
  51. <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled >
  52. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="vst-text input-label">
  57. <?php print __('Record');?>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>
  62. <input type="text" size="20" class="vst-input" name="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>">
  63. <small class="hint"></small>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td class="vst-text input-label">
  68. <?php print __('Type');?>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>
  73. <select class="vst-list" name="v_type">
  74. <option value="A" <?php if ($v_type == 'A') echo selected; ?>>A</option>
  75. <option value="AAAA" <?php if ($v_type == 'AAAA') echo selected; ?>>AAAA</option>
  76. <option value="NS" <?php if ($v_type == 'NS') echo selected; ?>>NS</option>
  77. <option value="CNAME" <?php if ($v_type == 'CNAME') echo selected; ?>>CNAME</option>
  78. <option value="MX" <?php if ($v_type == 'MX') echo selected; ?>>MX</option>
  79. <option value="TXT" <?php if ($v_type == 'TXT') echo selected; ?>>TXT</option>
  80. <option value="SRV" <?php if ($v_type == 'SRV') echo selected; ?>>SRV</option>
  81. <option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo selected; ?>>DNSKEY</option>
  82. <option value="KEY" <?php if ($v_type == 'KEY') echo selected; ?>>KEY</option>
  83. <option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo selected; ?>>IPSECKEY</option>
  84. <option value="PTR" <?php if ($v_type == 'PTR') echo selected; ?>>PTR</option>
  85. <option value="SPF" <?php if ($v_type == 'SPF') echo selected; ?>>SPF</option>
  86. <option value="TLSA" <?php if ($v_type == 'TLSA') echo selected; ?>>TLSA</option>
  87. <option value="CAA" <?php if ($v_type == 'CAA') echo selected; ?>>CAA</option>
  88. </select>
  89. </td>
  90. </tr>
  91. <tr>
  92. <td class="vst-text input-label">
  93. <?php print __('IP or Value');?>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>
  98. <select class="vst-list" onchange="this.nextElementSibling.value=this.value">
  99. <option value="">clear</option>
  100. <?php
  101. foreach ($v_ips as $ip => $value) {
  102. $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
  103. echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
  104. }
  105. ?>
  106. </select>
  107. <input type="text" size="20" class="vst-input vst-list-editor" name="v_val" value="<?=htmlentities(trim($v_val, "'"))?>">
  108. </td>
  109. </tr>
  110. <tr>
  111. <td class="vst-text input-label">
  112. <?php print __('Priority');?> <span class="optional">(<?php print __('optional');?>)</span>
  113. </td>
  114. </tr>
  115. <tr>
  116. <td>
  117. <input type="text" size="20" class="vst-input" name="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>">
  118. </td>
  119. </tr>
  120. <tr>
  121. <td class="vst-text input-label">
  122. <?php print __('TTL');?> <span class="optional">(<?php print __('optional');?>)</span>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td>
  127. <input type="text" size="20" class="vst-input" name="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
  128. </td>
  129. </tr>
  130. </table>
  131. <table class="data-col2">
  132. </table>
  133. </td>
  134. </tr>
  135. </table>
  136. </form>
  137. </div>
  138. <script>
  139. GLOBAL.DNS_REC_PREFIX = <?=json_encode($_GET['domain'])?>;
  140. </script>