<commit_before><p>This is a level <?php echo $Port->getLevel(); ?> port run by the <?php echo $ThisPlayer->getColouredRaceName($Port->getRaceID(), true); ?>.<br />
Your relations with them are <?php echo get_colored_text($ThisPlayer->getRelation($Port->getRaceID())); ?>.</p>
<br />

<?php
if (!empty($TradeMsg)) {
	echo $TradeMsg;
}
if ($SearchedByFeds) {
	if ($IllegalsFound) { ?>
		<span class="red">
			The Federation searched your ship and illegal goods were found!<br />
			All illegal goods have been removed from your ship and you have been fined <?php echo number_format($TotalFine); ?> credits.
		</span><?php
	} else { ?>
		<span class="blue">The Federation searched your ship and no illegal goods where found!</span><?php
	} ?>
	<br /><br /><?php
}

if ($BoughtGoods) { ?>
	<h2>The port sells you the following:</h2>
	<table class="standard">
		<tr class="center">
			<th>Good</th>
			<th>Supply</th>
			<th>Base Price</th>
			<th>Amount on Ship</th>
			<th>Amount to Trade</th>
			<th>Action</th>
		</tr><?php
		foreach ($BoughtGoods as $goodID => $good) { ?>
			<form method="POST" action="<?php echo $good['HREF']; ?>">
				<tr class="center">
					<td class="left"><img src="<?php echo $good['ImageLink']; ?>" width="13" height="16" title="<?php echo $good['Name']; ?>" alt=""><?php echo $good['Name']; ?></td>
					<td class="ajax" id="amount<?php echo $goodID; ?>"><?php echo $good['PortAmount']; ?></td>
					<td><?php echo $good['BasePrice']; ?></td>
					<td><?php echo $ThisShip->getCargo($good['ID']); ?></td>
					<td><input type="number" name="amount" value="<?php echo $good['Amount']; ?>" size="4" class="center"></td>
					<td>
						<input type="submit" name="action" value="Buy"><?php
						if ($ThisShip->isUnderground()) { ?>
							<input type="submit" name="action" value="Steal"><?php
						} ?>
					</td>
				</tr>
			</form><?php
		} ?>
	</table>
	<p>&nbsp;</p><?php
}

if ($SoldGoods) { ?>
	<h2>The port would buy the following:</h2>
	<table class="standard">
		<tr class="center">
			<th>Good</th>
			<th>Demand</th>
			<th>Base Price</th>
			<th>Amount on Ship</th>
			<th>Amount to Trade</th>
			<th>Action</th>
		</tr><?php
		foreach ($SoldGoods as $goodID => $good) { ?>
			<form method="POST" action="<?php echo $good['HREF']; ?>">
				<tr class="center">
					<td class="left"><img src="<?php echo $good['ImageLink']; ?>" width="13" height="16" title="<?php echo $good['Name']; ?>" alt=""><?php echo $good['Name']; ?></td>
					<td class="ajax" id="amount<?php echo $goodID; ?>"><?php echo $good['PortAmount']; ?></td>
					<td><?php echo $good['BasePrice']; ?></td>
					<td><?php echo $ThisShip->getCargo($goodID); ?></td>
					<td><input type="number" name="amount" value="<?php echo $good['Amount']; ?>" size="4" class="center"></td>
					<td><input type="submit" name="action" value="Sell"></td>
				</tr>
			</form><?php
		} ?>
	</table>
	<p>&nbsp;</p><?php
} ?>

<a href="<?php echo $LeavePortHREF; ?>" class="submitStyle">Leave Port</a><commit_msg>shop_goods.php: add HTML5 form validation<commit_after><p>This is a level <?php echo $Port->getLevel(); ?> port run by the <?php echo $ThisPlayer->getColouredRaceName($Port->getRaceID(), true); ?>.<br />
Your relations with them are <?php echo get_colored_text($ThisPlayer->getRelation($Port->getRaceID())); ?>.</p>
<br />

<?php
if (!empty($TradeMsg)) {
	echo $TradeMsg;
}
if ($SearchedByFeds) {
	if ($IllegalsFound) { ?>
		<span class="red">
			The Federation searched your ship and illegal goods were found!<br />
			All illegal goods have been removed from your ship and you have been fined <?php echo number_format($TotalFine); ?> credits.
		</span><?php
	} else { ?>
		<span class="blue">The Federation searched your ship and no illegal goods where found!</span><?php
	} ?>
	<br /><br /><?php
}

if ($BoughtGoods) { ?>
	<h2>The port sells you the following:</h2>
	<table class="standard">
		<tr class="center">
			<th>Good</th>
			<th>Supply</th>
			<th>Base Price</th>
			<th>Amount on Ship</th>
			<th>Amount to Trade</th>
			<th>Action</th>
		</tr><?php
		foreach ($BoughtGoods as $goodID => $good) { ?>
			<form method="POST" action="<?php echo $good['HREF']; ?>">
				<tr class="center">
					<td class="left"><img src="<?php echo $good['ImageLink']; ?>" width="13" height="16" title="<?php echo $good['Name']; ?>" alt=""><?php echo $good['Name']; ?></td>
					<td class="ajax" id="amount<?php echo $goodID; ?>"><?php echo $good['PortAmount']; ?></td>
					<td><?php echo $good['BasePrice']; ?></td>
					<td><?php echo $ThisShip->getCargo($good['ID']); ?></td>
					<td><input type="number" name="amount" value="<?php echo $good['Amount']; ?>" required min="1" size="4" class="center"></td>
					<td>
						<input type="submit" name="action" value="Buy"><?php
						if ($ThisShip->isUnderground()) { ?>
							<input type="submit" name="action" value="Steal"><?php
						} ?>
					</td>
				</tr>
			</form><?php
		} ?>
	</table>
	<p>&nbsp;</p><?php
}

if ($SoldGoods) { ?>
	<h2>The port would buy the following:</h2>
	<table class="standard">
		<tr class="center">
			<th>Good</th>
			<th>Demand</th>
			<th>Base Price</th>
			<th>Amount on Ship</th>
			<th>Amount to Trade</th>
			<th>Action</th>
		</tr><?php
		foreach ($SoldGoods as $goodID => $good) { ?>
			<form method="POST" action="<?php echo $good['HREF']; ?>">
				<tr class="center">
					<td class="left"><img src="<?php echo $good['ImageLink']; ?>" width="13" height="16" title="<?php echo $good['Name']; ?>" alt=""><?php echo $good['Name']; ?></td>
					<td class="ajax" id="amount<?php echo $goodID; ?>"><?php echo $good['PortAmount']; ?></td>
					<td><?php echo $good['BasePrice']; ?></td>
					<td><?php echo $ThisShip->getCargo($goodID); ?></td>
					<td><input type="number" name="amount" value="<?php echo $good['Amount']; ?>" required min="1" size="4" class="center"></td>
					<td><input type="submit" name="action" value="Sell"></td>
				</tr>
			</form><?php
		} ?>
	</table>
	<p>&nbsp;</p><?php
} ?>

<a href="<?php echo $LeavePortHREF; ?>" class="submitStyle">Leave Port</a>
{'fraction_non_alphanumeric': 0.24266402901417738, 'fraction_numerical': 0.00511045169798879, 'mean_word_length': 4.350088183421517, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 0, '>': 277, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3624040', 'n_tokens_mistral': 2377, 'n_tokens_neox': 2176, 'n_words': 531}