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.

adminbw.php 806B

12345678910111213141516171819202122232425262728293031323334
  1. <?PHP
  2. if (!defined('ADMIN') || !ADMIN) { die('Admins only!'); }
  3. ?><div class="block" id="bills">
  4. <h2>ADMIN: Live bandwidth</h2>
  5. <table class="innerblock">
  6. <tr>
  7. <th>&nbsp;</th>
  8. <th>User</th>
  9. <th>In</th>
  10. <th>Out</th>
  11. <th>Total</th>
  12. </tr>
  13. <?PHP
  14. $sql = 'SELECT * FROM iptdata ORDER BY ipt_user';
  15. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  16. $i = 1;
  17. while ($row = mysql_fetch_array($res)) {
  18. $i = 1 - $i;
  19. ?>
  20. <tr class="<?PHP echo ($i == 0) ? 'even' : 'odd'; ?>">
  21. <td><?PHP echo $row['ipt_id']; ?>.</td>
  22. <td><?PHP echo $row['ipt_user']; ?></td>
  23. <td><?PHP echo NiceSize($row['ipt_in']); ?></td>
  24. <td><?PHP echo NiceSize($row['ipt_out']); ?></td>
  25. <td><?PHP echo NiceSize($row['ipt_in']+$row['ipt_out']); ?></td>
  26. </tr>
  27. <?PHP
  28. }
  29. ?>
  30. </table>
  31. </div>