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.invoices.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?PHP
  2. if (!defined('ADMIN') || !ADMIN) { die('Admins only!'); }
  3. ?><div class="block" id="bills">
  4. <h2>ADMIN: All bills</h2>
  5. <table class="innerblock">
  6. <tr>
  7. <th>&nbsp;</th>
  8. <th>User</th>
  9. <th>Type</th>
  10. <th>Amount</th>
  11. <th>Due on</th>
  12. <th>Status</th>
  13. </tr>
  14. <?PHP
  15. /* $sql = 'SELECT bill_id, bill_due, package_name, bill_amount, user_name, users.user_id, bill_paid FROM billing NATURAL JOIN users, packages WHERE packages.package_id = billing.package_id ORDER BY bill_due';
  16. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  17. $status = array(2=>'Paid',1=>'DUE',0=>'Future');
  18. $i = 1;
  19. while ($row = mysql_fetch_array($res)) {
  20. $i = 1 - $i;
  21. ?>
  22. <tr class="<?PHP echo ($i == 0) ? 'even' : 'odd'; ?>">
  23. <td><?PHP echo $row['bill_id']; ?>.</td>
  24. <td><a href="<?PHP echo CP_PATH.'checkuser/'.$row['user_id']; ?>"><?PHP echo $row['user_name']; ?></a></td>
  25. <td><?PHP echo $row['package_name']; ?></td>
  26. <td>&pound;<?PHP echo money_format('%i',$row['bill_amount']/100); ?></td>
  27. <td><?PHP echo date('r',$row['bill_due']); ?></td>
  28. <td>
  29. <?PHP echo $status[($row['bill_paid'])]; ?>
  30. </td>
  31. </tr>
  32. <?PHP
  33. }*/
  34. ?>
  35. </table>
  36. </div>