<table width="450" align="center" border="0" cellpadding="1" cellspacing="1" class="style_outer"><tr><td> <table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner"> <form name="minerals_form" method="post" action="' . parse_link('a=mines') . '" onSubmit="return deactivate_buttons();"> <tr> <td width="350"><b>' . $BUILDING_NAME[$game->player['user_race']][2] . '</b> (<img src="' . $game->GFX_PATH . 'menu_mineral_small.gif"> <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerTickMineral() . '' : '' . ResourcesPerTickMineral() . '') . '</b> <i>' . constant($game->sprache("TEXT11")) . '</i> / <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerHourMineral() . '' : '' . ResourcesPerHourMineral() . '') . '</b> <i>' . constant($game->sprache("TEXT12")) . '</i>)</td> <td width="100" rowspan="2" align="center" valign="middle"><input class="button" type="submit" name="submit" value="' . constant($game->sprache("TEXT13")) . '"></td> </tr> <tr> <td width="300">' . constant($game->sprache("TEXT14")) . ' <select name="worker">' . $minerals_option_html . '</select></td> </tr> <input type="hidden" name="type" value="2"> </form> </table> </td></tr></table> <br><br> <table width="450" align="center" border="0" cellpadding="1" cellspacing="1" class="style_outer"><tr><td> <table width="450" align="center" border="0" cellpadding="2" cellspacing="2" class="style_inner"> <form name="latinum_form" method="post" action="' . parse_link('a=mines') . '" onSubmit="return deactivate_buttons();"> <tr> <td width="350"><b>' . $BUILDING_NAME[$game->player['user_race']][3] . '</b> (<img src="' . $game->GFX_PATH . 'menu_latinum_small.gif"> <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerTickLatinum() . '' : '' . ResourcesPerTickLatinum() . '') . '</b> <i>' . constant($game->sprache("TEXT11")) . '</i> / <b>' . ($ress_tax != 0 ? '' . $ress_tax * ResourcesPerHourLatinum() . '' : '' . ResourcesPerHourLatinum() . '') . '</b> <i>' . constant($game->sprache("TEXT12")) . '</i>)</td> <td width="100" rowspan="2" align="center" valign="middle"><input class="button" type="submit" name="submit" value="' . constant($game->sprache("TEXT13")) . '"></td> </tr> <tr> <td width="300">' . constant($game->sprache("TEXT14")) . ' <select name="worker">' . $latinum_option_html . '</select></td> </tr> <input type="hidden" name="type" value="3"> </form> </table> </td></tr></table> '); }
$sql = 'SELECT p.*, u.user_id, u.user_race, u.user_vacation_start, u.user_vacation_end FROM (planets p) LEFT join (user u) ON u.user_id = p.planet_owner WHERE p.recompute_static = 1'; if (($q_planets = $db->query($sql)) === false) { $sdl->log('<b>Error:</b> Could not query planets data to recompute static planet values! - SKIPPED'); } else { $n_recomputed = 0; while ($planet = $db->fetchrow($q_planets)) { if (empty($planet['user_id'])) { continue; } $add_1 = ResourcesPerTickMetal($planet); $add_2 = ResourcesPerTickMineral($planet); $add_3 = ResourcesPerTickLatinum($planet); $add_4 = $planet['rateo_4'] * $RACE_DATA[$planet['user_race']][12] + $planet['research_1'] * $RACE_DATA[$planet['user_race']][20] * 0.1 + $planet['research_2'] * $RACE_DATA[$planet['user_race']][20] * 0.2; if ($ACTUAL_TICK >= $planet['user_vacation_start'] && $ACTUAL_TICK <= $planet['user_vacation_end']) { $add_1 *= 0.2; $add_2 *= 0.2; $add_3 *= 0.2; $add_4 *= 0.2; } $sql = 'UPDATE planets SET add_1 = ' . $add_1 . ', add_2 = ' . $add_2 . ', add_3 = ' . $add_3 . ', add_4 = ' . $add_4 . ', recompute_static = 0, max_resources = ' . ($PLANETS_DATA[$planet['planet_type']][6] + $planet['building_12'] * 20000 * $RACE_DATA[$planet['user_race']][20]) . ', max_worker = ' . ($PLANETS_DATA[$planet['planet_type']][7] + $planet['research_1'] * $RACE_DATA[$planet['user_race']][20] * 500) . ',