Example #1
0
echo "<!-- depth: " . $depth . " -->\n";
if ($room['id'] == 1) {
    echo "<div class=\"warnbox\">\n";
    echo "<b>Warning:</b>  " . nl2br(htmlentities(chop($settings['warn_box_blurb'])));
    echo "</div>\n";
}
if ($room['end_here']) {
    print nl2br(htmlentities(chop($room['blurb'])));
    print "<br><br><b>It's all over.</b> Why not <a href=\"room.php\">start again</a>.";
} else {
    print defaulty(nl2br(htmlentities(trim($room['blurb'])))) . "<br />\n";
    echo "<br />\n";
    echo "<b>What will you do?</b><br />\n";
    echo "<div class=\"choices\">\n";
    print "[1] <a href=\"room.php?room=" . $room['room_1'] . "&from=" . $room_id . "&opt=1\">" . defaulty(htmlentities($room['text_1'])) . "</a><br />\n";
    print "[2] <a href=\"room.php?room=" . $room['room_2'] . "&from=" . $room_id . "&opt=2\">" . defaulty(htmlentities($room['text_2'])) . "</a><br />\n";
    echo "</div>\n";
}
print "<br><br><br><br>";
echo "Something wrong with this entry? Bad spelling/grammar? Empty? Makes no sense? Then <a href=\"report.php?id=" . $room['id'] . "\">report it</a>.<br />";
if ($_SERVER['PHP_AUTH_USER']) {
    echo "<br />";
    echo "<div class=\"godbox\">You're logged in as an admin!";
    echo "[<a href=\"edit.php?id=" . $room['id'] . "\">edit</a>]";
    echo "</div>";
}
function defaulty($x)
{
    return strlen($x) ? $x : '<i>Blank</i>';
}
include 'footer.txt';
Example #2
0
		echo "<div class=\"warnbox\">\n";
		echo "<b>Warning:</b> This game is not suitable for children. Some story choices contain language and situations that some adults may find offensive. ";
		echo "This story is written by visitors to the site, and is largely unmoderated. Please do not use this in the classroom. ";
		echo "</div>\n";
	}

	if ($room[end_here]){
		print nl2br(htmlentities(chop($room[blurb])));
		print "<br><br><b>It's all over.</b> Why not <a href=\"room.php\">start again</a>.";
	}else{
		print defaulty(nl2br(htmlentities(trim($room[blurb]))))."<br />\n";
		echo "<br />\n";
		echo "<b>What will you do?</b><br />\n";
		echo "<div class=\"choices\">\n";
		print "[1] <a href=\"room.php?room=$room[room_1]&from=$room_id&opt=1\">".defaulty(htmlentities($room[text_1]))."</a><br />\n";
		print "[2] <a href=\"room.php?room=$room[room_2]&from=$room_id&opt=2\">".defaulty(htmlentities($room[text_2]))."</a><br />\n";
		echo "</div>\n";
	}
	print "<br><br><br><br>";
	echo "Something wrong with this entry? Bad spelling/grammar? Empty? Makes no sense? Then <a href=\"report.php?id=$room[id]\">report it</a>.<br />";

	if ($_SERVER[PHP_AUTH_USER]){
		echo "<br />";
		echo "<div class=\"godbox\">You're logged in as an admin!";
		echo "[<a href=\"edit.php?id=$room[id]\">edit</a>]";
		echo "</div>";
	}


	function defaulty($x){
		return strlen($x) ? $x : '<i>Blank</i>';