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.

adddomain.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?PHP
  2. $sql = 'SELECT domain_id, domain_name FROM domains WHERE domain_enabled = 1 AND user_id = '.UID;
  3. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  4. if (mysql_num_rows($res) > 0) {
  5. ?>
  6. <form name="submd" action="<?PHP echo CP_PATH; ?>domains" method="post" onSubmit="return validateSubdomainForm();">
  7. <input type="hidden" name="action" value="addsub">
  8. <div class="block">
  9. <h2>Add a new subdomain</h2>
  10. <div class="innerblock">
  11. <p class="blurb">
  12. You can add a new subdomain to any of your existing domains. Subdomains
  13. are added instantly, and you can use them right away. You will need to
  14. make sure that the subdomain resolves to the correct IP address.
  15. </p>
  16. <table class="form leftpad">
  17. <tr>
  18. <td><input type="text" name="subdomain" id="subdomain" class="inflat" style="width: 120px;"></td>
  19. <td style="width: 10px;">.</td>
  20. <td>
  21. <select name="subdomaind" id="subdomaind" style="inflat">
  22. <?PHP
  23. while ($row = mysql_fetch_array($res)) {
  24. if (strpos($row['domain_name'],'*')) { continue; }
  25. echo '<option value="'.$row['domain_id'].'">'.$row['domain_name'].'</option>';
  26. }
  27. ?>
  28. </select>
  29. </td>
  30. <td style="width:100%;"><span id="subdomainerr" class="validation"></span></td>
  31. </tr>
  32. <tr><td colspan="3" style="text-align: right;">
  33. <input type="submit" value="Add">
  34. </td></tr>
  35. </table>
  36. </div>
  37. </div>
  38. </form>
  39. <?PHP } ?>
  40. <form name="md" action="<?PHP echo CP_PATH; ?>domains" method="post" onSubmit="return validateDomainForm();">
  41. <input type="hidden" name="action" value="add">
  42. <div class="block">
  43. <h2>Add a new domain</h2>
  44. <div class="innerblock">
  45. <p class="blurb">
  46. Before you can use a new domain, a UTD-Hosting staff member will have to confirm that the
  47. domain belongs to you. This is to ensure that other customers do not "steal" your domains,
  48. and vice-versa.
  49. </p>
  50. <table class="form leftpad">
  51. <tr>
  52. <td><input type="text" name="domain" id="domain" class="inflat" style="width: 120px;"></td>
  53. <td style="width:100%;"><span id="domainerr" class="validation"></span></td>
  54. </tr>
  55. <tr><td style="text-align: right;">
  56. <input type="submit" value="Add">
  57. </td></tr>
  58. </table>
  59. </div>
  60. </div>
  61. </form>