list_web.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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="80px">
  119. <img src="/images/suspend.png" width="7px" height="8px">
  120. <a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
  121. <div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
  122. <p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <b><?php echo "$key" ?></b> domain?</p>
  123. </div>
  124. </td>
  125. <td class="data-controls" width="70px">
  126. <img src="/images/delete.png" width="7px" height="7px">
  127. <a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
  128. <div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
  129. <p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
  130. </div>
  131. </td>
  132. </tr>
  133. </table>
  134. <table class="data-col2" width="830px">
  135. <tr>
  136. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  137. <b><?php echo $key ?></b> <a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td style="vertical-align:top;" >
  142. <table>
  143. <tr>
  144. <td class="counter-name" style="padding: 2px 0 0 2px;">
  145. <?php echo $data[$key]['IP'] ?>
  146. </td>
  147. <tr>
  148. <td class="counter-name" style="padding: 0 0 8px 2px">
  149. [<?php echo $data[$key]['TPL'] ?>] template
  150. </td>
  151. </tr>
  152. <tr>
  153. <td class="chart1" style="padding: 0 0 0 2px">
  154. Bandwidth: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
  155. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  156. <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>
  157. </div>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td class="chart1" style="padding: 0 0 0 2px">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
  162. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  163. <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>
  164. </div>
  165. </td>
  166. </tr>
  167. </table>
  168. </td>
  169. <td style="vertical-align:top;" width="250">
  170. <table>
  171. <tr>
  172. <td class="counter-name">CGI Support:</td>
  173. <td class="counter-value"><?php echo $data[$key]['CGI'] ?></td>
  174. </tr>
  175. <tr>
  176. <td class="counter-name">Error Log:</td>
  177. <td class="counter-value"><?php echo $data[$key]['ELOG'] ?></td>
  178. </tr>
  179. <tr>
  180. <td class="counter-name">Web Statistics:</td>
  181. <td class="counter-value"><?php echo $data[$key]['STATS'] ?></td>
  182. </tr>
  183. <tr>
  184. <td class="counter-name">Statistics Auth:</td>
  185. <td class="counter-value"><?php echo $data[$key]['STATS_AUTH'] ?></td>
  186. </tr>
  187. </table>
  188. </td>
  189. <td rowspan=4 style="vertical-align:top;" width="300">
  190. <table width="300">
  191. <tr>
  192. <td class="counter-name" width="40%">SSL Support:</td>
  193. <td class="counter-value"><?php echo $data[$key]['SSL'] ?></td>
  194. </tr>
  195. <tr>
  196. <td class="counter-name">SSL Home:</td>
  197. <td class="counter-value"><?php echo $ssl_home ?></td>
  198. </tr>
  199. <tr>
  200. <td class="counter-name">Nginx Template:</td>
  201. <td class="counter-value"><?php echo $data[$key]['NGINX'] ?></td>
  202. </tr>
  203. <tr>
  204. <td class="counter-name">Nginx Extentions:</td>
  205. <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
  206. </tr>
  207. </table>
  208. </td>
  209. </tr>
  210. </table>
  211. </td>
  212. </tr>
  213. <?php
  214. }
  215. ?>
  216. </table>
  217. <?php if ($i == 0) echo "<table class=\"data-null\"><tr><td></td></tr></table>"; ?>
  218. <table class="data-count">
  219. <tr>
  220. <td width="160px">
  221. <td>
  222. <?php
  223. if ( $i == 1) {
  224. echo "1 web domain ";
  225. } else {
  226. echo "$i web domains ";
  227. }
  228. ?>
  229. </td>
  230. </tr>
  231. </table>
  232. </form>
  233. <?php if ($i == 0) echo "<table class=\"data-spacer\" style=\"height:300px\"><tr><td></td></tr></table>"; ?>
  234. <?php if ($i == 1) echo "<table class=\"data-spacer\" style=\"height:138px\"><tr><td></td></tr></table>"; ?>