* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
';
$parse['file_images'] .= parsetemplate($row, $data);
// {file_names}
$data['text'] = $p['name'];
$parse['file_names'] .= parsetemplate($row2, $data);
// {file_coordinates}
$data['text'] = "[{$p['galaxy']}:{$p['system']}:{$p['planet']}]";
$parse['file_coordinates'] .= parsetemplate($row2, $data);
// {file_fields}
$data['text'] = $p['field_current'] . '/' . $p['field_max'];
$parse['file_fields'] .= parsetemplate($row2, $data);
// {file_metal}
$data['text'] = ''. pretty_number($p['metal']) .' / '. pretty_number($p['metal_perhour']);
$parse['file_metal'] .= parsetemplate($row2, $data);
// {file_crystal}
$data['text'] = ''. pretty_number($p['crystal']) .' / '. pretty_number($p['crystal_perhour']);
$parse['file_crystal'] .= parsetemplate($row2, $data);
// {file_deuterium}
$data['text'] = ''. pretty_number($p['deuterium']) .' / '. pretty_number($p['deuterium_perhour']);
$parse['file_deuterium'] .= parsetemplate($row2, $data);
// {file_energy}
$data['text'] = pretty_number($p['energy_max'] - $p['energy_used']) . ' / ' . pretty_number($p['energy_max']);
$parse['file_energy'] .= parsetemplate($row2, $data);
foreach ($resource as $i => $res) {
if (in_array($i, $reslist['build']))
$data['text'] = ($p[$resource[$i]] == 0) ? '-' : "{$p[$resource[$i]]}";
elseif (in_array($i, $reslist['tech']))
$data['text'] = ($user[$resource[$i]] == 0) ? '-' : "{$user[$resource[$i]]}";
elseif (in_array($i, $reslist['fleet']))
$data['text'] = ($p[$resource[$i]] == 0) ? '-' : "{$p[$resource[$i]]}";
elseif (in_array($i, $reslist['defense']))
$data['text'] = ($p[$resource[$i]] == 0) ? '-' : "{$p[$resource[$i]]}";
$r[$i] .= parsetemplate($row2, $data);
}
}
// {building_row}
foreach ($reslist['build'] as $a => $i) {
$data['text'] = $lang['tech'][$i];
$parse['building_row'] .= "