list_web.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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/web/'"> Add Domain </button>
  6. </div>
  7. <div style="text-align: right; float: right;">
  8. <input type="text" size="30" style="padding: 3px 80px 3px 0; margin: 0 2px 0 0;">
  9. <button> Search </button>
  10. </div>
  11. <div style="float:left; padding-left: 26px;">
  12. <a style="padding: 0 4px 0 12px" class="select-controls" href='javascript:checkedAll("vstobjects");'> toggle all </a>
  13. <select style="margin:0 2px 0 0px;" >
  14. <option>apply to selected</option>
  15. <option>rebuild</option>
  16. <option>update counters</option>
  17. <option>suspend</option>
  18. <option>unsuspend</option>
  19. <option>delete</option>
  20. </select>
  21. <button style="width:27px;"> › </button>
  22. </div>
  23. </td>
  24. </tr>
  25. </table>
  26. </td>
  27. </tr>
  28. </table>
  29. <form id="vstobjects">
  30. <table class='data'>
  31. <?php
  32. foreach ($data as $key => $value) {
  33. ++$i;
  34. if ($data[$key]['SUSPENDED'] == 'yes') {
  35. $status = 'suspended';
  36. $spnd_action = 'unsuspend' ;
  37. } else {
  38. $status = 'active';
  39. $spnd_action = 'suspend' ;
  40. }
  41. if (!empty($data[$key]['SSL_HOME'])) {
  42. if ($data[$key]['SSL_HOME'] == 'same') {
  43. $ssl_home = 'public_html';
  44. } else {
  45. $ssl_home = 'public_shtml';
  46. }
  47. } else {
  48. $ssl_home = '';
  49. }
  50. if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
  51. $nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
  52. $nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
  53. $nginx_ext = trim($nginx_ext, ",");
  54. $nginx_ext = str_replace(',', ', ', $nginx_ext);
  55. $nginx_ext = $nginx_ext.", ...";
  56. } else {
  57. $nginx_ext_title = '';
  58. $nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
  59. }
  60. ?>
  61. <script type="text/javascript">
  62. $(function(){
  63. $('#delete_dialog_<?php echo "$i" ?>').dialog({
  64. modal: true,
  65. autoOpen: false,
  66. width: 360,
  67. buttons: {
  68. "Ok": function(event, ui) {
  69. location.href = '/delete/web/?domain=<?php echo "$key" ?>';
  70. },
  71. "Cancel": function() {
  72. $(this).dialog("close");
  73. }
  74. }
  75. });
  76. $('#delete_link_<?php echo "$i" ?>').click(function(){
  77. $('#delete_dialog_<?php echo "$i" ?>').dialog('open');
  78. return false;
  79. });
  80. });
  81. </script>
  82. <tr class="data-row">
  83. <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
  84. <table class="data-col1">
  85. <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="domain" value="<?php echo "$key" ?>" ></td></tr>
  86. <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>
  87. <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
  88. </table>
  89. </td>
  90. <td class="data-dotted" width="830px" style="vertical-align:top;">
  91. <table width="830px">
  92. <tr>
  93. <td></td>
  94. <?php
  95. if (!empty($data[$key]['STATS'])) {
  96. echo ' <td class="data-controls" width="114px"><img src="/images/new_window.png" width="8px" height="8px">';
  97. echo "<a href='http://".$key."/vstats/' target='_blank'> open webstats </a></td>";
  98. }
  99. ?>
  100. <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/web/?domain=<?php echo "$key" ?>"> edit</a></td>
  101. <td class="data-controls" width="70px">
  102. <img src="/images/delete.png" width="7px" height="7px">
  103. <a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
  104. <div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
  105. <p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
  106. </div>
  107. </td>
  108. </tr>
  109. </table>
  110. <table class="data-col2" width="830px">
  111. <tr>
  112. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  113. <b><?php echo $key ?></b> <a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td style="vertical-align:top;" >
  118. <table>
  119. <tr>
  120. <td class="counter-name" style="padding: 2px 0 0 2px;">
  121. <?php echo $data[$key]['IP'] ?>
  122. </td>
  123. <tr>
  124. <td class="counter-name" style="padding: 0 0 8px 2px">
  125. [<?php echo $data[$key]['TPL'] ?>] template
  126. </td>
  127. </tr>
  128. <tr>
  129. <td class="chart1" style="padding: 0 0 0 2px">
  130. Bandwidth: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
  131. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  132. <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
  133. </div>
  134. </td>
  135. </tr>
  136. <tr>
  137. <td class="chart1" style="padding: 0 0 0 2px">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
  138. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  139. <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
  140. </div>
  141. </td>
  142. </tr>
  143. </table>
  144. </td>
  145. <td style="vertical-align:top;" width="250">
  146. <table>
  147. <tr>
  148. <td class="counter-name">CGI Support:</td>
  149. <td class="counter-value"><?php echo $data[$key]['CGI'] ?></td>
  150. </tr>
  151. <tr>
  152. <td class="counter-name">Error Log:</td>
  153. <td class="counter-value"><?php echo $data[$key]['ELOG'] ?></td>
  154. </tr>
  155. <tr>
  156. <td class="counter-name">Web Statistics:</td>
  157. <td class="counter-value"><?php echo $data[$key]['STATS'] ?></td>
  158. </tr>
  159. <tr>
  160. <td class="counter-name">Statistics Auth:</td>
  161. <td class="counter-value"><?php echo $data[$key]['STATS_AUTH'] ?></td>
  162. </tr>
  163. </table>
  164. </td>
  165. <td rowspan=4 style="vertical-align:top;" width="300">
  166. <table width="300">
  167. <tr>
  168. <td class="counter-name" width="40%">SSL Support:</td>
  169. <td class="counter-value"><?php echo $data[$key]['SSL'] ?></td>
  170. </tr>
  171. <tr>
  172. <td class="counter-name">SSL Home:</td>
  173. <td class="counter-value"><?php echo $ssl_home ?></td>
  174. </tr>
  175. <tr>
  176. <td class="counter-name">Nginx Template:</td>
  177. <td class="counter-value"><?php echo $data[$key]['NGINX'] ?></td>
  178. </tr>
  179. <tr>
  180. <td class="counter-name">Nginx Extentions:</td>
  181. <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
  182. </tr>
  183. </table>
  184. </td>
  185. </tr>
  186. </table>
  187. </td>
  188. </tr>
  189. <?php
  190. }
  191. ?>
  192. </table>
  193. <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
  194. <table class="data-count">
  195. <tr>
  196. <td width="160px">
  197. <td>
  198. <?php
  199. if ( $i == 1) {
  200. echo "1 web domain ";
  201. } else {
  202. echo "$i web domains ";
  203. }
  204. ?>
  205. </td>
  206. </tr>
  207. </table>
  208. </form>
  209. <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:300px\"><tr><td></td></tr></table>"; ?>
  210. <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:138px\"><tr><td></td></tr></table>"; ?>