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.

addmailbox.php 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <form action="<?PHP echo CP_PATH; ?>email" method="post">
  2. <div class="block">
  3. <h2>Add mailbox</h2>
  4. <div class="innerblock">
  5. <p class="blurb">
  6. This will create a new mailbox. For more information on how mailboxes and
  7. e-mail addresses work, see <a href="<?PHP echo CP_PATH; ?>support/027">this
  8. support article</a>.
  9. </p>
  10. <table class="form leftpad">
  11. <tr>
  12. <th>Mailbox name</th>
  13. <td><input type="text" name="mailbox_user" class="inflat"> @
  14. <select name="mailbox_domain" class="inflat">
  15. <?PHP
  16. $sql = 'SELECT domain_name, domain_id FROM domains WHERE user_id = '.UID.' AND domain_enabled = 1 ORDER BY domain_name';
  17. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  18. $found = false;
  19. while ($row = mysql_fetch_array($res)) {
  20. $found = true;
  21. echo '<option value="'.$row['domain_id'].'">'.h($row['domain_name']).'</option>';
  22. }
  23. if (!$found) { echo '<option value="err">&lt;No domains&gt;</option>'; }
  24. ?>
  25. </select></td>
  26. </tr>
  27. <tr>
  28. <th>Mailbox password</th>
  29. <td><input type="password" name="mailbox_pass1" class="inflat"></td>
  30. </tr>
  31. <tr>
  32. <th>Confirm password</th>
  33. <td><input type="password" name="mailbox_pass2" class="inflat"></td>
  34. </tr>
  35. <tr>
  36. <th>Actions</th>
  37. <td><input type="submit" value="Add"> <input type="reset" value="Cancel"></td>
  38. <td></td>
  39. </tr>
  40. </table>
  41. </div>
  42. </div>
  43. </form>