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.

123456789101112131415161718192021222324252627282930313233343536
  1. <?PHP
  2. require_once('lib/database.php');
  3. ?>
  4. <div class="block">
  5. <h2>Users I've referred</h2>
  6. <table class="innerblock">
  7. <tr>
  8. <th>&nbsp;</th>
  9. <th>User name</th>
  10. <th>Signup date</th>
  11. </tr>
  12. <?PHP
  13. $i = 0;
  14. $sql = 'SELECT user_name, user_signup FROM users WHERE user_ref = '.UID;
  15. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  16. if (mysql_num_rows($res) == 0) {
  17. echo '<tr><td colspan="3" style="font-style: italic; text-align: center;">No users referred</td></tr>';
  18. }
  19. while ($row = mysql_fetch_array($res)) {
  20. ?>
  21. <tr class="<?PHP echo ($i % 2 == 0) ? 'even' : 'odd'; ?>">
  22. <td><?PHP echo $i+1; ?>.</td>
  23. <td><?PHP echo htmlspecialchars($row['user_name']); ?></td>
  24. <td><?PHP echo substr(gmdate('r', $row['user_signup']),0,-6); ?></td>
  25. </tr>
  26. <?PHP
  27. $i++;
  28. }
  29. ?>
  30. </table>
  31. </div>