list_ip.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <table class="sub-menu" style="background: white;">
  2. <tr>
  3. <td style="padding: 12px 0 8px 6px">
  4. <div style="float:left">
  5. <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/ip/'"> <?php print _('Add IP');?> </button>
  6. </div>
  7. <div style="text-align: right; float: right;">
  8. <form action="/search/" method="get" >
  9. <input type="text" name="q" style="margin: 2px 2px 0px 0px; width: 250px; padding: 3px;" size="30">
  10. <input type="submit" value="<?php print _('Search');?>" class="button" style="font-size: 12px; height: 24px;">
  11. </form>
  12. </div>
  13. <div style="float:left; padding-left: 26px;">
  14. <form action="/bulk/ip/" method="post" id="objects">
  15. <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
  16. <select style="margin:0 2px 0 0px;" name="action">
  17. <option><?php print _('apply to selected');?></option>
  18. <option><?php print _('delete');?></option>
  19. </select>
  20. <input type="submit" name="ok" value="›" class="button" style="width: 37px; font-size: 12px; height: 24px;">
  21. </div>
  22. <?php
  23. if (!empty($_SESSION['error_msg'])) {
  24. ?>
  25. <div>
  26. <script type="text/javascript">
  27. $(function() {
  28. $( "#dialog:ui-dialog" ).dialog( "destroy" );
  29. $( "#dialog-message" ).dialog({
  30. modal: true,
  31. buttons: {
  32. Ok: function() {
  33. $( this ).dialog( "close" );
  34. }
  35. }
  36. });
  37. });
  38. </script>
  39. <div id="dialog-message" title="Error">
  40. <p><?php echo $_SESSION['error_msg'] ?></p>
  41. </div>
  42. </div>
  43. <?php
  44. unset($_SESSION['error_msg']);
  45. }
  46. ?>
  47. </td>
  48. </tr>
  49. </table>
  50. </td>
  51. </tr>
  52. </table>
  53. <div id="vstobjects">
  54. <table class='data'>
  55. <?php
  56. foreach ($data as $key => $value) {
  57. ++$i;
  58. ?>
  59. <tr class="data-row">
  60. <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
  61. <table class="data-col1">
  62. <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="ip[]" value="<?php echo $key ?>"></td></tr>
  63. <tr><td><a class="data-date" title="<?php echo $data[$key]['DATE']." ".$data[$key]['TIME'] ?>"><?php echo strftime("%d %b %Y", strtotime($data[$key]['DATE'])) ?></td></tr>
  64. <tr><td class="data-active"><b><?php print _('active');?></b></td></tr>
  65. </table>
  66. </td>
  67. <td class="data-dotted" width="830px" style="vertical-align:top;">
  68. <a id="delete_link_<?php echo $i ?>" class="data-controls do_delete">
  69. <span class="do_delete">
  70. <img src="/images/delete.png" width="7px" height="7px">
  71. <?php print _('delete');?>
  72. <input type="hidden" name="delete_url" value="/delete/ip/?ip=<?php echo "$key" ?>" />
  73. <div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print _('Confirmation');?>">
  74. <p class="counter-value"><?php print _('IP_DELETE_CONFIRMATION',$key);?></p>
  75. </div>
  76. </span>
  77. </a>
  78. <a href="/edit/ip/?ip=<?php echo $key ?>" class="data-controls">
  79. <span>
  80. <img src="/images/edit.png" width="8px" height="8px">
  81. <?php print _('edit');?>
  82. </span>
  83. </a>
  84. <table class="data-col2" width="830px">
  85. <tr>
  86. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  87. <b><?php echo $key ?></b>
  88. <?php if (!empty($data[$key]['NAT'])) echo ' → <b>' . $data[$key]['NAT'] . '</b>'; ?>
  89. <a class="aliases" style="padding:0 0 0 8px;"><?php echo $data[$key]['NAME'] ?></a>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td style="vertical-align:top;" >
  94. <table>
  95. <tr>
  96. <td class="counter-name" style="padding: 2px 0 0 0">
  97. <?php echo $data[$key]['NETMASK'] ?>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td class="counter-name">
  102. <?php echo $data[$key]['INTERFACE'] ?>
  103. </td>
  104. </tr>
  105. </table>
  106. </td>
  107. <td style="vertical-align:top;" width="250">
  108. <table>
  109. <tr>
  110. <td class="counter-name">
  111. <?php print _('Domains');?>:
  112. </td>
  113. <td>
  114. <a class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?></a>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td class="counter-name">
  119. <?php print _('Status');?>:
  120. </td>
  121. <td>
  122. <a class="counter-value"> <?php echo _($data[$key]['STATUS']) ?></a>
  123. </td>
  124. </tr>
  125. </table>
  126. </td>
  127. <td rowspan=4 style="vertical-align:top;" width="300">
  128. <table>
  129. <tr>
  130. <td class="counter-name" colspan="2" >
  131. <?php print _('Users');?>: <a style="padding: 0 0 0 26" class="nginx-ext"><?php echo str_replace(',', ', ', $data[$key]['U_SYS_USERS']) ?>
  132. </td>
  133. </tr>
  134. </table>
  135. </td>
  136. </tr>
  137. </table>
  138. </td>
  139. </tr>
  140. <?php
  141. }
  142. ?>
  143. </table>
  144. </form>
  145. <table class="data-count">
  146. <tr>
  147. <td width="160px"></td>
  148. <td>
  149. <?php
  150. if ( $i == 1) {
  151. echo _('1 IP address');
  152. } else {
  153. echo _('%s IP addresses',$i);
  154. }
  155. ?>
  156. </td>
  157. </tr>
  158. </table>
  159. </div>