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.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <div class="block">
  2. <h2>Domains</h2>
  3. <div class="innerblock">
  4. <p class="blurb">
  5. A domain may not be deleted while it is associated with a site.
  6. </p>
  7. <table class="form">
  8. <?PHP
  9. $sql = 'SELECT domain_id, domain_name FROM domains WHERE domain_enabled = 1 AND user_id = '.UID;
  10. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  11. if (mysql_num_rows($res) == 0) {
  12. echo '<p>You do not have any domains associated with your account.</p>';
  13. }
  14. while ($row = mysql_fetch_array($res)) {
  15. $sql2 = 'SELECT r.record_value, s.site_name, s.site_id FROM records AS r, sites AS s WHERE r.domain_id = '.$row['domain_id'].' AND r.record_type = \'UTD\' AND s.site_id = r.record_value';
  16. $res2 = mysql_query($sql2) or mf(__FILE__, __LINE__, $sql2);
  17. if (mysql_num_rows($res2) > 0) {
  18. $row2 = mysql_fetch_array($res2);
  19. $asite = $row2['site_name'];
  20. $asiteid = $row2['site_id'];
  21. } else {
  22. $asite = '';
  23. }
  24. ?>
  25. <tr>
  26. <td><?PHP echo h($row['domain_name']); ?></td>
  27. <td><?PHP if ($asite != '') { ?>
  28. Associated with <a href="<?PHP echo CP_PATH; ?>editsite/<?PHP echo $asiteid; ?>"><?PHP echo h($asite); ?></a>.
  29. </td><td>
  30. <?PHP if (gethostbyname($row['domain_name']) != '63.246.141.80') { ?>
  31. <a href="<?PHP echo CP_PATH; ?>support/017" style="color: red;">DNS Error</a>
  32. <?PHP } ?>
  33. <?PHP } else { ?>Not associated with any site.</td><td>
  34. <?PHP if (gethostbyname($row['domain_name']) != '63.246.141.80') { ?>
  35. <a href="<?PHP echo CP_PATH; ?>support/017" style="color: red;">DNS Error</a>
  36. <?PHP } ?>
  37. </td><td>
  38. <form action="<?PHP echo CP_PATH; ?>domains" method="post"><input type="hidden" name="action" value="deldom"><input type="hidden" name="domain" value="<?PHP echo $row['domain_id']; ?>"><input type="submit" value="Delete"></form><?PHP } ?>
  39. </td>
  40. </tr>
  41. <?PHP
  42. }
  43. ?>
  44. </table>
  45. </div>
  46. </div>