list_web.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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><?php print _('apply to selected');?></option>
  18. <option><?php print _('suspend');?></option>
  19. <option><?php print _('unsuspend');?></option>
  20. <option><?php print _('delete');?></option>
  21. </select>
  22. <input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
  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 strftime("%d %b %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. <a id="delete_link_<?php echo $i ?>" class="data-controls do_delete">
  84. <span class="do_delete">
  85. <img src="/images/delete.png" width="7px" height="7px">
  86. <?php print _('delete');?>
  87. <input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
  88. <div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print _('Confirmation');?>">
  89. <p class="counter-value"><?php print _('DOMAIN_ACTION_CONFIRMATION',_('delete'),$key);?></p>
  90. </div>
  91. </span>
  92. </a>
  93. <a id="<?php echo $spnd_action ?>_link_<?php echo $i ?>" class="data-controls do_<?php echo $spnd_action ?>">
  94. <span class="do_<?php echo $spnd_action ?>">
  95. <img src="/images/suspend.png" width="7px" height="8px">
  96. <?php echo _($spnd_action); ?>
  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="<?php print _('Confirmation');?>">
  99. <p class="counter-value"><?php print _('DOMAIN_ACTION_CONFIRMATION',_($spnd_action),$key);?></p>
  100. </div>
  101. </span>
  102. </a>
  103. <a href="/edit/web/?domain=<?php echo $key ?>" class="data-controls">
  104. <span>
  105. <img src="/images/edit.png" width="8px" height="8px">
  106. <?php print _('edit');?>
  107. </span>
  108. </a>
  109. <?php
  110. if (!empty($data[$key]['STATS'])) {
  111. ?>
  112. <a href="http://<?php echo $key ?>/vstats/" target="_blank" class="data-controls">
  113. <span>
  114. <img src="/images/new_window.png" width="8px" height="8px">
  115. <?php print _('open webstats');?>
  116. </span>
  117. </a>
  118. <?php
  119. }
  120. ?>
  121. <table class="data-col2" width="830px">
  122. <tr>
  123. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  124. <b><?php echo $key ?></b> <a class="aliases" style="padding: 0 30px 0 8px"><?php echo str_replace(',', ', ', $data[$key]['ALIAS']) ?></a>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td style="vertical-align:top;" >
  129. <table>
  130. <tr>
  131. <td class="counter-name" style="padding: 2px 0 0 2px;">
  132. <?php echo $data[$key]['IP'] ?>
  133. </td>
  134. <tr>
  135. <td class="counter-name" style="padding: 0 0 8px 2px">
  136. [<?php echo $data[$key]['TPL'] ?>] <?php print _('template');?>
  137. </td>
  138. </tr>
  139. <tr>
  140. <td class="chart1" style="padding: 0 0 0 2px">
  141. <?php print _('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
  142. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  143. <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>
  144. </div>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td class="chart1" style="padding: 0 0 0 2px"><?php print _('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
  149. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  150. <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>
  151. </div>
  152. </td>
  153. </tr>
  154. </table>
  155. </td>
  156. <td style="vertical-align:top;" width="300">
  157. <table>
  158. <tr>
  159. <td class="counter-name" width="110"><?php print _('SSL Support');?>:</td>
  160. <td class="counter-value"><?php print _($data[$key]['SSL']) ?></td>
  161. </tr>
  162. <tr>
  163. <td class="counter-name"><?php print _('SSL Home Directory');?>:</td>
  164. <td class="counter-value"><?php echo $ssl_home ?></td>
  165. </tr>
  166. <tr>
  167. <td class="counter-name"><?php print _('Nginx Support');?>:</td>
  168. <td class="counter-value"><?php print _($nginx_support) ?></td>
  169. </tr>
  170. <tr>
  171. <td class="counter-name"><?php print _('Nginx Extentions');?>:</td>
  172. <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
  173. </tr>
  174. </table>
  175. </td>
  176. <td rowspan=4 style="vertical-align:top;" width="240">
  177. <table>
  178. <tr>
  179. <td class="counter-name"><?php print _('Web Statistics');?>: </td>
  180. <td class="counter-value"> <?php print _($web_stats) ?></td>
  181. </tr>
  182. <tr>
  183. <td class="counter-name"> <?php print _('Additional FTP Account');?>:</td>
  184. <td class="counter-value"> <?php print _($ftp_user) ?></td>
  185. </tr>
  186. </table>
  187. </td>
  188. </tr>
  189. </table>
  190. </td>
  191. </tr>
  192. <?php
  193. }
  194. ?>
  195. </table>
  196. </form>
  197. <table class="data-count">
  198. <tr>
  199. <td width="160px">
  200. <td>
  201. <?php
  202. if ( $i == 1) {
  203. echo _('1 domain');
  204. } else {
  205. echo _('%s domains',$i);
  206. }
  207. ?>
  208. </td>
  209. </tr>
  210. </table>
  211. </div>