a bit of cleanup from the last commit
This commit is contained in:
parent
28d453b614
commit
0008a59a83
4 changed files with 38 additions and 8 deletions
|
@ -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>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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>")
|
||||
|
||||
?>
|
|
@ -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>");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -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>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue