Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?PHP
  2. require_once('lib/database.php');
  3. require_once('lib/common.php');
  4. ?>
  5. <div class="block">
  6. <h2>My Mailboxes</h2>
  7. <table class="innerblock">
  8. <tr>
  9. <th>&nbsp;</th>
  10. <th>Mailbox</th>
  11. </tr>
  12. <?PHP
  13. $i = 0;
  14. $n = 0;
  15. $sql = 'SELECT mailbox_id, domain_name, mailbox_user FROM domains NATURAL JOIN mailboxes WHERE user_id = '.UID;
  16. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  17. if (mysql_num_rows($res) == 0) {
  18. echo '<tr><td colspan="3" style="font-style: italic; text-align: center;">';
  19. echo 'You have no mailboxes set up.</td></tr>';
  20. }
  21. while ($row = mysql_fetch_array($res)) {
  22. $n++;
  23. ?>
  24. <tr class="<?PHP echo ($i == 0) ? 'even' : 'odd'; ?>">
  25. <td><?PHP echo $n; ?>.</td>
  26. <td><?PHP echo htmlentities($row['mailbox_user'].'@'.$row['domain_name']); ?></td>
  27. </tr>
  28. <?PHP
  29. $i = 1 - $i;
  30. }
  31. ?>
  32. </table>
  33. </div>