diff --git a/admin/all.php b/admin/all.php
index d002a9e..f9896ee 100644
--- a/admin/all.php
+++ b/admin/all.php
@@ -28,6 +28,10 @@ foreach (array_reverse($rows) as $i) {
echo("
" . $pageTitle . " – admin
");
+$properTitle = $pageTitle . " – admin";
+
+include '../boilerplate/pageStart.php';
+
if ($_GET["deleted"] == 1) {
echo("deleted!");
}
@@ -55,7 +59,7 @@ foreach (array_reverse($rows) as $i){
if ($i["isrespondedto"] === "f" && $i["ispublic"] == "t") {
echo("");
if ($i["iscwed"] === "t") {
- echo("
cw: " . htmlspecialchars($i["cw"]) . "
");
+ echo("cw: " . htmlspecialchars($i["cw"]) . "
");
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
@@ -68,7 +72,7 @@ foreach (array_reverse($rows) as $i){
if ($i["ispublic"] === "f" && $i["isprivread"] === "f") {
echo("");
if ($i["iscwed"] === "t") {
- echo("
cw: " . htmlspecialchars($i["cw"]) . "
");
+ echo("cw: " . htmlspecialchars($i["cw"]) . "
");
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
@@ -81,7 +85,7 @@ foreach (array_reverse($rows) as $i){
if ($i["ispublic"] === "t" && $i["isrespondedto"] === "t") {
echo("");
if ($i["iscwed"] === "t") {
- echo("
cw: " . htmlspecialchars($i["cw"]) . "
");
+ echo("cw: " . htmlspecialchars($i["cw"]) . "
");
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
@@ -96,7 +100,7 @@ foreach (array_reverse($rows) as $i){
if ($i["ispublic"] === "f" && $i["isprivread"] === "t") {
echo("");
if ($i["iscwed"] === "t") {
- echo("
cw: " . htmlspecialchars($i["cw"]) . "
");
+ echo("cw: " . htmlspecialchars($i["cw"]) . "
");
}
echo(htmlspecialchars($i["text"]));
echo("" . $i["time"] . "
");
@@ -104,4 +108,6 @@ foreach (array_reverse($rows) as $i){
}
}
+include '../boilerplate/pageEnd.php';
+
?>
diff --git a/admin/index.php b/admin/index.php
index 2dfb424..6f6dcdc 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -17,6 +17,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..6b40332 100644
--- a/admin/respond.php
+++ b/admin/respond.php
@@ -34,6 +34,10 @@ WHERE id = {$id};
$qresp = pg_query($db, $query);
$arr = pg_fetch_array($qresp);
+$runOnLoad = "document.getElementById(\"passinput\").value = " . htmlspecialchars($arr["responsetext"]);
+$properTitle = $pageTitle . " – respond to question #" . $id;
+include 'boilerplate/pageStart.php';
+
echo("");
if ($arr["ispublic"] === "f") {
@@ -57,7 +61,7 @@ if ($arr["ispublic"] === "f") {
} else {
echo("enter a response
");
}
- echo("");
+ 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("