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.

domains.addsubdomain.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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" class="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 } ?>