From eb61c1bae2ffad114e17393d91d86fb00d7ac8cd Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Sat, 10 May 2025 03:03:58 -0600 Subject: Initialer commit Just remade the repo because I don't *need* need a comprehensive source history for my personal website and this is easier than getting filter-repo to work good --- guestbook/index.php | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 guestbook/index.php (limited to 'guestbook/index.php') diff --git a/guestbook/index.php b/guestbook/index.php new file mode 100644 index 0000000..7d85fd1 --- /dev/null +++ b/guestbook/index.php @@ -0,0 +1,244 @@ + + + + + + + Guestbook + + + + + + +

guestbook

+

say hi!

+ + +
+ + + "; } ?> + + + + + + "; } ?> + + + + + + "; } ?> + + + + + + + + + + + "; } ?> + + + + + + "; } ?> + + + + + + "; } ?> + + + + +
Name required!
Name*
Invalid URL!
Website
Invalid URL!
Link something cool
How did you find me?
Message required!
Message*
You failed the bot check!
Bot test (six-letter scientific term for a roly-poly or woodlouse)*
Successfully posted!
+
+ setSafeMode(true); + + $totaloutput = ""; + $postlist = json_decode(file_get_contents("posts.json")); + $index = 1; + foreach($postlist as $post) { + $output = ""; + $date = date("Y-m-d h:iA", $post->date); + $name = $post->name; + $message = $Parsedown->text(html_entity_decode($post->message)); + $found = $post->found; + $website = $post->website; + $cool = $post->cool; + $coolsanitized = htmlentities(preg_replace("/https?:\/\//i", "", $cool)); + $reply = $Parsedown->text($post->reply); + + $output = $output."
"; + if($website) { $output = $output."$name"; } + else { $output = $output.$name; } + $output = $output."
$date
Entry #$index
"; + if($cool) { + $output = $output."
cool thing: $coolsanitized
"; + } + if($found) { + $output = $output."
How did you find me?
$found
"; + } + $output = $output."
$message
"; + if($reply) { + $output = $output."
Reply:
$reply
"; + } + $output = $output."
"; + $index++; + $totaloutput = $output.$totaloutput; + } + echo $totaloutput; ?> + + + -- cgit v1.2.3