PHP/JavaScript webapp to analyse spending habits
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.html 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Spending Analyser</title>
  5. <script src="externals/flot/jquery.js" type="text/javascript"></script>
  6. <script src="externals/flot/jquery.flot.js" type="text/javascript"></script>
  7. <script src="externals/flot/jquery.flot.pie.js" type="text/javascript"></script>
  8. <script src="externals/flot/jquery.flot.resize.js" type="text/javascript"></script>
  9. <script src="externals/flot/jquery.flot.selection.js" type="text/javascript"></script>
  10. <script src="externals/flot/jquery.flot.stack.js" type="text/javascript"></script>
  11. <script src="externals/jquery.history/jquery.history.js" type="text/javascript"></script>
  12. <script src="data.php" type="text/javascript"></script>
  13. <script src="analyser.js" type="text/javascript"></script>
  14. <style type="text/css">
  15. .categoryIgnored td { color: gray; }
  16. .left { width: 45%; padding: 20px; float: left; }
  17. .right { margin-left: 50%; padding: 20px; }
  18. body { margin: 0; font-family: sans-serif; }
  19. #header { background: url('res/gradient.png') repeat-x; height: 100px; margin: 0 0 10px 0; overflow: hidden; z-index: 0; }
  20. #header h1 { color: white; margin: 0; font-size: 60px; position: absolute; top: 42px; left: 20px; z-index: 2; }
  21. #headershadow { font-size: 60px; position: absolute; top: 42px; left: 25px; font-weight: bold; z-index: 1; }
  22. h2 { margin-top: 10px; }
  23. table { border-collapse: collapse; }
  24. tr.alt td { background-color: #ddd; }
  25. td { padding: 3px; }
  26. th { text-align: left; padding: 5px; }
  27. .graph { margin-bottom: 40px; }
  28. .link { color: blue; text-decoration: underline; cursor: pointer; }
  29. #historytable tr.collapsed { opacity: 0.6; }
  30. table tr.total td, table tr.total th { background-color: #666; color: #fff; }
  31. .amount { text-align: right; }
  32. .datatable { width: 100%; }
  33. </style>
  34. </head>
  35. <body>
  36. <div id="header">
  37. <h1>Money Analyser</h1>
  38. </div>
  39. <span id="headershadow">Money Analyser</span>
  40. <div class="left">
  41. <h2>Transaction History</h2>
  42. <div id="history" style="width: 100%; height: 300px;" class="graph"></div>
  43. <div id="historytable" style="display: none;">
  44. <h3>Transactions for ??</h3>
  45. <table class="datatable"><tr><th>Date</th><th>Type</th><th>Category</th><th>Description</th><th>Amount</th></tr></table>
  46. </div>
  47. </div>
  48. <div class="right">
  49. <h2>Categories</h2>
  50. <div id="expense" style="width: 100%; height: 300px;" class="graph"></div>
  51. <h2>Expense Categories</h2>
  52. <!-- The tick labels on the X-Axis extend a bit beyond the edge of the
  53. graph, so make the graph 50px smaller so the page doesn't scroll -->
  54. <div style="padding-right: 50px;">
  55. <div id="cathistory" style="width: 100%; height: 600px;" class="graph"></div>
  56. </div>
  57. <div id="repeats" style="display: none;">
  58. <h2>Repeat Transactions</h2>
  59. <table class="datatable">
  60. <tr><th rowspan="2">Transaction</th><th rowspan="2">Category</th><th rowspan="2">Frequency</th><th colspan="2">Average amount</th></tr>
  61. <tr><th>Per trans</th><th>Per month</th></tr>
  62. </table>
  63. </div>
  64. </div>
  65. </body>
  66. </html>