ratcatcher/website/levels.php

68 lines
1.3 KiB
PHP
Raw Normal View History

2008-12-03 09:05:17 +11:00
<html>
<title>
nethack.net - ratcatcher level screenshots
</title>
<body bgcolor="#99BB99">
<center>
<br>
<h1>Rat Catcher Levels</h1>
<br>
<table border=1 align=center>
<script language="php">
2008-12-03 09:10:47 +11:00
function getworldname($wld) {
if ($wld == 1) {
return "Forest";
} else if ($wld == 2) {
return "Beach";
} else if ($wld == 3) {
return "Kitchen";
} else if ($wld == 4) {
return "Snow";
2009-03-24 11:36:52 +11:00
} else if ($wld == 5) {
return "Castle";
2008-12-03 09:10:47 +11:00
}
}
2008-12-26 08:50:38 +11:00
function getworldcolour($wld) {
if ($wld == 1) {
return "#BBDDBB";
} else if ($wld == 2) {
return "#CCCC99";
} else if ($wld == 3) {
return "#9999ff";
} else if ($wld == 4) {
return "#CCCCCC";
2009-03-24 11:36:52 +11:00
} else if ($wld == 5) {
return "#666666";
2008-12-26 08:50:38 +11:00
}
}
2009-03-24 11:36:52 +11:00
for ($w = 1; $w <= 5; $w++) {
2008-12-03 09:05:17 +11:00
echo "<tr>\n";
2008-12-26 08:48:25 +11:00
printf("<th colspan=4 bgcolor=\"#ffff00\">World %d - %s</th>\n",$w, getworldname($w));
2008-12-03 09:05:17 +11:00
echo "</tr>\n";
for ($l = 1; $l <= 20;) {
echo "<tr>\n";
2008-12-26 08:48:25 +11:00
for ($i = 0 ; $i < 4; $i++) {
2008-12-26 08:50:38 +11:00
printf("<td bgcolor=\"%s\">\n", getworldcolour($w));
2008-12-03 09:05:17 +11:00
echo "<center>\n";
2008-12-03 09:39:40 +11:00
if ($l > 20) {
2008-12-03 09:36:01 +11:00
printf("&nbsp;\n");
2008-12-03 09:40:58 +11:00
} else {
2008-12-03 09:36:01 +11:00
printf("<img src=\"levels/level_%d_%d.png\">\n",$w,$l);
echo "<br>\n";
printf("<b>%d-%d </b>",$w,$l);
passthru("./getname.sh $w $l");
}
2008-12-03 09:05:17 +11:00
echo "</center>\n";
echo "</td>\n";
$l++;
}
echo "</tr>\n";
}
}
</script>
</table>
</html>