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.

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="block">
  2. <h2>Invoices</h2>
  3. <table class="innerblock">
  4. <tr>
  5. <th>&nbsp;</th>
  6. <th>Date issued</th>
  7. <th>Date due</th>
  8. <th>Value</th>
  9. <th>Paid</th>
  10. <th>Actions</th>
  11. </tr>
  12. <?PHP
  13. $sql = 'SELECT bill_id, bill_due, bill_generated, bill_total, bill_paid FROM bills WHERE user_id = '.UID.' ORDER BY bill_due';
  14. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  15. $i = 0;
  16. if (mysql_num_rows($res) == 0) {
  17. echo '<tr><td style="font-style: italic; text-align: center;" colspan="6">There are no invoices on record for your account</td></tr>';
  18. }
  19. while ($row = mysql_fetch_array($res)) {
  20. $i++;
  21. ?>
  22. <tr class="<?PHP echo ($i % 2 == 1) ? 'even' : 'odd'; ?>">
  23. <td><?PHP echo $i; ?>.</td>
  24. <td><?PHP echo date('r',$row['bill_generated']); ?></td>
  25. <td><?PHP echo date('r',$row['bill_due']); ?></td>
  26. <td>&pound;<?PHP echo money_format('%i',$row['bill_total']/100); ?></td>
  27. <td><?PHP echo ($row['bill_paid'] == 0) ? 'Outstanding' : 'Paid'; ?></td>
  28. <td>
  29. <a href="<?PHP echo CP_PATH; ?>viewinvoice/<?PHP echo $row['bill_id']; ?>">View</a>
  30. </td>
  31. </tr>
  32. <?PHP
  33. }
  34. ?>
  35. </table>
  36. </div>