list_ip.html 10.0 KB

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