list_web.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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. $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
  64. modal: true,
  65. autoOpen: false,
  66. width: 360,
  67. buttons: {
  68. "Ok": function(event, ui) {
  69. location.href = '/<?php echo $spnd_action ?>/web/?domain=<?php echo "$key" ?>';
  70. },
  71. "Cancel": function() {
  72. $(this).dialog("close");
  73. }
  74. }
  75. });
  76. $('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
  77. $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
  78. return false;
  79. });
  80. $('#delete_dialog_<?php echo "$i" ?>').dialog({
  81. modal: true,
  82. autoOpen: false,
  83. width: 360,
  84. buttons: {
  85. "Ok": function(event, ui) {
  86. location.href = '/delete/web/?domain=<?php echo "$key" ?>';
  87. },
  88. "Cancel": function() {
  89. $(this).dialog("close");
  90. }
  91. }
  92. });
  93. $('#delete_link_<?php echo "$i" ?>').click(function(){
  94. $('#delete_dialog_<?php echo "$i" ?>').dialog('open');
  95. return false;
  96. });
  97. });
  98. </script>
  99. <tr class="data-row">
  100. <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
  101. <table class="data-col1">
  102. <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="domain" value="<?php echo "$key" ?>" ></td></tr>
  103. <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>
  104. <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
  105. </table>
  106. </td>
  107. <td class="data-dotted" width="830px" style="vertical-align:top;">
  108. <table width="830px">
  109. <tr>
  110. <td></td>
  111. <?php
  112. if (!empty($data[$key]['STATS'])) {
  113. echo ' <td class="data-controls" width="114px"><img src="/images/new_window.png" width="8px" height="8px">';
  114. echo "<a href='http://".$key."/vstats/' target='_blank'> open webstats </a></td>";
  115. }
  116. ?>
  117. <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>
  118. <td class="data-controls" width="70px">
  119. <img src="/images/delete.png" width="7px" height="7px">
  120. <a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
  121. <div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
  122. <p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
  123. </div>
  124. </td>
  125. </tr>
  126. </table>
  127. <table class="data-col2" width="830px">
  128. <tr>
  129. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  130. <b><?php echo $key ?></b> <a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td style="vertical-align:top;" >
  135. <table>
  136. <tr>
  137. <td class="counter-name" style="padding: 2px 0 0 2px;">
  138. <?php echo $data[$key]['IP'] ?>
  139. </td>
  140. <tr>
  141. <td class="counter-name" style="padding: 0 0 8px 2px">
  142. [<?php echo $data[$key]['TPL'] ?>] template
  143. </td>
  144. </tr>
  145. <tr>
  146. <td class="chart1" style="padding: 0 0 0 2px">
  147. Bandwidth: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
  148. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  149. <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>
  150. </div>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td class="chart1" style="padding: 0 0 0 2px">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
  155. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  156. <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>
  157. </div>
  158. </td>
  159. </tr>
  160. </table>
  161. </td>
  162. <td style="vertical-align:top;" width="250">
  163. <table>
  164. <tr>
  165. <td class="counter-name">CGI Support:</td>
  166. <td class="counter-value"><?php echo $data[$key]['CGI'] ?></td>
  167. </tr>
  168. <tr>
  169. <td class="counter-name">Error Log:</td>
  170. <td class="counter-value"><?php echo $data[$key]['ELOG'] ?></td>
  171. </tr>
  172. <tr>
  173. <td class="counter-name">Web Statistics:</td>
  174. <td class="counter-value"><?php echo $data[$key]['STATS'] ?></td>
  175. </tr>
  176. <tr>
  177. <td class="counter-name">Statistics Auth:</td>
  178. <td class="counter-value"><?php echo $data[$key]['STATS_AUTH'] ?></td>
  179. </tr>
  180. </table>
  181. </td>
  182. <td rowspan=4 style="vertical-align:top;" width="300">
  183. <table width="300">
  184. <tr>
  185. <td class="counter-name" width="40%">SSL Support:</td>
  186. <td class="counter-value"><?php echo $data[$key]['SSL'] ?></td>
  187. </tr>
  188. <tr>
  189. <td class="counter-name">SSL Home:</td>
  190. <td class="counter-value"><?php echo $ssl_home ?></td>
  191. </tr>
  192. <tr>
  193. <td class="counter-name">Nginx Template:</td>
  194. <td class="counter-value"><?php echo $data[$key]['NGINX'] ?></td>
  195. </tr>
  196. <tr>
  197. <td class="counter-name">Nginx Extentions:</td>
  198. <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
  199. </tr>
  200. </table>
  201. </td>
  202. </tr>
  203. </table>
  204. </td>
  205. </tr>
  206. <?php
  207. }
  208. ?>
  209. </table>
  210. <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
  211. <table class="data-count">
  212. <tr>
  213. <td width="160px">
  214. <td>
  215. <?php
  216. if ( $i == 1) {
  217. echo "1 web domain ";
  218. } else {
  219. echo "$i web domains ";
  220. }
  221. ?>
  222. </td>
  223. </tr>
  224. </table>
  225. </form>
  226. <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:279px\"><tr><td></td></tr></table>"; ?>
  227. <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:138px\"><tr><td></td></tr></table>"; ?>