From 5ee78ef1f3c6a2e07ba56e83357570264a499e4c Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 8 May 2023 12:37:05 -0400 Subject: [PATCH] When deleting quote from the client or global list view redirect quote delete back to the correct corresponsing list view also make Delete Quote Functional on quote details --- client_quotes.php | 2 +- post.php | 7 ++++++- quote.php | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client_quotes.php b/client_quotes.php index 5fa4263a..d21685ec 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -133,7 +133,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - + Delete diff --git a/post.php b/post.php index 9c4cb0c7..8e42ef1a 100644 --- a/post.php +++ b/post.php @@ -3298,7 +3298,12 @@ if(isset($_GET['delete_quote'])){ $_SESSION['alert_message'] = "Quotes deleted"; - header("Location: " . $_SERVER["HTTP_REFERER"]); + if(isset($_GET['client_id'])) { + $client_id = intval($_GET['client_id']); + header("Location: client_quotes.php?client_id=$client_id"); + } else { + header("Location: quotes.php"); + } } diff --git a/quote.php b/quote.php index 58d4f3f5..9d5cec86 100644 --- a/quote.php +++ b/quote.php @@ -176,8 +176,8 @@ if (isset($_GET['quote_id'])) { Guest URL - - Delete + + Delete