//Para ajustar a dos columnas if($c1 <= 1){$c1++;}else{$ap1 .= "</tr><tr>";$c1 = 1; } } }***/ if ($user['current_luna'] == $lunarow['id_luna'] && $planetrow['galaxy'] == $lunarow['galaxy'] && $planetrow['system'] == $lunarow['system'] && $planetrow['planet'] == $lunarow['lunapos']) { $parse['moon_img'] = "<img src=\"{dpath}planeten/{$lunarow['image']}.jpg\" height=\"50\" width=\"50\">"; $parse['moon'] = $lunarow['name']; } else { $parse['moon_img'] = ""; $parse['moon'] = ""; } #Moon END $parse['planet_name'] = $planetrow['name']; $parse['planet_diameter'] = $planetrow['diameter']; $parse['planet_field_current'] = $planetrow['field_current']; $parse['planet_field_max'] = get_max_field($planetrow); $parse['planet_temp_min'] = $planetrow['temp_min']; $parse['planet_temp_max'] = $planetrow['temp_max']; $parse['galaxy_galaxy'] = $galaxyrow['galaxy']; $parse['galaxy_planet'] = $galaxyrow['planet']; $parse['galaxy_system'] = $galaxyrow['system']; $parse['user_points'] = pretty_number($user['points_points'] / 1000); $rank = doquery("SELECT COUNT(DISTINCT(id)) FROM {{table}} WHERE points_points>={$user['points_points']}", "users", true); $parse['user_rank'] = $rank[0]; $parse['u_user_rank'] = $rank[0]; $parse['user_username'] = $user['username']; $parse['fleet_list'] = $fpage; $parse['energy_used'] = $planetrow["energy_max"] - $planetrow["energy_used"]; $parse['Have_new_message'] = $Have_new_message; $parse['time'] = date("D M d H:i:s", time()); $parse['dpath'] = $dpath;
default: //----------------------------------------------------------------- /* La construccion se controla aqui. Se decide construir, o calcelar la construccion tambien se toma y quita los recursos. */ $_GET["bau"] = intval($_GET["bau"]); $_GET["unbau"] = intval($_GET["unbau"]); if (in_array($_GET["bau"], $reslist['build']) && $user['urlaubs_modus'] == 0) { check_field_current($planetrow); //hay que arreglar este mensaje de advertencia... if ($user["b_tech_planet"] != 0 && $_GET["bau"] == 31 && $game_config['allow_invetigate_while_lab_is_update'] != 1) { message($lang['Cant_build_lab_while_invetigate'], $lang['Build_lab']); } //comprobamos si hay espacio para construir if ($planetrow["field_current"] < get_max_field($planetrow) && $planetrow["b_building_id"] == 0 && is_tech_available($user, $planetrow, $_GET["bau"]) && is_buyable($user, $planetrow, @$_GET["bau"])) { /* Especular el tiempo de construccion, se puede establecer una funcion aparte, pero todavia tengo el problema para averiguar el tiempo de construcciones... */ $planetrow["b_building_id"] = $_GET["bau"]; //ahora se restan los recursos $costs = get_building_price($user, $planetrow, $_GET["bau"]); //descontamos, solo en vista $planetrow['metal'] -= $costs['metal']; $planetrow['crystal'] -= $costs['crystal']; $planetrow['deuterium'] -= $costs['deuterium']; LWCore::getPlanet()->metal = $planetrow['metal']; LWCore::getPlanet()->crystal = $planetrow['crystal']; LWCore::getPlanet()->deuterium = $planetrow['deuterium']; //error("$cost_metal/".$planetrow["metal"]." - $cost_crystal/".$planetrow["crystal"]." - $cost_deuterium/".$planetrow["deuterium"]."/","");