echo $szDisabled; ?> type="text" name="init_roids[<?php echo $r['id']; ?> ]" value="" class="right" size="4" maxlength="3" style="padding:1px 2px;" /></td> <td class="right bl"><?php echo nummertje($p = applyRDChange('income_' . $r['id'], 0)); ?> </td> <td class="right"><?php echo nummertje($a = res_per_type($r['asteroids'])); ?> </td> <td class="right"><?php echo nummertje(($t = applyRDChange('income_' . $r['id'], res_per_type($r['asteroids']))) - $a - $p); ?> </td> <th class="right"><?php echo nummertje($t); ?> </th> </tr> <?php } ?> <tr class="bt"> <th class="right">Inactive</th> <td class="right" id="roids_amount_inactive"><?php echo nummertje($g_arrUser['inactive_asteroids']); ?>
//print_r($g_arrUnits); $allusers = db_select('galaxies g, planets p', 'p.galaxy_id = g.id ORDER BY x ASC, y ASC, z ASC'); foreach ($allusers as $arrUser) { $id = (int) $arrUser['id']; // R & D NEWS if ('1' === $GAMEPREFS['news_for_done_rd']) { $arrNames = array('d' => 'constructing', 'r' => 'researching'); $arrRD = db_select('d_r_d_available a, planet_r_d p', 'a.id = p.r_d_id AND p.eta = 1 AND p.planet_id = ' . $id); foreach ($arrRD as $rd) { AddNews(NEWS_SUBJECT_R_D, 'Your technicians have finished researching <b>' . $rd['name'] . '</b>.', $id); } db_update('planet_r_d', 'eta = eta-1', 'eta > 0 AND planet_id = ' . $id); } // RESOURCES foreach (db_select('planet_resources', 'planet_id = ' . $id) as $arrResource) { $iGain = applyRDChange('income_' . $arrResource['resource_id'], res_per_type($arrResource['asteroids']), $id); if (0 < $iGain) { db_update('planet_resources', 'amount = amount + ' . $iGain, 'planet_id = ' . $id . ' AND resource_id = ' . $arrResource['resource_id']); } } #continue; // COMBAT // SECTION F // De info van de personen die $id AANVALLEN | $id = battlefield $szAWhere = 'destination_planet_id = ' . $id . ' AND eta = 0 AND action = \'attack\' AND actiontime > 0 AND activated = \'1\''; $arrAttackingFleets = db_select_by_field('fleets', 'id', $szAWhere); if (0 < count($arrAttackingFleets)) { $iAttackingOwners = db_select_one('fleets', 'COUNT(DISTINCT owner_planet_id)', $szAWhere); $szDWhere = '(destination_planet_id = ' . $id . ' AND eta = 0 AND action = \'defend\' AND actiontime > 0 AND activated = \'1\') OR (owner_planet_id = ' . $id . ' AND ((destination_planet_id IS NULL AND eta = 0) OR activated != \'1\'))'; $arrDefendingFleets = db_select_by_field('fleets', 'id', $szDWhere); $iDefendingOwners = db_select_one('fleets', 'COUNT(DISTINCT owner_planet_id)', $szDWhere); if (empty($_GET['special'])) {