if ($numrows == 0) {
     echo 'You don\'t have any creatures yet.';
 } else {
     unset($array);
     $dead = 0;
     $busy = 0;
     $passive = 0;
     $cost = 0;
     $array = array();
     while ($row = $db->fetch_array($result)) {
         $creature = new Creature($row);
         $row["skill"] = $creature->data["sortskill"];
         $array[] = $row;
         if ($row["dead"] == 1) {
             $dead++;
             $cost += round($creature->powerSkill() * gdResurrectMultiplier);
         } elseif ($row["status"] == 2 || $row["status"] == 3 || $row["status"] == 4 || $row["status"] == 6) {
             $busy++;
         } else {
             $passive++;
         }
     }
     echo "<br>{$numrows} creatures: {$passive} passive, {$busy} busy and {$dead} dead.<br>";
     if ($dead > 0) {
         if ($acc["power"] < $cost) {
             echo '<a href="index.php?page=creatures&action=resurrectall">Resurrect as many creatures as possible</a> (', $cost, ' power)<br>';
         } else {
             echo '<a href="index.php?page=creatures&action=resurrectall">Resurrect all</a> (', $cost, ' power)<br>';
         }
     }
     tBegin();