list_web.html 14 KB

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