diff --git a/admin/all.php b/admin/all.php
index d002a9e..8ad8d2f 100644
--- a/admin/all.php
+++ b/admin/all.php
@@ -26,6 +26,12 @@ foreach (array_reverse($rows) as $i) {
}
}
+$properTitle = $pageTitle . " – admin";
+
+include '../boilerplate/pageStart.php';
+
+echo("");
+
echo("
" . $pageTitle . " – admin
");
if ($_GET["deleted"] == 1) {
@@ -59,7 +65,7 @@ foreach (array_reverse($rows) as $i){
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
- echo("respond / delete");
+ echo("respond / delete");
}
}
@@ -72,7 +78,7 @@ foreach (array_reverse($rows) as $i){
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
- echo("mark read / delete");
+ echo("mark read / delete");
}
}
@@ -87,7 +93,7 @@ foreach (array_reverse($rows) as $i){
echo("" . $i["time"] . "
");
echo("" . htmlspecialchars($i["responsetext"]) . "");
echo("
" . $i["responsetime"] . "
");
- echo("edit response / delete");
+ echo("edit response / delete");
}
}
@@ -100,8 +106,10 @@ foreach (array_reverse($rows) as $i){
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
- echo("mark unread / delete");
+ echo("mark unread / delete");
}
}
+include '../boilerplate/pageEnd.php';
+
?>
diff --git a/admin/index.php b/admin/index.php
index 2dfb424..12d9a7e 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -2,8 +2,6 @@
include '../config.php';
-echo("");
-
if ($_GET["pw"] === $adminPassword) {
if ($_GET["page"] === "delete") {
include 'delete.php';
@@ -17,6 +15,9 @@ if ($_GET["pw"] === $adminPassword) {
include 'all.php';
}
} else {
+ $properTitle = $pageTitle . " – sign in";
+ include 'boilerplate/pageStart.php';
+
echo("enter password
");
echo("");
}
diff --git a/admin/respond.php b/admin/respond.php
index 1c2a7e0..7c208ed 100644
--- a/admin/respond.php
+++ b/admin/respond.php
@@ -34,7 +34,10 @@ WHERE id = {$id};
$qresp = pg_query($db, $query);
$arr = pg_fetch_array($qresp);
-echo("");
+$properTitle = $pageTitle . " – respond to question #" . $id;
+include '../boilerplate/pageStart.php';
+
+echo("");
if ($arr["ispublic"] === "f") {
echo("{$pageTitle} – no such question exists
");
@@ -57,7 +60,8 @@ if ($arr["ispublic"] === "f") {
} else {
echo("enter a response
");
}
- echo("");
+ $respTxt = htmlspecialchars($arr["responsetext"]);
+ echo("");
}
?>
diff --git a/boilerplate/pageEnd.php b/boilerplate/pageEnd.php
new file mode 100644
index 0000000..087b532
--- /dev/null
+++ b/boilerplate/pageEnd.php
@@ -0,0 +1,5 @@
+
+echo("