From 0f539539a336b500ef64b22c4e915f165972a415 Mon Sep 17 00:00:00 2001 From: tejagerjovic Date: Fri, 26 Aug 2022 05:10:39 +0200 Subject: [PATCH] [Redizajn 1KA v2] Testiranje --> Komentarji - izbris - v delu --- admin/survey/SurveyAdminAjax.php | 5 +++++ admin/survey/SurveyAdminSettings.php | 2 +- admin/survey/script/vprasanje.js | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/survey/SurveyAdminAjax.php b/admin/survey/SurveyAdminAjax.php index 3573c5588..8feffcfaa 100644 --- a/admin/survey/SurveyAdminAjax.php +++ b/admin/survey/SurveyAdminAjax.php @@ -4916,6 +4916,11 @@ class SurveyAdminAjax { sisplet_query("UPDATE post SET vsebina='$vsebina' WHERE id='$id'"); + } elseif ($_GET['a'] == 'comment_delete') { + $id = $_POST['id']; + + $sql = sisplet_query("DELETE FROM post WHERE id='$id'"); + } elseif ($_GET['a'] == 'archivePopup') { echo '
'; $sas = new SurveyAdminSettings(); diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index 4d8f15592..633b95a9f 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -7737,7 +7737,7 @@ class SurveyAdminSettings { echo ''.$lang['srv_comment_comment'].''; echo '
'; - echo '
'; + echo '
'; echo ''; //manjka funkcija za izbris echo $lang['srv_comment_delete']; echo '
'; diff --git a/admin/survey/script/vprasanje.js b/admin/survey/script/vprasanje.js index 957172bad..11d6e1c48 100644 --- a/admin/survey/script/vprasanje.js +++ b/admin/survey/script/vprasanje.js @@ -762,6 +762,10 @@ function comment_on_comment (id, user, date, spr_id) { $(".options_dropdown").addClass("displayNone"); } +function comment_delete (id) { + $.post("ajax.php?a=comment_delete\', {id: \''+id+'\', anketa: srv_meta_anketa_id}, function() {window.location.reload();}); return false"); +} + function change_NG_cancelButton(value){ if(value == 1){