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.

addsite.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <form action="<?PHP echo CP_PATH; ?>addsite" method="post">
  2. <div class="block">
  3. <h2>Add site</h2>
  4. <div class="innerblock">
  5. <p class="blurb">
  6. This will create a new site. If your domain name (or subdomain) is not
  7. listed, please ensure that you have added it to the <a href="<?PHP echo CP_PATH; ?>domains">domains page</a>, and that it is not associated with an existing site.
  8. </p>
  9. <table class="form leftpad">
  10. <tr>
  11. <th>Primary domain</th>
  12. <td><select name="domain" class="inflat">
  13. <?PHP
  14. $sql = 'SELECT domain_name, domain_id FROM domains WHERE user_id = '.UID.' AND domain_enabled = 1';
  15. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  16. $found = false;
  17. while ($row = mysql_fetch_array($res)) {
  18. $sql = 'SELECT record_value FROM records WHERE domain_id = '.$row['domain_id'].' AND record_type = \'UTD\'';
  19. $re2 = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  20. if (mysql_num_rows($re2) == 0) {
  21. $found = true;
  22. echo '<option value="'.$row['domain_id'].'">'.h($row['domain_name']).'</option>';
  23. }
  24. }
  25. if (!$found) { echo '<option value="err">&lt;No domains&gt;</option>'; }
  26. ?>
  27. </select></td>
  28. <td><a href="<?PHP echo CP_PATH; ?>support/018">Help</a></td>
  29. </tr>
  30. <tr>
  31. <th>Document root</th>
  32. <td><input type="text" name="docroot" value="/public_html" class="inflat"></td>
  33. <td><a href="<?PHP echo CP_PATH; ?>support/015">Help</a></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>