diff --git a/data/web/qhandler.php b/data/web/qhandler.php index 756c6955..6e4cce52 100644 --- a/data/web/qhandler.php +++ b/data/web/qhandler.php @@ -1,109 +1,24 @@ - -
-
-
-
-
-
- -

-
-
-
-
-
- -
-
-
-
-
-
- - - - - - -
- -

:

-

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
-
-
- - - - - -
-
-
-
-
-
-
-
- - -add('/web/js/site/qhandler.js'); -require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php'; -?> +add('/web/js/site/qhandler.js'); + +$template = 'qhandler.twig'; +$template_data = [ + 'quick_release' => preg_match("/^([a-f0-9]{64})$/", $_POST['quick_release']), + 'quick_delete' => preg_match("/^([a-f0-9]{64})$/", $_POST['quick_delete']), + 'is_action_release_delete' => in_array($_GET['action'], array('release', 'delete')), + 'is_hash_present' => preg_match("/^([a-f0-9]{64})$/", $_GET['hash']), + 'action' => $_GET['action'], + 'hash' => $_GET['hash'], + 'lang_quarantine' => json_encode($lang['quarantine']), +]; + +require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php'; + diff --git a/data/web/templates/qhandler.twig b/data/web/templates/qhandler.twig new file mode 100644 index 00000000..b2ef4375 --- /dev/null +++ b/data/web/templates/qhandler.twig @@ -0,0 +1,82 @@ +{% extends 'base.twig' %} + +{% block content %} +
+{% if quick_release or quick_delete %} +
+
+
{{ lang.header.quarantine }}
+
+ + {% if quick_release %} + {{ lang.quarantine.release }} + {% else %} + {{ lang.quarantine.remove }} + {% endif %} + +

{{ lang.quarantine.qhandler_success }}

+
+
+
+{% else %} +{% if is_action_release_delete and is_hash_present %} +
+
+
{{ lang.header.quarantine }}
+
+ {% if action == 'release' %} + {{ lang.quarantine.release }} + {% endif %} + {% if action == 'delete' %} + {{ lang.quarantine.remove }} + {% endif %} + +
+ +

{{ lang.quarantine.spam_score }}:

+

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+
+
+ {% if action == 'release' %} + + {% endif %} + {% if action == 'delete' %} + + {% endif %} +
+
+
+
+
+
+{% endif %} +{% endif %} +
+ + + +{% endblock %}