Location: PHPKode > projects > Blackbeard's Revenge > shipstats.php
<?php
//  --------------------------------------------------
//  |  Blackbeard's Revenge                          |
//  |  Written By:  Brian Austin                     |
//  |  Contact at:  hide@address.com         |
//  |  CopyLeft 2003								 |
//  |  Module:  ShipStats                            |
//  |  Description:                                  |
//  |    This module handles ship stats display      |
//  --------------------------------------------------

define ("MAXHULL", 300);
define ("MINHULL", 1);
define ("HULLSCALER", 30);

define ("MAXARMOR", 55);
define ("MINARMOR", 1);
define ("ARMORSCALER", 24);

define ("MAXCANNON", 120);
define ("MINCANNON", 1);
define ("CANNONSCALER", 5);

echo "<table class=\"data\" style=\"width: 300px;border-top:1px solid black;border-left:1px solid black;border-right:1px solid black;border-bottom:3px solid black\"\">";
echo "<tr>";
echo "<td class=\"header2\" colspan = 1>Name:  " . $_SESSION[user]['shipname'] ."</td>";
echo "<td class=\"header2\" colspan = 1>Type:  " . $_SESSION[user]['classname'] ."</td>";
echo "</tr>";
echo "<tr>";
echo "<td><img src=\"http://blackbeard.voyageurperdu.com/images/ships/". $_SESSION[ships][$_SESSION[user]["shiptype"]]['shipimage']."\"></td>";
echo "<td>";
echo "  <table class=\"data\" style=\"width: 150\">";
echo "  <tr>";
echo "  <td style=\"color:#A78959; font-weight: bold\">Hull</td>";
echo " <td width=50>";

	for($x = MINHULL; $x <  $_SESSION[user]["hull"] && $x < MAXHULL; $x=$x+HULLSCALER)
		{
			echo "<img src=\"http://blackbeard.voyageurperdu.com/images/brownbar.png\">";
		}
echo "  </td><td style=\"color:#A78959;  font-weight: bold; align:center\">". $_SESSION[user]["hull"] ."</td>";
echo "  </tr>";
echo "  <td style=\"color:#000000; font-weight: bold\">Cannon</td>";
echo "  <td style=\"width: 50px\">";

	for($x = MINCANNON; $x < $_SESSION[user]["cannon"]  && $x < MAXCANNON; $x=$x+CANNONSCALER)
		{
			echo "<img src=\"http://blackbeard.voyageurperdu.com/images/blackbar.png\">";
		}

echo "  </td><td style=\"color:#000000; font-weight: bold; align:center\">". $_SESSION[user]["cannon"]  ."</td>";
echo " </tr>";
echo "  <td style=\"color:#007E00; font-weight: bold\">Armor</td>";
echo "  <td style=\"width: 50px\">";

	for($x = MINARMOR; $x <$_SESSION[user]["armour"]  && $x < MAXARMOR; $x=$x+ARMORSCALER)
		{
			echo "<img src=\"http://blackbeard.voyageurperdu.com/images/lightgreenbar.png\">";
		}

echo "  </td><td style=\"color:#007E00; font-weight: bold; align:center\">". $_SESSION[user]["armour"]  ."</td>";
echo " </tr>";
echo "  </table>";

echo "</td>";
echo "</tr>";
echo "</table>";

?>
Return current item: Blackbeard's Revenge