list_mail.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <table class="sub-menu" style="background: white;">
  2. <tr>
  3. <td style="padding: 12px 0 0 6px">
  4. <div style="float:left">
  5. <button style="width:120px; padding: 2px 0px;" onclick="location.href='/add/mail/'"> Add Mail 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" name="search" value="Search" class="button" style="font-size: 12px;">
  11. </form>
  12. </div>
  13. <div style="float:left; padding-left: 26px;">
  14. <form action="/bulk/mail/" 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;">
  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. list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"]);
  34. foreach ($data as $key => $value) {
  35. ++$i;
  36. if ($data[$key]['SUSPENDED'] == 'yes') {
  37. $status = 'suspended';
  38. $spnd_action = 'unsuspend' ;
  39. } else {
  40. $status = 'active';
  41. $spnd_action = 'suspend' ;
  42. }
  43. if (empty($data[$key]['CATCHALL'])) {
  44. $data[$key]['CATCHALL'] = '/dev/null';
  45. }
  46. ?>
  47. <script type="text/javascript">
  48. $(function(){
  49. $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog({
  50. modal: true,
  51. autoOpen: false,
  52. width: 360,
  53. buttons: {
  54. "Ok": function(event, ui) {
  55. location.href = '/<?php echo $spnd_action ?>/mail/?domain=<?php echo "$key" ?>';
  56. },
  57. "Cancel": function() {
  58. $(this).dialog("close");
  59. }
  60. }
  61. });
  62. $('#<?php echo $spnd_action ?>_link_<?php echo "$i" ?>').click(function(){
  63. $('#<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>').dialog('open');
  64. return false;
  65. });
  66. $('#delete_dialog_<?php echo "$i" ?>').dialog({
  67. modal: true,
  68. autoOpen: false,
  69. width: 360,
  70. buttons: {
  71. "Ok": function(event, ui) {
  72. location.href = '/delete/mail/?domain=<?php echo "$key" ?>';
  73. },
  74. "Cancel": function() {
  75. $(this).dialog("close");
  76. }
  77. }
  78. });
  79. $('#delete_link_<?php echo "$i" ?>').click(function(){
  80. $('#delete_dialog_<?php echo "$i" ?>').dialog('open');
  81. return false;
  82. });
  83. });
  84. </script>
  85. <tr class="data-row">
  86. <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
  87. <table class="data-col1">
  88. <tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="domain[]" value="<?php echo "$key" ?>" ></td></tr>
  89. <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>
  90. <tr><td class="data-<?php echo $status ?>"><b><?php echo $status ?></b></td></tr>
  91. </table>
  92. </td>
  93. <td class="data-dotted" width="830px" style="vertical-align:top;">
  94. <table width="830px">
  95. <tr>
  96. <td></td>
  97. <td class="data-controls" width="100px"><img src="/images/more.png" width="8px" height="8px"><a href="?domain=<?php echo $key ?>"> list accounts</a></td>
  98. <td class="data-controls" width="98px"><img src="/images/add.png" width="8px" height="8px"><a href="/add/mail/?domain=<?php echo $key ?>"> add account</a></td>
  99. <td class="data-controls" width="104px"><img src="/images/new_window.png" width="8px" height="8px"> <a href="<?php echo "http://".$http_host."/webmail/"; ?>" target="_blank"> open webmail</a></td>
  100. <td class="data-controls" width="50px"><img src="/images/edit.png" width="8px" height="8px"><a href="/edit/mail/?domain=<?php echo $key ?>"> edit</a></td>
  101. <td class="data-controls" width="80px">
  102. <img src="/images/suspend.png" width="7px" height="8px">
  103. <a href="#" id="<?php echo $spnd_action ?>_link_<?php echo "$i" ?>"> <?php echo $spnd_action ?></a>
  104. <div id="<?php echo $spnd_action ?>_dialog_<?php echo "$i" ?>" title="Confirmation">
  105. <p class="counter-value">Are you sure you want to <?php echo $spnd_action ?> <b><?php echo "$key" ?></b> domain?</p>
  106. </div>
  107. </td>
  108. <td class="data-controls" width="70px">
  109. <img src="/images/delete.png" width="7px" height="7px">
  110. <a href="#" id="delete_link_<?php echo $i ?>"> delete</a>
  111. <div id="delete_dialog_<?php echo $i ?>" title="Confirmation">
  112. <p class="counter-value">Are you sure you want to delete <b><?php echo "$key" ?></b> domain?</p>
  113. </div>
  114. </td>
  115. </tr>
  116. </table>
  117. <table class="data-col2" width="830px">
  118. <tr>
  119. <td colspan=3 class="domain" style="padding: 0 0 0 4px;">
  120. <b><?php echo $key ?></b>
  121. </td>
  122. </tr>
  123. <tr>
  124. <td style="vertical-align:top;" >
  125. <table>
  126. <tr>
  127. <td class="counter-name" style="padding: 2px 0 2px 0">
  128. catchall > <?php echo $data[$key]['CATCHALL'] ?>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td class="chart1">
  133. Disk: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
  134. <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
  135. <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>
  136. </div>
  137. </td>
  138. </tr>
  139. </table>
  140. </td>
  141. <td style="vertical-align:top;" width="250">
  142. <table>
  143. <tr>
  144. <td class="counter-name">
  145. Antivirus:
  146. </td>
  147. <td class="counter-value">
  148. <?php echo $data[$key]['ANTIVIRUS'] ?>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td class="counter-name">
  153. Antispam:
  154. </td>
  155. <td class="counter-value">
  156. <?php echo $data[$key]['ANTISPAM'] ?>
  157. </td>
  158. </tr>
  159. </table>
  160. </td>
  161. <td rowspan=4 style="vertical-align:top;" width="300">
  162. <table>
  163. <tr>
  164. <td class="counter-name">
  165. DKIM:
  166. </td>
  167. <td class="counter-value">
  168. <?php echo $data[$key]['DKIM'] ?>
  169. </td>
  170. </tr>
  171. <tr>
  172. <td class="counter-name">
  173. Accounts:
  174. </td>
  175. <td class="counter-value">
  176. <?php echo $data[$key]['ACCOUNTS'] ?>
  177. </td>
  178. </tr>
  179. </table>
  180. </td>
  181. </tr>
  182. </table>
  183. </td>
  184. </tr>
  185. <?php
  186. }
  187. ?>
  188. </table>
  189. </form>
  190. <table class="data-count">
  191. <tr>
  192. <td width="160px"></td>
  193. <td>
  194. <?php
  195. if ( $i == 1) {
  196. echo "1 mail domain ";
  197. } else {
  198. echo "$i mail domains ";
  199. }
  200. ?>
  201. </td>
  202. </tr>
  203. </table>
  204. </div>