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 h:iA", $post->date); $name = htmlentities($post->name); $message = $Parsedown->text($post->message); $found = htmlentities($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; }