history.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <!DOCTYPE html>
  2. <?php
  3. include "mdie/meekrodb.php";
  4. ini_set('display_errors', '0');
  5. $go = $_GET["c"];
  6. ?>
  7. <html>
  8. <head>
  9. <meta http-equiv="Pragma" content="no-cache">
  10. <meta http-equiv="Expires" content="-1">
  11. <script src="jquery.min.js"></script>
  12. <link rel="stylesheet" href="bootstrap/bootstrap.min.css" media="screen">
  13. </head>
  14. <body>
  15. <?php
  16. include "header.php";
  17. // queries for individual coin information, switches...
  18. DB::$error_handler = "false";
  19. DB::$throw_exception_on_error = "true";
  20. try {
  21. $mysqli_result = DB::queryRaw("SELECT * FROM coinlist WHERE slug=%s", $go);
  22. $showdata = $mysqli_result->fetch_assoc();
  23. $f_name = $showdata['name'];
  24. $pass = $showdata['slug'];
  25. $crawl = $showdata['crawl'];
  26. $cash = $showdata['cash'];
  27. $exchange = $showdata['exchange'];
  28. $image = $showdata["infoimage"];
  29. $mysqli_exchange = DB::queryRaw("SELECT * FROM exchanges WHERE exchange=%s", $exchange);
  30. $mysqli_exchange_a = $mysqli_exchange->fetch_assoc();
  31. $exchangename = $mysqli_exchange_a['exchangename'];
  32. } catch (MeekroDBException $e) {
  33. // code.
  34. }
  35. ?>
  36. <br />
  37. <center>
  38. <div class="card border-warning mb-3" style="max-width: 90%;">
  39. <h3 class="card-header"><?php echo "$f_name"; ?></h3>
  40. <div class="card-body">
  41. <h5 class="card-title"></h5>
  42. <h6 class="card-subtitle text-muted">$<?php echo number_format($cash); ?></h6>
  43. </div>
  44. <img src="mdie/images/coins/<?php echo "$image"; ?>" width="100px"> <br />
  45. <script src="https://widgets.coingecko.com/coingecko-coin-price-chart-widget.js"></script>
  46. <p align="center"><coingecko-coin-price-chart-widget coin-id="<?php echo "$pass";?>" currency="usd" height="300" width="50%" locale="en"></coingecko-coin-price-chart-widget></p>
  47. <div class="card-body">
  48. <p class="card-text"></p>
  49. </div>
  50. <div class="card-body">
  51. <?php
  52. if ($crawl == 1) {
  53. echo "<a href=\"mdie/status.php?s=0&c=$pass\"><button type=\"button\" class=\"btn btn-outline-warning\">Disable</button></a> ";
  54. } else {
  55. echo "<a href=\"mdie/status.php?s=1&c=$pass\"><button type=\"button\" class=\"btn btn-outline-success\">Enable</button></a> ";
  56. }
  57. ?>
  58. </div>
  59. <div class="card-footer text-muted">
  60. <p class="text-info">Currently pulling data from <?php echo "$exchangename"; ?></p>
  61. </div>
  62. </div>
  63. </center>
  64. <br />
  65. <div align="center" id="output">
  66. <div
  67. class="progress-bar progress-bar-striped progress-bar-animated"
  68. role="progressbar"
  69. aria-valuenow="95"
  70. aria-valuemin="0"
  71. aria-valuemax="100"
  72. style="width: 75%">
  73. Loading ... Please allow a few minutes to populate after any changes.</div>
  74. </div>
  75. <hr />
  76. <script>
  77. setInterval(function(){
  78. $('#output').load('mdie/detail.php?c=<?php echo "$pass"; ?>');
  79. }, 2000)
  80. </script>
  81. </body>
  82. </html>