diff --git a/admin/controllers/tickets_details.php b/admin/controllers/tickets_details.php
index 2fd646ee6958aca03b7f18f7124ba45da21aef5b..4472e11c3cbbd567aed482591c89c6988c4d2a50 100644
--- a/admin/controllers/tickets_details.php
+++ b/admin/controllers/tickets_details.php
@@ -21,7 +21,29 @@ if (empty($_GET["id"])) {
}
$tickets_id = filter_input(INPUT_GET, "id", FILTER_SANITIZE_STRING);
-if (isset($_POST["do_comment_tickets"])) {
+$res = $dbpdo->find_and('tickets', ["id" => $tickets_id]);
+if ($res) {
+ $data = $res;
+} else {
+ setMsg("msg_notify", "The Tickets Not Found.", "warning");
+ redirect("admin", "tickets");
+}
+
+if (isset($_POST["do_close_tickets"])) {
+ if ($dbpdo->update('tickets', ["status" => 0, "lastupdated" => time()], "`id`={$tickets_id}")) {
+ setMsg("msg_notify", "The Tickets Closed Successfully.");
+ } else {
+ setMsg("msg_notify", "The Tickets Close Failed.", "warning");
+ }
+ redirect("admin", "tickets_details", ["id" => $tickets_id]);
+} elseif (isset($_POST["do_open_tickets"])) {
+ if ($dbpdo->update('tickets', ["status" => 1, "lastupdated" => time()], "`id`={$tickets_id}")) {
+ setMsg("msg_notify", "The Tickets Opened Successfully.");
+ } else {
+ setMsg("msg_notify", "The Tickets Open Failed.", "warning");
+ }
+ redirect("admin", "tickets_details", ["id" => $tickets_id]);
+} elseif (isset($_POST["do_comment_tickets"])) {
$comment = filter_input(INPUT_POST, "comment", FILTER_SANITIZE_SPECIAL_CHARS);
$errors = array();
@@ -35,13 +57,13 @@ if (isset($_POST["do_comment_tickets"])) {
if ($dbpdo->find_and('tickets', ["id" => $tickets_id, "user_id" => $user->id])) {
if ($dbpdo->add("tickets_comment", $data)) {
$dbpdo->update("tickets", ["lastupdated" => $data["date"]]);
- setMsg("msg_notify", "Add Comment successfully.", "success");
+ setMsg("msg_notify", "Add Comment Successfully.", "success");
} else {
- setMsg("msg_notify", "Add Comment failed.", "warning");
+ setMsg("msg_notify", "Add Comment Failed.", "warning");
}
redirect("admin", "tickets_details", ["id" => $res]);
} else {
- setMsg("msg_notify", "The Tickets Not found.", "warning");
+ setMsg("msg_notify", "The Tickets Not Found.", "warning");
redirect("admin", "tickets");
}
} else {
@@ -49,12 +71,4 @@ if (isset($_POST["do_comment_tickets"])) {
setMsg("errors", $errors);
redirect("admin", "tickets_details", ["id" => $res]);
}
-} else {
- $res = $dbpdo->find_and('tickets', ["id" => $tickets_id]);
- if ($res) {
- $data = $res;
- } else {
- setMsg("msg_notify", "The Tickets Not found.", "warning");
- redirect("admin", "tickets");
- }
}
diff --git a/admin/views/tickets_details.php b/admin/views/tickets_details.php
index d6826ca17fa93b65c3e7fd94bc42e485820697f2..ffebc081d91d18c355740d53678c301c787284b1 100644
--- a/admin/views/tickets_details.php
+++ b/admin/views/tickets_details.php
@@ -30,7 +30,11 @@ if (!defined('IN_SYS')) {
+
+
+
+
diff --git a/clientarea/controllers/tickets_details.php b/clientarea/controllers/tickets_details.php
index 94e66560afa72ccf31a0444a8cea16c3f5252e69..cf053f0d3647ff7a9e28b9f1ee8662812e4e0122 100644
--- a/clientarea/controllers/tickets_details.php
+++ b/clientarea/controllers/tickets_details.php
@@ -26,7 +26,39 @@ if (empty($_GET["id"])) {
}
$tickets_id = filter_input(INPUT_GET, "id", FILTER_SANITIZE_STRING);
-if (isset($_POST["do_comment_tickets"])) {
+$res = $dbpdo->find_and('tickets', ["id" => $tickets_id, "user_id" => $user->id]);
+if ($res) {
+ $data = $res;
+} else {
+ setMsg("msg_notify", "The Tickets Not Found.", "warning");
+ redirect("clientarea", "tickets");
+}
+
+if (isset($_POST["do_close_tickets"])) {
+ if ($dbpdo->find_and('tickets', ["id" => $tickets_id, "user_id" => $user->id])) {
+ if ($dbpdo->update('tickets', ["status" => 0, "lastupdated" => time()], "`id`={$tickets_id}")) {
+ setMsg("msg_notify", "The Tickets Closed Successfully.");
+ } else {
+ setMsg("msg_notify", "The Tickets Close Failed.", "warning");
+ }
+ redirect("clientarea", "tickets_details", ["id" => $tickets_id]);
+ } else {
+ setMsg("msg_notify", "The Tickets Not Found.", "warning");
+ redirect("clientarea", "tickets");
+ }
+} elseif (isset($_POST["do_open_tickets"])) {
+ if ($dbpdo->find_and('tickets', ["id" => $tickets_id, "user_id" => $user->id])) {
+ if ($dbpdo->update('tickets', ["status" => 1, "lastupdated" => time()], "`id`={$tickets_id}")) {
+ setMsg("msg_notify", "The Tickets Opened Successfully.");
+ } else {
+ setMsg("msg_notify", "The Tickets Open Failed.", "warning");
+ }
+ redirect("clientarea", "tickets_details", ["id" => $tickets_id]);
+ } else {
+ setMsg("msg_notify", "The Tickets Not Found.", "warning");
+ redirect("clientarea", "tickets");
+ }
+} elseif (isset($_POST["do_comment_tickets"])) {
$comment = filter_input(INPUT_POST, "comment", FILTER_SANITIZE_SPECIAL_CHARS);
$errors = array();
@@ -46,7 +78,7 @@ if (isset($_POST["do_comment_tickets"])) {
}
redirect("clientarea", "tickets_details", ["id" => $res]);
} else {
- setMsg("msg_notify", "The Tickets Not found.", "warning");
+ setMsg("msg_notify", "The Tickets Not Found.", "warning");
redirect("clientarea", "tickets");
}
} else {
@@ -54,12 +86,4 @@ if (isset($_POST["do_comment_tickets"])) {
setMsg("errors", $errors);
redirect("clientarea", "tickets_details", ["id" => $res]);
}
-} else {
- $res = $dbpdo->find_and('tickets', ["id" => $tickets_id, "user_id" => $user->id]);
- if ($res) {
- $data = $res;
- } else {
- setMsg("msg_notify", "The Tickets Not found.", "warning");
- redirect("clientarea", "tickets");
- }
}
diff --git a/clientarea/views/footer.php b/clientarea/views/footer.php
index a326937512e560c4c52f30d926d40216e0922ccd..72bd8673730a4a5d9a75d0380e007a727c334080 100644
--- a/clientarea/views/footer.php
+++ b/clientarea/views/footer.php
@@ -45,6 +45,7 @@ if (!defined('IN_SYS')) {
$('.summernote').summernote({
minHeight: 200,
lang: "language_cached; ?>",
+ disableDragAndDrop: true,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
diff --git a/clientarea/views/tickets_details.php b/clientarea/views/tickets_details.php
index 4a6cb21e173f87cdb10b1ada9812389442e68fa5..e1971d0097c4ccd0ba9d139c5dbc6a7841d1ba31 100644
--- a/clientarea/views/tickets_details.php
+++ b/clientarea/views/tickets_details.php
@@ -33,7 +33,11 @@ if (!defined('IN_SYS')) {
+
+
+
+