setSafeMode(true); } $totaloutput = ""; $postlist = json_decode(file_get_contents($datadir."posts.json")); $index = 1; foreach($postlist as $post) { if($post->entry === $page and $post->modstatus > 0) { $output = ""; $date = date("Y-m-d", $post->date); $name = htmlentities($post->name); $message = $Parsedown->text($post->message); $found = htmlentities($post->found); $website = $post->website; $button = $post->button; $cool = $post->cool; $coolsanitized = htmlentities(preg_replace("/https?:\/\//i", "", $cool)); $reply = $Parsedown->text($post->reply); $nice = ""; switch($index) { case 42: $nice = "scifi reference ayo???"; break; case 67: $nice = "six sevennn"; break; case 69: $nice = "nice"; break; case 420: $nice = "blaze it"; break; case 911: $nice = "ohhhh nine eleven"; break; default: $nice = "#$index"; } $output = $output."

"; if($website) { if($button) { $output = $output."$name"; } else { $output = $output."$name"; } } else { $output = $output.$name; } $output = $output."

$date

$nice

"; 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; }