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.

admin.domains.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <div class="block" id="domains">
  2. <h2>ADMIN: All domains</h2>
  3. <table class="innerblock">
  4. <tr><th>&nbsp;</th><th>Domain</th><th>User</th><th>Site</th>
  5. <th>DNS</th>
  6. <th>Enabled?</td></tr>
  7. <?PHP
  8. $sql = 'SELECT domain_id, domain_name, domain_enabled, domains.user_id, user_name FROM domains NATURAL JOIN users ORDER BY user_name, domain_name';
  9. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  10. $i = 0;
  11. $n = 0;
  12. while ($row = mysql_fetch_array($res)) {
  13. $n++;
  14. $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';
  15. $res2 = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  16. if (mysql_num_rows($res2) > 0) {
  17. $row2 = mysql_fetch_array($res2);
  18. $asite = $row2['site_name'];
  19. $asiteid = $row2['site_id'];
  20. } else {
  21. $asite = '';
  22. }
  23. ?>
  24. <tr class="<?PHP echo ($i == 0) ? 'even' : 'odd'; ?>">
  25. <td><?PHP echo $n; ?>.</td>
  26. <td><?PHP echo h($row['domain_name']); ?></td>
  27. <td><a href="<?PHP echo CP_PATH.'checkuser/'.$row['user_id']; ?>"><?PHP echo h($row['user_name']); ?></a></td>
  28. <td><?PHP if ($asite != '') { ?>
  29. <a href="<?PHP echo CP_PATH; ?>editsite/<?PHP echo $asiteid; ?>"><?PHP echo h($asite); ?></a>
  30. </td>
  31. <?PHP } else { ?>None</td><?PHP } ?><td>
  32. <?PHP if (gethostbyname($row['domain_name']) != '63.246.141.80') { ?>
  33. <a href="<?PHP echo CP_PATH; ?>support/017" style="color: red;">Error</a>
  34. <?PHP } else { echo 'OK'; } ?>
  35. </td><td>
  36. <?PHP if ($row['domain_enabled'] != '1') { ?>
  37. <a href="<?PHP echo CP_PATH; ?>enabledomain/<?PHP echo $row['domain_id']; ?>">Enable</a>
  38. <?PHP } else { echo 'Enabled'; } ?>
  39. </td>
  40. </tr>
  41. <?PHP
  42. $i = 1 - $i;
  43. }
  44. ?>
  45. </table>
  46. </div>