function getBRHtmlStart($player_id, $type, $mytype) {
	$c = getXYZ($player_id);
	$html = '<table border="0" width="595" style="border: 1px solid #3C5762">
	<tr>
		<td width="595" colspan="5"><b>'.$type.' at '.$c[0].':'.$c[1].':'.$c[2].' ('.getPlayerProperty($player_id, 'rulername').' of '.getPlayerProperty($player_id, 'planetname').')</b></td>
	</tr>
	<tr>
		<td width="250">Ship name</td>
		<td width="85">Total amount</td>';
	if ($mytype) {
		$html .= '
				<td width="85">Total losses</td>
				<td width="85">Your amount</td>		
				<td width="85">Your losses</td>
			</tr>';
	} else {
		$html .= '
			<td width="255" colspan="3">Total losses</td>
		</tr>';
	}

	return $html;
}
	$z = secureData($_POST['z']);
	$target_id =  getPlayerId($x, $y, $z);

	$action = secureData($_POST['action']);
	$action_time = secureData($_POST['action_time']);
	if (getFleetShipAmount($playerdata['id'], $fleet_id) == 0) {
		$error = 104;
	}
	if (!isFleetHome($playerdata['id'], $fleet_id) && $action != 'home') {
		$error = 105;
	}
	if (isFleetHome($playerdata['id'], $fleet_id) && $action == 'home') {
		$error = 110;
	}
	if ($target_id == $playerdata['id']) { $error = 108; }
	if ((getPlayerProperty($target_id, 'score') < ($playerdata['score'] / 3)) && ($action == 'attack')) { $error = 111; }
	if (!$action) { $action = 'home'; }
	if (!$action_time) { $action_time = 0; }
	if ($action == 'home') {
		$target_id = $playerdata['id'];
		$action_time = 0;
	}
	if ($target_id == 0) {
		$error = 103;
	}
	if ($error < 100) {
		$total_fuel = 0;
		$sql_fleetdata = "SELECT $table[ships].id, $table[ships].traveltime, $table[ships].fuel, $table[playerfleet_ships].amount
								FROM $table[playerfleet_ships] 
								LEFT JOIN $table[ships] ON $table[ships].id = $table[playerfleet_ships].ship_id
								WHERE $table[playerfleet_ships].fleet_id = '$fleet_id' ORDER BY $table[ships].traveltime DESC";