qhandler.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. session_start();
  3. require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
  4. require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
  5. if (preg_match("/^([a-f0-9]{64})$/", $_POST['quick_release']) || preg_match("/^([a-f0-9]{64})$/", $_POST['quick_delete'])) {
  6. ?>
  7. <div class="container">
  8. <div class="row">
  9. <div class="col-md-offset-2 col-md-8">
  10. <div class="panel panel-default">
  11. <div class="panel-heading"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <?= $lang['header']['quarantine']; ?></div>
  12. <div class="panel-body">
  13. <legend><?=(isset($_POST['quick_release'])) ? $lang['quarantine']['release'] : $lang['quarantine']['remove'];?></legend>
  14. <p><?=$lang['quarantine']['qhandler_success'];?></p>
  15. </div>
  16. </div>
  17. </div>
  18. </div> <!-- /row -->
  19. </div> <!-- /container -->
  20. <?php
  21. }
  22. elseif (in_array($_GET['action'], array('release', 'delete'))) {
  23. if (preg_match("/^([a-f0-9]{64})$/", $_GET['hash'])) {
  24. if ($_GET['action'] == "release"):
  25. ?>
  26. <div class="container">
  27. <div class="row">
  28. <div class="col-md-offset-2 col-md-8">
  29. <div class="panel panel-default">
  30. <div class="panel-heading"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <?= $lang['header']['quarantine']; ?></div>
  31. <div class="panel-body">
  32. <legend><?=$lang['quarantine']['release'];?></legend>
  33. <form method="post" autofill="off">
  34. <div class="form-group">
  35. <button type="submit" class="btn btn-success" name="quick_release" value="<?=$_GET['hash'];?>"><?= $lang['tfa']['confirm']; ?></button>
  36. </div>
  37. </form>
  38. </div>
  39. </div>
  40. </div>
  41. </div> <!-- /row -->
  42. </div> <!-- /container -->
  43. <?php
  44. elseif ($_GET['action'] == "delete"):
  45. ?>
  46. <div class="container">
  47. <div class="row">
  48. <div class="col-md-offset-2 col-md-8">
  49. <div class="panel panel-default">
  50. <div class="panel-heading"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <?= $lang['header']['quarantine']; ?></div>
  51. <div class="panel-body">
  52. <legend><?=$lang['quarantine']['remove'];?></legend>
  53. <form method="post" autofill="off">
  54. <div class="form-group">
  55. <button type="submit" class="btn btn-success" name="quick_delete" value="<?=$_GET['hash'];?>"><?= $lang['tfa']['confirm']; ?></button>
  56. </div>
  57. </form>
  58. </div>
  59. </div>
  60. </div>
  61. </div> <!-- /row -->
  62. </div> <!-- /container -->
  63. <?php
  64. endif;
  65. }
  66. }
  67. require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
  68. ?>