示例#1
0
            }
            if ($dev_minedeflector_number) {
                $query = $query . ", dev_minedeflector=dev_minedeflector+{$dev_minedeflector_number}";
                BuildTwoCol("{$l_deflect} {$l_trade_added}:", $dev_minedeflector_number, "left", "right");
            }
            if ($escapepod_purchase && $playerinfo['dev_escapepod'] != 'Y') {
                $query = $query . ", dev_escapepod='Y'";
                BuildOneCol("{$l_escape_pod} {$l_trade_installed}");
            }
            if ($fuelscoop_purchase && $playerinfo['dev_fuelscoop'] != 'Y') {
                $query = $query . ", dev_fuelscoop='Y'";
                BuildOneCol("{$l_fuel_scoop} {$l_trade_installed}");
            }
            if ($lssd_purchase && $playerinfo['dev_lssd'] != 'Y') {
                $query = $query . ", dev_lssd='Y'";
                BuildOneCol("Warp Analyser {$l_trade_installed}");
            }
            $query = $query . ", turns=turns-1, turns_used=turns_used+1 WHERE ship_id={$playerinfo['ship_id']}";
            $purchase = $db->Execute("{$query}");
            db_op_result($db, $purchase, __LINE__, __FILE__, $db_logging);
            #           if ($colonist_max < 0 )
            #           {
            #               BuildTwoCol("<span style='color:#f00;'>Detected Overflow</span>", "<span style='color:#0f0;'>Fixed</span>", "left", "right");
            #               $resx = $db->Execute("UPDATE {$db->prefix}ships SET ship_ore=0, ship_organics=0, ship_goods=0, ship_energy=0, ship_colonists =0 WHERE ship_id=$playerinfo[ship_id] LIMIT 1;");
            #               db_op_result ($db, $resx, __LINE__, __FILE__, $db_logging);
            #           }
            $hull_upgrade = 0;
            echo "</tbody></table>";
            ?>
</div>
<?php 
示例#2
0
      BuildTwoCol("$l_deflect $l_trade_added:", NUMBER($dev_minedeflector_number) , "left", "right" );
      }
      if(($escapepod_purchase) && ($shipinfo[dev_escapepod] != 'Y'))
      {
        $query = $query . ", dev_escapepod='Y'";
        BuildOneCol("$l_escape_pod $l_trade_installed");
      }
      if(($fuelscoop_purchase) && ($shipinfo[dev_fuelscoop] != 'Y'))
      {
        $query = $query . ", dev_fuelscoop='Y'";
        BuildOneCol("$l_fuel_scoop $l_trade_installed");
      }
      if(($lssd_purchase) && ($shipinfo[dev_lssd] != 'Y'))
      {
        $query = $query . ", dev_lssd='Y'";
        BuildOneCol("$l_lssd $l_trade_installed");
      }
      $query = $query . " WHERE player_id=$playerinfo[player_id] AND ship_id=$playerinfo[currentship]";
	  //echo "DEBUG: query = $query<br>";
      $purchase = $db->Execute("$query");
	  $query2 = "UPDATE $dbtables[players] SET credits=credits-$total_cost, turns=turns-1, turns_used=turns_used+1 WHERE player_id=$playerinfo[player_id]";
      $purchase = $db->Execute("$query2");
	  //echo "DEBUG: query2 = $query2<br>";
      $hull_upgrade=0;
      echo "
      </table>
      ";
    }
  }
  elseif($sectorinfo[port_type] != "none")
  {