status.php 447 B

12345678910111213141516171819202122232425
  1. <?php
  2. include "meekrodb.php";
  3. ini_set('display_errors', '0');
  4. /* Simple crawl status change
  5. Oct 25 2019
  6. */
  7. $toggle = $_GET["s"];
  8. $coin = $_GET["c"];
  9. DB::$error_handler = "false";
  10. DB::$throw_exception_on_error = "true";
  11. try {
  12. $mysqli_result = DB::query("UPDATE coinlist SET crawl=%i WHERE slug=%s", $toggle, $coin);
  13. } catch (MeekroDBException $e) {
  14. // it broke.
  15. }
  16. header('Location: ' . $_SERVER['HTTP_REFERER']);
  17. ?>