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.

adminbills.php 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?PHP
  2. if (!defined('ADMIN') || !ADMIN) { die('Admins only!'); }
  3. ?><div class="block" id="bills">
  4. <h2>ADMIN: All bills</h2>
  5. <!--
  6. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  7. <input type="hidden" name="cmd" value="_xclick">
  8. <input type="hidden" name="business" value="chris87@gmail.com">
  9. <input type="hidden" name="item_name" value="UTD-Hosting one year slot">
  10. <input type="hidden" name="item_number" value="UID">
  11. <input type="hidden" name="amount" value="35.00">
  12. <input type="hidden" name="no_shipping" value="1">
  13. <input type="hidden" name="no_note" value="1">
  14. <input type="hidden" name="currency_code" value="GBP">
  15. <input type="hidden" name="bn" value="PP-BuyNowBF">
  16. <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
  17. </form>
  18. https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=chris87%40gmail%2ecom&item_name=UTD%2dHosting%20one%20year%20slot&item_number=UID&amount=35%2e00&no_shipping=1&no_note=1&currency_code=GBP&bn=PP%2dBuyNowBF&charset=UTF%2d8
  19. -->
  20. <table class="innerblock">
  21. <tr>
  22. <th>&nbsp;</th>
  23. <th>User</th>
  24. <th>Type</th>
  25. <th>Amount</th>
  26. <th>Due on</th>
  27. <th>Status</th>
  28. </tr>
  29. <?PHP
  30. $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';
  31. $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql);
  32. $status = array(2=>'Paid',1=>'DUE',0=>'Future');
  33. $i = 1;
  34. while ($row = mysql_fetch_array($res)) {
  35. $i = 1 - $i;
  36. ?>
  37. <tr class="<?PHP echo ($i == 0) ? 'even' : 'odd'; ?>">
  38. <td><?PHP echo $row['bill_id']; ?>.</td>
  39. <td><a href="<?PHP echo CP_PATH.'checkuser/'.$row['user_id']; ?>"><?PHP echo $row['user_name']; ?></a></td>
  40. <td><?PHP echo $row['package_name']; ?></td>
  41. <td>&pound;<?PHP echo money_format('%i',$row['bill_amount']/100); ?></td>
  42. <td><?PHP echo date('r',$row['bill_due']); ?></td>
  43. <td>
  44. <?PHP echo $status[($row['bill_paid'])]; ?>
  45. </td>
  46. </tr>
  47. <?PHP
  48. }
  49. ?>
  50. </table>
  51. </div>