list_web.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. <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" value="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/web/" 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>suspend</option>
  19. <option>unsuspend</option>
  20. <option>delete</option>
  21. </select>
  22. <input type="submit" name="ok" value="›" class="button" style="width: 37px;font-size: 12px; height: 24px;">
  23. </div>
  24. </td>
  25. </tr>
  26. </table>
  27. </td>
  28. </tr>
  29. </table>
  30. <div id="vstobjects">
  31. <table class='data'>
  32. <?php
  33. foreach ($data as $key => $value) {
  34. ++$i;
  35. if ($data[$key]['SUSPENDED'] == 'yes') {
  36. $status = 'suspended';
  37. $spnd_action = 'unsuspend' ;
  38. } else {
  39. $status = 'active';
  40. $spnd_action = 'suspend' ;
  41. }
  42. if (!empty($data[$key]['SSL_HOME'])) {
  43. if ($data[$key]['SSL_HOME'] == 'same') {
  44. $ssl_home = 'public_html';
  45. } else {
  46. $ssl_home = 'public_shtml';
  47. }
  48. } else {
  49. $ssl_home = '';
  50. }
  51. $web_stats='no';
  52. if (!empty($data[$key]['STATS'])) {
  53. $web_stats=$data[$key]['STATS'];
  54. }
  55. $ftp_user='no';
  56. if (!empty($data[$key]['FTP_USER'])) {
  57. $ftp_user=$data[$key]['FTP_USER'];
  58. }
  59. $nginx_support='no';
  60. if (!empty($data[$key]['NGINX'])) {
  61. $nginx_support='yes';
  62. }
  63. if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
  64. $nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
  65. $nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
  66. $nginx_ext = trim($nginx_ext, ",");
  67. $nginx_ext = str_replace(',', ', ', $nginx_ext);
  68. $nginx_ext = $nginx_ext.", ...";
  69. } else {
  70. $nginx_ext_title = '';
  71. $nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
  72. }
  73. ?>
  74. <tr class="data-row">
  75. <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
  76. <table class="data-col1">
  77. <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="domain[]" value="<?php echo "$key" ?>" ></td></tr>
  78. <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>
  79. <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
  80. </table>
  81. </td>
  82. <td class="data-dotted" width="830px" style="vertical-align:top;">
  83. <table width="830px">
  84. <tr>
  85. <td></td>
  86. <?php
  87. if (!empty($data[$key]['STATS'])) {
  88. echo ' <td class="data-controls" width="114px">';
  89. echo "<a href='http://".$key."/vstats/' target='_blank'>";
  90. echo '<img src="/images/new_window.png" width="8px" height="8px"> open webstats </a></td>';
  91. }
  92. ?>
  93. <td class="data-controls" width="50px"><a href="/edit/web/?domain=<?php echo "$key" ?>"><img src="/images/edit.png" width="8px" height="8px"> edit</a></td>
  94. <td class="data-controls do_<?php echo $spnd_action ?>" width="80px">
  95. <img src="/images/suspend.png" width="7px" height="8px" class="do_<?php echo $spnd_action ?>">
  96. <a id="<?php echo $spnd_action ?>_link_<?php echo $i ?>" class="do_<?php echo $spnd_action ?>"> <?php echo $spnd_action ?></a>
  97. <input type="hidden" name="<?php echo $spnd_action ?>_url" value="/<?php echo $spnd_action ?>/web/?domain=<?php echo $key ?>" />
  98. <div id="<?php echo $spnd_action ?>_dialog_<?php echo $i ?>" class="confirmation-text-suspention hidden" title="Confirmation">
  99. <p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <b><?php echo "$key" ?></b> domain?</p>
  100. </div>
  101. </td>
  102. <td class="data-controls do_delete" width="70px">
  103. <img src="/images/delete.png" width="7px" height="7px" class="do_delete">
  104. <a id="delete_link_<?php echo $i ?>" class="do_delete"> delete</a>
  105. <input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
  106. <div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="Confirmation">
  107. <p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
  108. </div>
  109. </td>
  110. </tr>
  111. </table>
  112. <table class="data-col2" width="830px">
  113. <tr>
  114. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  115. <b><?php echo $key ?></b> <a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td style="vertical-align:top;" >
  120. <table>
  121. <tr>
  122. <td class="counter-name" style="padding: 2px 0 0 2px;">
  123. <?php echo $data[$key]['IP'] ?>
  124. </td>
  125. <tr>
  126. <td class="counter-name" style="padding: 0 0 8px 2px">
  127. [<?php echo $data[$key]['TPL'] ?>] template
  128. </td>
  129. </tr>
  130. <tr>
  131. <td class="chart1" style="padding: 0 0 0 2px">
  132. Bandwidth: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
  133. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  134. <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>
  135. </div>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td class="chart1" style="padding: 0 0 0 2px">Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
  140. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  141. <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>
  142. </div>
  143. </td>
  144. </tr>
  145. </table>
  146. </td>
  147. <td style="vertical-align:top;" width="300">
  148. <table>
  149. <tr>
  150. <td class="counter-name" width="110">SSL Support:</td>
  151. <td class="counter-value"><?php echo $data[$key]['SSL'] ?></td>
  152. </tr>
  153. <tr>
  154. <td class="counter-name">SSL Home:</td>
  155. <td class="counter-value"><?php echo $ssl_home ?></td>
  156. </tr>
  157. <tr>
  158. <td class="counter-name">Nginx Support:</td>
  159. <td class="counter-value"><?php echo $nginx_support ?></td>
  160. </tr>
  161. <tr>
  162. <td class="counter-name">Nginx Extentions:</td>
  163. <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
  164. </tr>
  165. </table>
  166. </td>
  167. <td rowspan=4 style="vertical-align:top;" width="240">
  168. <table>
  169. <tr>
  170. <td class="counter-name">Web Statistics: </td>
  171. <td class="counter-value"> <?php echo $web_stats ?></td>
  172. </tr>
  173. <tr>
  174. <td class="counter-name"> Additional FTP:</td>
  175. <td class="counter-value"> <?php echo $ftp_user ?></td>
  176. </tr>
  177. </table>
  178. </td>
  179. </tr>
  180. </table>
  181. </td>
  182. </tr>
  183. <?php
  184. }
  185. ?>
  186. </table>
  187. </form>
  188. <table class="data-count">
  189. <tr>
  190. <td width="160px">
  191. <td>
  192. <?php
  193. if ( $i == 1) {
  194. echo "1 web domain ";
  195. } else {
  196. echo "$i web domains ";
  197. }
  198. ?>
  199. </td>
  200. </tr>
  201. </table>
  202. </div>