qhandler.php 875 B

12345678910111213141516171819202122232425
  1. <?php
  2. session_start();
  3. require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
  4. if (quarantine('hash_details', $_GET['hash']) === false && !isset($_POST)) {
  5. header('Location: /admin');
  6. exit();
  7. }
  8. require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
  9. $js_minifier->add('/web/js/site/qhandler.js');
  10. $template = 'qhandler.twig';
  11. $template_data = [
  12. 'quick_release' => preg_match("/^([a-f0-9]{64})$/", $_POST['quick_release']),
  13. 'quick_delete' => preg_match("/^([a-f0-9]{64})$/", $_POST['quick_delete']),
  14. 'is_action_release_delete' => in_array($_GET['action'], array('release', 'delete')),
  15. 'is_hash_present' => preg_match("/^([a-f0-9]{64})$/", $_GET['hash']),
  16. 'action' => $_GET['action'],
  17. 'hash' => $_GET['hash'],
  18. 'lang_quarantine' => json_encode($lang['quarantine']),
  19. ];
  20. require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';