From 0008a59a83c6440512329fdf3887371f5223f24f Mon Sep 17 00:00:00 2001 From: notfire Date: Thu, 27 Feb 2025 09:15:56 -0500 Subject: [PATCH] a bit of cleanup from the last commit --- admin/all.php | 28 ++++++++++++++++++++++++---- boilerplate/pageStart.php | 2 +- fetch.php | 7 ++++++- index.php | 9 +++++++-- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/admin/all.php b/admin/all.php index 8ad8d2f..df9de2f 100644 --- a/admin/all.php +++ b/admin/all.php @@ -65,7 +65,12 @@ foreach (array_reverse($rows) as $i){ } echo(htmlspecialchars($i["text"])); echo("
" . $i["time"] . "
"); - echo("respond / delete"); + echo("respond / delete"); + if ($i["iscwed"] === "t") { + echo(""); + } else { + echo(""); + } } } @@ -78,7 +83,12 @@ foreach (array_reverse($rows) as $i){ } echo(htmlspecialchars($i["text"])); echo("
" . $i["time"] . "
"); - echo("mark read / delete"); + echo("mark read / delete"); + if ($i["iscwed"] === "t") { + echo(""); + } else { + echo(""); + } } } @@ -93,7 +103,12 @@ foreach (array_reverse($rows) as $i){ echo("
" . $i["time"] . "
"); echo("
" . htmlspecialchars($i["responsetext"]) . ""); echo("
" . $i["responsetime"] . "
"); - echo("edit response / delete"); + echo("edit response / delete"); + if ($i["iscwed"] === "t") { + echo(""); + } else { + echo(""); + } } } @@ -106,7 +121,12 @@ foreach (array_reverse($rows) as $i){ } echo(htmlspecialchars($i["text"])); echo("
" . $i["time"] . "
"); - echo("mark unread / delete"); + echo("mark unread / delete"); + if ($i["iscwed"] === "t") { + echo(""); + } else { + echo(""); + } } } diff --git a/boilerplate/pageStart.php b/boilerplate/pageStart.php index b8139e2..c08ba77 100644 --- a/boilerplate/pageStart.php +++ b/boilerplate/pageStart.php @@ -1,5 +1,5 @@ -echo("" . $properTitle . "") +echo("" . $properTitle . "") ?> \ No newline at end of file diff --git a/fetch.php b/fetch.php index e6a9532..60a562a 100644 --- a/fetch.php +++ b/fetch.php @@ -36,7 +36,12 @@ if (pg_num_rows($qresp) === 0 || $arr["ispublic"] === "f" || $arr["isrespondedto echo(htmlspecialchars($arr["text"])); echo("
" . $arr["time"] . "
"); echo("
" . $arr["responsetext"] . ""); - echo("
" . $arr["responsetime"] . "
"); + echo("
" . $arr["responsetime"] . "
"); + if ($i["iscwed"] === "t") { + echo(""); + } else { + echo(""); + } } ?> diff --git a/index.php b/index.php index 4045891..176f837 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,7 @@ $qresp = pg_query($db, $query); $rows = pg_fetch_all($qresp); -$properTitle = $pageTitle . " – all questions"; +$properTitle = $pageTitle . " – all messages"; include 'boilerplate/pageStart.php'; @@ -46,7 +46,12 @@ foreach (array_reverse($rows) as $i){ echo("
" . $i["time"] . "
"); echo("
" . htmlspecialchars($i["responsetext"]) . ""); echo("
" . $i["responsetime"] . "
"); - echo("permalink"); + echo("permalink"); + if ($i["iscwed"] === "t") { + echo(""); + } else { + echo(""); + } } }