'; echo 'bugwo.men guestbook'; echo 'The guestbook and blog comments on bugwo.men'; echo 'en-us'; echo 'https://bugwo.men/guestbook/'; echo 'My crappy PHP code'; include($_SERVER['DOCUMENT_ROOT']."/Parsedown.php"); $Parsedown = new Parsedown(); $Parsedown->setSafeMode(true); include($_SERVER['DOCUMENT_ROOT'] . '/common.php'); $postlist = json_decode(file_get_contents($datadir."posts.json")); $index = 1; $totaloutput = ""; foreach($postlist as $post) { if($post->modstatus == 1) { $output = ""; $entry = $post->entry; $date = date("D, d M Y H:m:s", $post->date) . " GMT"; $name = $post->name; $message = $Parsedown->text($post->message); $found = $post->found; $website = $post->website; $cool = $post->cool; $reply = $Parsedown->text($post->reply); if($website) { $output = $output."

$name:

"; } else { $output = $output."

$name:

"; } if($cool) { $output = $output."

cool thing: $cool

"; } if($found) { $output = $output."

How did you find me?
$found

"; } $output = $output.$message; if($reply) { $output = $output."

Reply:

$reply"; } $output_sanitized = preg_replace("/&gt;/", ">", preg_replace("/&lt;/", "<", htmlspecialchars($output))); $totaloutput = "Entry #" . $index . " on " . $entry . " - " . $name . "https://bugwo.men/guestbook/" . $date . "".$output_sanitized."" . $index . $post->date . $name . "\n".$totaloutput; $index++; } } echo $totaloutput; echo "
";