function standard_report()
{
  global $db;
  global $res;
  global $playerinfo;
  global $dbtables;
  global $username;
  global $sort;
  global $query;
  global $color_header, $color, $color_line1, $color_line2;
  global $l_pr_teamlink, $l_pr_clicktosort;
  global $l_sector, $l_name, $l_unnamed, $l_ore, $l_organics, $l_goods, $l_energy, $l_colonists, $l_credits, $l_fighters, $l_torps, $l_base, $l_selling, $l_pr_totals, $l_yes, $l_no;

  echo "Planetary report descriptions and <B><A HREF=planet-report.php?PRepType=0>menu</A></B><BR>" .
       "<BR>" .
       "<B><A HREF=planet-report.php?PRepType=2>Change Production</A></B> &nbsp;&nbsp; <B>Base Required</B> on Planet<BR>";
  echo "<br><B><A HREF=planet-report.php?PRepType=3>Set Planet Commodity Sale Prices</A></B><BR>";
  if ($playerinfo[team]>0)
  {
    echo "<BR>" .
         "<B><A HREF=alliance-planets.php>$l_pr_teamlink</A></B><BR> " . 
         "<BR>";
  }


  $query = "SELECT * FROM $dbtables[planets] WHERE owner=$playerinfo[player_id]";

  if(!empty($sort))
  {
    $query .= " ORDER BY";
    if($sort == "name")
    {
      $query .= " $sort ASC";
    }
    elseif($sort == "organics" || $sort == "ore" || $sort == "goods" || $sort == "energy" ||
      $sort == "colonists" || $sort == "credits" || $sort == "fighters")
    {
      $query .= " $sort DESC, sector_id ASC";
    }
    elseif($sort == "torp")
    {
      $query .= " torps DESC, sector_id ASC";
    }
    elseif($sort == "piq")
    {
      $query .= " tech_level DESC, sector_id ASC";
    }
	else
    {
      $query .= " sector_id ASC";
    }

  }
  else
  {
     $query .= " ORDER BY sector_id ASC";
  }
  if (isset($limit)) {
  	$query .= " LIMIT $limit,10";
  }
  $res = $db->Execute($query);

  $i = 0;
  if($res)
  {
    while(!$res->EOF)
    {
      $planet[$i] = $res->fields;
      $i++;
      $res->MoveNext();
    }
  }

  $num_planets = $i;
  if($num_planets < 1)
  {
    echo "<BR>$l_pr_noplanet";
  }
  else
  {

    echo "<BR>";
    echo "<H2>You have $num_planets planets</H2>";
	echo "Sort by maximum: <a href=planet-report.php>Sector</a> <a href=planet-report.php?sort=organics>Organics</a> <a href=planet-report.php?sort=ore>Ore</a> <a href=planet-report.php?sort=goods>Goods</a> <a href=planet-report.php?sort=energy>Energy</a> <a href=planet-report.php?sort=colonists>Colonists</a> <a href=planet-report.php?sort=credits>Credits</a> <a href=planet-report.php?sort=fighters>Fighters</a> <a href=planet-report.php?sort=piq>Planet IQ</a><p>";
    $total_organics = 0;
    $total_ore = 0;
    $total_goods = 0;
    $total_energy = 0;
    $total_colonists = 0;
    $total_credits = 0;
    $total_fighters = 0;
    $total_torp = 0;
    $total_base = 0;
    $total_corp = 0;
    $total_selling = 0;
	$total_piq = 0;
    $color = $color_line1;
    for($i=0; $i<$num_planets; $i++)
    {
      $total_organics += $planet[$i][organics];
      $total_ore += $planet[$i][ore];
      $total_goods += $planet[$i][goods];
      $total_energy += $planet[$i][energy];
      $total_colonists += $planet[$i][colonists];
      $total_credits += $planet[$i][credits];
      $total_fighters += $planet[$i][fighters];
      $total_torp += $planet[$i][torps];
	  $total_piq += $planet[$i][tech_level];
      if($planet[$i][base] == "Y")
      {
        $total_base += 1;
      }
      if($planet[$i][corp] > 0)
      {
        $total_corp += 1;
      }
      if($planet[$i][sells] == "Y")
      {
        $total_selling += 1;
      }
      if(empty($planet[$i][name]))
      {
        $planet[$i][name] = $l_unnamed;
      }
	  echo "<TABLE WIDTH=100% BORDER=1 CELLSPACING=0 CELLPADDING=2>";
      echo "<TR BGCOLOR=\"$color\">";
      echo "<TD COLSPAN=2 align=center><B>Planet: " . $planet[$i][name] . "<BR>Sector: <A HREF=rsmove.php?engage=1&destination=". $planet[$i][sector_id] . "&kk=".date("U").">". $planet[$i][sector_id] ."</A></B></TD>";
      echo "</TR>\n";
      echo "<TR><TD>Ore</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][ore]) . "</TD></TR>";
      echo "<TR><TD>Organics</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][organics]) . "</TD></TR>";
      echo "<TR><TD>Goods</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][goods]) . "</TD></TR>";
      echo "<TR><TD>Energy</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][energy]) . "</TD></TR>";
      echo "<TR><TD>Colonists</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][colonists]) . "</TD></TR>";
      echo "<TR><TD>Credits</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][credits]) . "</TD></TR>";
      //echo "<TD ALIGN=CENTER>" . "<INPUT TYPE=CHECKBOX NAME=TPCreds[] VALUE=\"" . $planet[$i]["planet_id"] . "\">" . "</TD>";
      echo "<TR><TD>Fighters</TD><TD ALIGN=CENTER>"  . NUMBER($planet[$i][fighters]) . "</TD></TR>";
      echo "<TR><TD>Torpedoes</TD><TD ALIGN=CENTER>"  . NUMBER($planet[$i][torps]) . "</TD></TR>";
      echo "<TR><TD>Base?</TD><TD ALIGN=CENTER>" . base_build_check($planet, $i) . "</TD></TR>";
      if($playerinfo[team] > 0)
        echo "<TR><TD>Alliance<BR>Planet</TD><TD ALIGN=CENTER>" . ($planet[$i][corp] > 0  ? "$l_yes" : "$l_no") . "</TD></TR>";
      echo "<TR><TD>Sells Commodities?</TD><TD ALIGN=CENTER>" . ($planet[$i][sells] == 'Y' ? "$l_yes" : "$l_no") . "</TD></TR>";
	  echo "<TR><TD>Planet IQ</TD><TD ALIGN=CENTER>" . NUMBER($planet[$i][tech_level]) . "</TD></TR>";
      //echo "</TR>";
      if($color == $color_line1)
      {
        $color = $color_line2;
      }
      else
      {
        $color = $color_line1;
      }
	 echo "</TABLE><P>";
    }
	echo "<TABLE WIDTH=100% BORDER=1 CELLSPACING=0 CELLPADDING=2>";
    // the next block displays the totals
    echo "<TR BGCOLOR=$color>";
    echo "<TD COLSPAN=2 ALIGN=CENTER><H2>$l_pr_totals</H2></TD>";
    echo "<TR><TD>Total Ore</TD><TD ALIGN=CENTER>" . NUMBER($total_ore) . "</TD></TR>";
    echo "<TR><TD>Total Organics</TD><TD ALIGN=CENTER>" . NUMBER($total_organics) . "</TD></TR>";
    echo "<TR><TD>Total Goods</TD><TD ALIGN=CENTER>" . NUMBER($total_goods) . "</TD></TR>";
    echo "<TR><TD>Total Energy</TD><TD ALIGN=CENTER>" . NUMBER($total_energy) . "</TD></TR>";
    echo "<TR><TD>Total Colonists</TD><TD ALIGN=CENTER>" . NUMBER($total_colonists) . "</TD></TR>";
    echo "<TR><TD>Total Credits</TD><TD ALIGN=CENTER>" . NUMBER($total_credits) . "</TD></TR>";
    echo "<TR><TD>Total Fighters</TD><TD ALIGN=CENTER>"  . NUMBER($total_fighters) . "</TD></TR>";
    echo "<TR><TD>Total Torpedoes</TD><TD ALIGN=CENTER>"  . NUMBER($total_torp) . "</TD></TR>";
    echo "<TR><TD>Total Bases</TD><TD ALIGN=CENTER>" . NUMBER($total_base) . "</TD></TR>";
    if($playerinfo[team] > 0)
      echo "<TR><TD>Number of Alliance Planets<TD ALIGN=CENTER>" . NUMBER($total_corp) . "</TD></TR>";
    echo "<TR><TD>Number of Planets Selling Commodities<TD ALIGN=CENTER>" . NUMBER($total_selling) . "</TD></TR>";
	echo "<TR><TD>Total Planet IQ</TD><TD ALIGN=CENTER>"  . NUMBER($total_piq) . "</TD></TR>";
    echo "</TABLE>";

    echo "<BR>";
    //echo "<INPUT TYPE=SUBMIT VALUE=\"Collect Credits\">  <INPUT TYPE=RESET VALUE=RESET>";
    //echo "</FORM>";
  }
}
示例#2
0
 public static function standardReport(\PDO $pdo_db, array $langvars, array $playerinfo, $sort, Reg $tkireg)
 {
     echo "<div style='width:90%; margin:auto; font-size:14px;'>\n";
     echo "Planetary report descriptions and <strong><a href=\"planet_report.php?preptype=0\">menu</a></strong><br><br>" . "<strong><a href=\"planet_report.php?preptype=2\">Change Production</a></strong> &nbsp;&nbsp; <strong>Base Required</strong> on Planet<br>";
     if ($playerinfo['team'] > 0) {
         echo "<br><strong><a href=team_planets.php>" . $langvars['l_pr_teamlink'] . "</a></strong><br> <br>";
     }
     $sql = "SELECT * FROM ::prefix::planets WHERE owner=:owner";
     if ($sort !== null) {
         $sql .= " ORDER BY";
         if ($sort == "name") {
             $sql .= " name ASC";
         } elseif ($sort == "organics" || $sort == "ore" || $sort == "goods" || $sort == "energy" || $sort == "colonists" || $sort == "credits" || $sort == "fighters") {
             $sql .= " {$sort} DESC, sector_id ASC";
         } elseif ($sort == "torp") {
             $sql .= " torps DESC, sector_id ASC";
         } else {
             $sql .= " sector_id ASC";
         }
     } else {
         $sql .= " ORDER BY sector_id ASC";
     }
     $stmt = $pdo_db->prepare($sql);
     $stmt->bindParam(':owner', $playerinfo['ship_id']);
     $stmt->execute();
     $planet_owner_present = $stmt->fetchAll(PDO::FETCH_ASSOC);
     $i = 0;
     $planet = array();
     if ($planet_owner_present !== null) {
         foreach ($planet_owner_present as $tmp_owner) {
             $planet[$i] = $tmp_owner['link_dest'];
             $i++;
         }
     }
     $num_planets = $i;
     if ($num_planets < 1) {
         echo "<br>" . $langvars['l_pr_noplanet'];
     } else {
         echo "<br>";
         echo "<form accept-charset='utf-8' action=planet_report_ce.php method=post>";
         // Next block of echo 's creates the header of the table
         echo $langvars['l_pr_clicktosort'] . "<br><br>";
         echo "<strong>WARNING:</strong> \"Build\" and \"Take Credits\" will cause your ship to move. <br><br>";
         echo "<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>";
         echo "<tr bgcolor=\"{$tkireg->color_header}\" valign=bottom>";
         echo "<td><strong><a href=\"planet_report.php?preptype=1&amp;sort=sector_id\">" . $langvars['l_sector'] . "</a></strong></td>";
         echo "<td><strong><a href=\"planet_report.php?preptype=1&amp;sort=name\">" . $langvars['l_name'] . "</a></strong></td>";
         echo "<td><strong><a href=\"planet_report.php?preptype=1&amp;sort=ore\">" . $langvars['l_ore'] . "</a></strong></td>";
         echo "<td><strong><a href=\"planet_report.php?preptype=1&amp;sort=organics\">" . $langvars['l_organics'] . "</a></strong></td>";
         echo "<td><strong><a href=\"planet_report.php?preptype=1&amp;sort=goods\">" . $langvars['l_goods'] . "</a></strong></td>";
         echo "<td><strong><a href=\"planet_report.php?preptype=1&amp;sort=energy\">" . $langvars['l_energy'] . "</a></strong></td>";
         echo "<td align=center><strong><a href=\"planet_report.php?preptype=1&amp;sort=colonists\">" . $langvars['l_colonists'] . "</a></strong></td>";
         echo "<td align=center><strong><a href=\"planet_report.php?preptype=1&amp;sort=credits\">" . $langvars['l_credits'] . "</a></strong></td>";
         echo "<td align=center><strong>Take<br>Credits</strong></td>";
         echo "<td align=center><strong><a href=\"planet_report.php?preptype=1&amp;sort=fighters\">" . $langvars['l_fighters'] . "</a></strong></td>";
         echo "<td align=center><strong><a href=\"planet_report.php?preptype=1&amp;sort=torp\">" . $langvars['l_torps'] . "</a></strong></td>";
         echo "<td align=right><strong>" . $langvars['l_base'] . "?</strong></td>";
         if ($playerinfo['team'] > 0) {
             echo "<td align=right><strong>Team?</strong></td>";
         }
         echo "<td align=right><strong>" . $langvars['l_selling'] . "?</strong></td>";
         // Next block of echo 's fils the table and calculates the totals of all the commoditites as well as counting the bases and selling planets
         echo "</tr>";
         $total_organics = 0;
         $total_ore = 0;
         $total_goods = 0;
         $total_energy = 0;
         $total_colonists = 0;
         $total_credits = 0;
         $total_fighters = 0;
         $total_torp = 0;
         $total_base = 0;
         $total_team = 0;
         $total_selling = 0;
         $color = $tkireg->color_line1;
         for ($i = 0; $i < $num_planets; $i++) {
             $total_organics += $planet[$i]['organics'];
             $total_ore += $planet[$i]['ore'];
             $total_goods += $planet[$i]['goods'];
             $total_energy += $planet[$i]['energy'];
             $total_colonists += $planet[$i]['colonists'];
             $total_credits += $planet[$i]['credits'];
             $total_fighters += $planet[$i]['fighters'];
             $total_torp += $planet[$i]['torps'];
             if ($planet[$i]['base'] == "Y") {
                 $total_base++;
             }
             if ($planet[$i]['team'] > 0) {
                 $total_team++;
             }
             if ($planet[$i]['sells'] == "Y") {
                 $total_selling++;
             }
             if (empty($planet[$i]['name'])) {
                 $planet[$i]['name'] = $langvars['l_unnamed'];
             }
             echo "<tr bgcolor=\"{$color}\">";
             echo "<td><a href=rsmove.php?engage=1&destination=" . $planet[$i]['sector_id'] . ">" . $planet[$i]['sector_id'] . "</a></td>";
             echo "<td>" . $planet[$i]['name'] . "</td>";
             echo "<td>" . number_format($planet[$i]['ore'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td>" . number_format($planet[$i]['organics'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td>" . number_format($planet[$i]['goods'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td>" . number_format($planet[$i]['energy'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td align=right>" . number_format($planet[$i]['colonists'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td align=right>" . number_format($planet[$i]['credits'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td align=center>" . "<input type=checkbox name=TPCreds[] value=\"" . $planet[$i]['planet_id'] . "\">" . "</td>";
             echo "<td align=right>" . number_format($planet[$i]['fighters'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td align=right>" . number_format($planet[$i]['torps'], 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
             echo "<td align=center>" . base_build_check($langvars, $planet, $i) . "</td>";
             if ($playerinfo['team'] > 0) {
                 echo "<td align=center>" . ($planet[$i]['team'] > 0 ? $langvars['l_yes'] : $langvars['l_no']) . "</td>";
             }
             echo "<td align=center>" . ($planet[$i]['sells'] == 'Y' ? $langvars['l_yes'] : $langvars['l_no']) . "</td>";
             echo "</tr>";
             if ($color == $tkireg->color_line1) {
                 $color = $tkireg->color_line2;
             } else {
                 $color = $tkireg->color_line1;
             }
         }
         // the next block displays the totals
         echo "<tr bgcolor={$color}>";
         echo "<td COLSPAN=2 align=center>" . $langvars['l_pr_totals'] . "</td>";
         echo "<td>" . number_format($total_ore, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td>" . number_format($total_organics, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td>" . number_format($total_goods, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td>" . number_format($total_energy, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td align=right>" . number_format($total_colonists, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td align=right>" . number_format($total_credits, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td></td>";
         echo "<td align=right>" . number_format($total_fighters, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td align=right>" . number_format($total_torp, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "<td align=center>" . number_format($total_base, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         if ($playerinfo['team'] > 0) {
             echo "<td align=center>" . number_format($total_team, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         }
         echo "<td align=center>" . number_format($total_selling, 0, $langvars['local_number_dec_point'], $langvars['local_number_thousands_sep']) . "</td>";
         echo "</tr>";
         echo "</table>";
         echo "<br>";
         echo "<input type=submit value=\"Collect Credits\">  <input type=reset value=reset>";
         echo "</form>";
     }
     echo "</div>\n";
 }
示例#3
0
function standard_report()
{
    global $db, $db_logging;
    global $res;
    global $playerinfo;
    global $username;
    global $sort;
    global $query;
    global $color_header, $color, $color_line1, $color_line2;
    global $l_pr_teamlink, $l_pr_clicktosort;
    global $l_sector, $l_name, $l_unnamed, $l_ore, $l_organics, $l_goods, $l_energy, $l_colonists, $l_credits, $l_fighters, $l_torps, $l_base;
    global $l_selling, $l_pr_totals, $l_yes, $l_no;
    echo "<div style='width:100%; margin:auto; font-size:14px;'>\n";
    echo "Planetary report descriptions and <strong><a href=\"planet_report.php?PRepType=0\">menu</a></strong><br><br>" . "<strong><a href=\"planet_report.php?PRepType=2\">Change Production</a></strong> &nbsp;&nbsp; <strong>Base Required</strong> on Planet<br>";
    if ($playerinfo['team'] > 0) {
        echo "<br><strong><a href=team_planets.php>{$l_pr_teamlink}</a></strong><br> <br>";
    }
    $query = "SELECT * FROM {$db->prefix}planets WHERE owner={$playerinfo['ship_id']}";
    if (!empty($sort)) {
        $query .= " ORDER BY";
        if ($sort == "name") {
            $query .= " {$sort} ASC";
        } elseif ($sort == "organics" || $sort == "ore" || $sort == "goods" || $sort == "energy" || $sort == "colonists" || $sort == "credits" || $sort == "fighters") {
            $query .= " {$sort} DESC, sector_id ASC";
        } elseif ($sort == "torp") {
            $query .= " torps DESC, sector_id ASC";
        } else {
            $query .= " sector_id ASC";
        }
    } else {
        $query .= " ORDER BY sector_id ASC";
    }
    $res = $db->Execute($query);
    db_op_result($db, $res, __LINE__, __FILE__, $db_logging);
    $i = 0;
    if ($res) {
        while (!$res->EOF) {
            $planet[$i] = $res->fields;
            $i++;
            $res->MoveNext();
        }
    }
    global $l_pr_noplanet;
    $num_planets = $i;
    if ($num_planets < 1) {
        echo "<br>" . $l_pr_noplanet;
    } else {
        echo "<br>";
        echo "<form action=planet_report_ce.php method=post>";
        // Next block of echo's creates the header of the table
        echo $l_pr_clicktosort . "<br><br>";
        echo "<strong>WARNING:</strong> \"Build\" and \"Take Credits\" will cause your ship to move. <br><br>";
        /*
        Start table
        */
        ?>
		<div class="planet-table-container">
		<?php 
        echo "<table><tbody>";
        echo "<tr>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=sector_id\">Sector</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=ore\">Ore</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=organics\">Organics</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=goods\">Goods</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=energy\">Energy</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=colonists\">Colonists</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=credits\">Credits</a></td>";
        echo "<td></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=fighters\">Fighters</a></td>";
        echo "<td><a href=\"planet_report.php?PRepType=1&amp;sort=torp\">Torpedoes</a></td>";
        // Next block of echo's fils the table and calculates the totals of all the commoditites as well as counting the bases and selling planets
        echo "</tr>";
        $total_organics = 0;
        $total_ore = 0;
        $total_goods = 0;
        $total_energy = 0;
        $total_colonists = 0;
        $total_credits = 0;
        $total_fighters = 0;
        $total_torp = 0;
        $total_base = 0;
        $total_corp = 0;
        $total_selling = 0;
        for ($i = 0; $i < $num_planets; $i++) {
            $total_organics += $planet[$i]['organics'];
            $total_ore += $planet[$i]['ore'];
            $total_goods += $planet[$i]['goods'];
            $total_energy += $planet[$i]['energy'];
            $total_colonists += $planet[$i]['colonists'];
            $total_credits += $planet[$i]['credits'];
            $total_fighters += $planet[$i]['fighters'];
            $total_torp += $planet[$i]['torps'];
            if ($planet[$i]['base'] == "Y") {
                $total_base += 1;
            }
            if ($planet[$i]['corp'] > 0) {
                $total_corp += 1;
            }
            if ($planet[$i]['sells'] == "Y") {
                $total_selling += 1;
            }
            if (empty($planet[$i]['name'])) {
                $planet[$i]['name'] = $l_unnamed;
            }
            if ($playerinfo['team'] > 0) {
                $ranking_colspan_control = 4;
            } else {
                $ranking_colspan_control = 6;
            }
            echo "<tr>";
            echo "<td><a href=rsmove.php?engage=1&destination=" . $planet[$i]['sector_id'] . ">" . $planet[$i]['sector_id'] . "</a></td>";
            echo "<td>" . NUMBER($planet[$i]['ore']) . "</td>";
            echo "<td>" . NUMBER($planet[$i]['organics']) . "</td>";
            echo "<td>" . NUMBER($planet[$i]['goods']) . "</td>";
            echo "<td>" . NUMBER($planet[$i]['energy']) . "</td>";
            echo "<td>" . NUMBER($planet[$i]['colonists']) . "</td>";
            echo "<td><span class='table_word_gold'>" . NUMBER($planet[$i]['credits']) . "</span></td>";
            echo "<td><div class='checkbox-round'><input type='checkbox' id='roundedOne_collect_" . $planet[$i]['planet_id'] . "' name=TPCreds[] value=\"" . $planet[$i]['planet_id'] . "\"><label for='roundedOne_collect_" . $planet[$i]['planet_id'] . "'></label></div></td>";
            echo "<td>" . NUMBER($planet[$i]['fighters']) . "</td>";
            echo "<td>" . NUMBER($planet[$i]['torps']) . "</td>";
            echo "</tr><tr>";
            echo "<td colspan='" . $ranking_colspan_control . "' class='planet-name'>Name: <span class='table_word_green'>" . $planet[$i]['name'] . "</span></td>";
            if (base_build_check($planet, $i) == "Yes") {
                $ranking_base_info = "Yes! [<a href='planet_report.php?PRepType=2'>Edit >></a>]";
            } else {
                if (base_build_check($planet, $i) == "No") {
                    $ranking_base_info = "<span class='table_word_red'>No</span>";
                } else {
                    $ranking_base_info = "<span class='table_word_red'>No</span> [" . base_build_check($planet, $i) . "]";
                }
            }
            echo "<td colspan='2'><span class='table_word_faded'>Has Base? " . $ranking_base_info . "</span></td>";
            if ($playerinfo['team'] > 0) {
                echo "<td colspan='2'><span class='table_word_faded'>Is Corporate? " . ($planet[$i]['corp'] > 0 ? "{$l_yes}" : "{$l_no}") . "</span></td>";
            }
            echo "<td colspan='2'><span class='table_word_faded'>Set To Sell? " . ($planet[$i]['sells'] == 'Y' ? "{$l_yes}" : "{$l_no}") . "</span></td>";
            echo "</tr>";
            if ($color == $color_line1) {
                $color = $color_line2;
            } else {
                $color = $color_line1;
            }
        }
        // the next block displays the totals
        echo "<tr>";
        echo "<td>Total:</td>";
        echo "<td>" . NUMBER($total_ore) . "</td>";
        echo "<td>" . NUMBER($total_organics) . "</td>";
        echo "<td>" . NUMBER($total_goods) . "</td>";
        echo "<td>" . NUMBER($total_energy) . "</td>";
        echo "<td>" . NUMBER($total_colonists) . "</td>";
        echo "<td colspan='2'><span class='table_word_yellow'>" . NUMBER($total_credits) . "</span></td>";
        echo "<td>" . NUMBER($total_fighters) . "</td>";
        echo "<td>" . NUMBER($total_torp) . "</td>";
        echo "</tr><tr>";
        echo "<td colspan='" . $ranking_colspan_control . "' class='planet-name'></td>";
        echo "<td colspan='2'><span class='table_word_faded'>Total With Base: " . NUMBER($total_base) . "</span></td>";
        if ($playerinfo['team'] > 0) {
            echo "<td colspan='2'><span class='table_word_faded'>Total Corporate: " . NUMBER($total_corp) . "</span></td>";
        }
        echo "<td colspan='2'><span class='table_word_faded'>Total Set To Sell: " . NUMBER($total_selling) . "</span></td>";
        echo "</tr>";
        echo "</tbody></table>";
        ?>
        </div>
        <?php 
        echo "<br>";
        echo "<input type=submit value=\"Collect Credits\">  <input type=reset value=reset>";
        echo "</form>";
    }
    echo "</div>\n";
}