a bit of cleanup from the last commit

This commit is contained in:
notfire 2025-02-27 09:15:56 -05:00
parent 28d453b614
commit 0008a59a83
No known key found for this signature in database
GPG key ID: 3AFDACAAB4E56B16
4 changed files with 38 additions and 8 deletions

View file

@ -65,7 +65,12 @@ foreach (array_reverse($rows) as $i){
}
echo(htmlspecialchars($i["text"]));
echo("<div class=\"time\">" . $i["time"] . "</div>");
echo("<a class=\"permalink\" href=\"index.php?page=respond&id=" . $i["id"] . "&pw={$adminPassword}\">respond</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a></details></div>");
echo("<a class=\"permalink\" href=\"index.php?page=respond&id=" . $i["id"] . "&pw={$adminPassword}\">respond</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a>");
if ($i["iscwed"] === "t") {
echo("</details></div>");
} else {
echo("</div>");
}
}
}
@ -78,7 +83,12 @@ foreach (array_reverse($rows) as $i){
}
echo(htmlspecialchars($i["text"]));
echo("<div class=\"time\">" . $i["time"] . "</div>");
echo("<a class=\"permalink\" href=\"index.php?page=mark&action=read&id=" . $i["id"] . "&pw={$adminPassword}\">mark read</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a></details></div>");
echo("<a class=\"permalink\" href=\"index.php?page=mark&action=read&id=" . $i["id"] . "&pw={$adminPassword}\">mark read</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a>");
if ($i["iscwed"] === "t") {
echo("</details></div>");
} else {
echo("</div>");
}
}
}
@ -93,7 +103,12 @@ foreach (array_reverse($rows) as $i){
echo("<div class=\"time\">" . $i["time"] . "</div>");
echo("<div class=\"response\">" . htmlspecialchars($i["responsetext"]) . "");
echo("<div class=\"time\">" . $i["responsetime"] . "</div></div>");
echo("<a class=\"permalink\" href=\"index.php?page=respond&responded=1&id=" . $i["id"] . "&pw={$adminPassword}\">edit response</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a></details></div>");
echo("<a class=\"permalink\" href=\"index.php?page=respond&responded=1&id=" . $i["id"] . "&pw={$adminPassword}\">edit response</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a>");
if ($i["iscwed"] === "t") {
echo("</details></div>");
} else {
echo("</div>");
}
}
}
@ -106,7 +121,12 @@ foreach (array_reverse($rows) as $i){
}
echo(htmlspecialchars($i["text"]));
echo("<div class=\"time\">" . $i["time"] . "</div>");
echo("<a class=\"permalink\" href=\"index.php?page=mark&action=unread&id=" . $i["id"] . "&pw={$adminPassword}\">mark unread</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a></details></div>");
echo("<a class=\"permalink\" href=\"index.php?page=mark&action=unread&id=" . $i["id"] . "&pw={$adminPassword}\">mark unread</a> / <a class=\"permalink\" href=\"index.php?page=delete&id=" . $i["id"] . "&pw={$adminPassword}\">delete</a>");
if ($i["iscwed"] === "t") {
echo("</details></div>");
} else {
echo("</div>");
}
}
}

View file

@ -1,5 +1,5 @@
<?php
// set up the page to have proper tags like <title>
echo("<!DOCTYPE html><html><head><title>" . $properTitle . "</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/></head><body>")
echo("<!DOCTYPE html><html><head><title>" . $properTitle . "</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"></head><body>")
?>

View file

@ -36,7 +36,12 @@ if (pg_num_rows($qresp) === 0 || $arr["ispublic"] === "f" || $arr["isrespondedto
echo(htmlspecialchars($arr["text"]));
echo("<div class=\"time\">" . $arr["time"] . "</div>");
echo("<div class=\"response\">" . $arr["responsetext"] . "");
echo("<div class=\"time\">" . $arr["responsetime"] . "</div></div></details></div>");
echo("<div class=\"time\">" . $arr["responsetime"] . "</div></div>");
if ($i["iscwed"] === "t") {
echo("</details></div>");
} else {
echo("</div>");
}
}
?>

View file

@ -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("<div class=\"time\">" . $i["time"] . "</div>");
echo("<div class=\"response\">" . htmlspecialchars($i["responsetext"]) . "");
echo("<div class=\"time\">" . $i["responsetime"] . "</div></div>");
echo("<a class=\"permalink\" href=\"fetch.php?id=" . $i["id"] . "\">permalink</a></details></div>");
echo("<a class=\"permalink\" href=\"fetch.php?id=" . $i["id"] . "\">permalink</a>");
if ($i["iscwed"] === "t") {
echo("</details></div>");
} else {
echo("</div>");
}
}
}