<commit_before><?php
$template->assign('PageTopic','Trader Status');

require_once(get_file_loc('menu.inc'));
create_trader_menu();

$container=array();
$container['url'] = 'skeleton.php';

$PHP_OUTPUT.= '<table class="standard fullwidth"><tr><td style="width:50%" class="top">';

$PHP_OUTPUT.= '<span class="yellow bold">Protection</span><a href="' . WIKI_URL . '/game-guide/protection" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Protection"/></a><br />';
if($player->getNewbieTurns()) {
	$PHP_OUTPUT.= 'You are under <span class="green">NEWBIE</span> protection.<br /><br />';

	$container['body'] = 'leave_newbie.php';
	$PHP_OUTPUT.=create_button($container, 'Leave Newbie Protection');
}
else if($player->hasFederalProtection()) {
	$PHP_OUTPUT.= 'You are under <span class="blue">FEDERAL</span> protection.';
}
else {
	$PHP_OUTPUT.= 'You are <span class="red">NOT</span> under protection.';
}

$PHP_OUTPUT.= '<br /><br />';

$container['body'] = 'trader_relations.php';

$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Relations (Personal)</span>');

$PHP_OUTPUT.= '<br />';
$RACES = Globals::getRaces();
foreach($RACES as $raceID => $raceInfo) {
	if($player->getPureRelation($raceID) != 0)
		$PHP_OUTPUT.= $raceInfo['Race Name'] . ' : ' . get_colored_text($player->getPureRelation($raceID), $player->getPureRelation($raceID)) . '<br />';
}
$PHP_OUTPUT.= '<br />';

$container['body'] = 'council_list.php';
$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Politics</span><a href="' . WIKI_URL . '/game-guide/politics" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Politics"/></a>');
$PHP_OUTPUT.= '<br />';

require_once(get_file_loc('council.inc'));

if($player->isOnCouncil()) {
	if($player->isPresident()) {
		$PHP_OUTPUT.= 'You are the <span class="red">President</span> of the ruling council.';
	}
	else {
		$PHP_OUTPUT.= 'You are a <span class="blue">member</span> of the ruling council.';
	}
}
else {
	$PHP_OUTPUT.= 'You are <span class="red">NOT</span> a member of the ruling council.';
}

$PHP_OUTPUT.= '<br /><br />';

$container['body'] = 'trader_savings.php';
$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Savings</span><a href="' . WIKI_URL . '/game-guide/locations#banks" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Banks"/></a>');
$PHP_OUTPUT.= '<br />You have <span class="yellow">';

$PHP_OUTPUT.= number_format($player->getBank());
$PHP_OUTPUT.= '</span> credits in your personal account.';

$PHP_OUTPUT.= '</td><td class="top" style="width:50%">';

$container['body'] = 'trader_bounties.php';
$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Bounties</span><a href="' . WIKI_URL . '/game-guide/locations#headquarters" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Bounties"/></a>');

$PHP_OUTPUT.= '<br /><span class="green">Federal: </span>';
$bounty = $player->getCurrentBounty('HQ');
if($bounty['Amount']>0||$bounty['SmrCredits']>0)
	$PHP_OUTPUT.= number_format($bounty['Amount']).' credits and '.number_format($bounty['SmrCredits']).' SMR credits';
else
	$PHP_OUTPUT.= 'None';
$PHP_OUTPUT.= '<br /><span class="red">Underground: </span>';
$bounty = $player->getCurrentBounty('UG');
if($bounty['Amount']>0||$bounty['SmrCredits']>0)
	$PHP_OUTPUT.= number_format($bounty['Amount']).' credits and '.number_format($bounty['SmrCredits']).' SMR credits';
else
	$PHP_OUTPUT.= 'None';

$PHP_OUTPUT.= '<br /><br /><span class="yellow bold">Ship</span><a href="' . URL . '/ship_list.php" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Ship List"/></a><br />Name: ';

$PHP_OUTPUT.= $ship->getName();
$PHP_OUTPUT.= '<br />Speed: ';
$PHP_OUTPUT.= $ship->getRealSpeed();
$PHP_OUTPUT.= ' turns/hour<br />Max: ';
$PHP_OUTPUT.= $player->getMaxTurns();
$PHP_OUTPUT.= ' turns<br /><br /><span class="yellow bold">Supported Hardware</span><a href="' . WIKI_URL . '/game-guide/technologies" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Technologies"/></a><br />';

if (!$ship->canHaveScanner() &&
	!$ship->canHaveIllusion() &&
	!$ship->canHaveCloak() &&
	!$ship->canHaveJump() &&
	!$ship->canHaveDCS()) $PHP_OUTPUT.= 'none<br />';
else {
	if ($ship->canHaveScanner()) $PHP_OUTPUT.= 'Scanner<br />';
	if ($ship->canHaveIllusion()) $PHP_OUTPUT.= 'Illusion Generator<br />';
	if ($ship->canHaveCloak()) $PHP_OUTPUT.= 'Cloaking Device<br />';
	if ($ship->canHaveJump()) $PHP_OUTPUT.= 'Jump Drive<br />';
	if ($ship->canHaveDCS()) $PHP_OUTPUT.= 'Drone Scrambler<br />';
}

$PHP_OUTPUT.= '<br /><a href="'.URL.'/level_requirements.php" target="levelRequirements"><span class="yellow bold">Next Level</span></a><a href="' . WIKI_URL . '/game-guide/experience-levels" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Experience Levels"/></a><br />';
$db->query('SELECT level_name,requirement FROM level WHERE requirement>' . $db->escapeNumber($player->getExperience()) . ' ORDER BY requirement ASC LIMIT 1');
if(!$db->nextRecord()) {
	$db->query('SELECT level_name,requirement FROM level ORDER BY requirement DESC LIMIT 1');
	$db->nextRecord();<commit_msg>trader_status.php: add link to Configure Hardware<commit_after><?php
$template->assign('PageTopic','Trader Status');

require_once(get_file_loc('menu.inc'));
create_trader_menu();

$container=array();
$container['url'] = 'skeleton.php';

$PHP_OUTPUT.= '<table class="standard fullwidth"><tr><td style="width:50%" class="top">';

$PHP_OUTPUT.= '<span class="yellow bold">Protection</span><a href="' . WIKI_URL . '/game-guide/protection" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Protection"/></a><br />';
if($player->getNewbieTurns()) {
	$PHP_OUTPUT.= 'You are under <span class="green">NEWBIE</span> protection.<br /><br />';

	$container['body'] = 'leave_newbie.php';
	$PHP_OUTPUT.=create_button($container, 'Leave Newbie Protection');
}
else if($player->hasFederalProtection()) {
	$PHP_OUTPUT.= 'You are under <span class="blue">FEDERAL</span> protection.';
}
else {
	$PHP_OUTPUT.= 'You are <span class="red">NOT</span> under protection.';
}

$PHP_OUTPUT.= '<br /><br />';

$container['body'] = 'trader_relations.php';

$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Relations (Personal)</span>');

$PHP_OUTPUT.= '<br />';
$RACES = Globals::getRaces();
foreach($RACES as $raceID => $raceInfo) {
	if($player->getPureRelation($raceID) != 0)
		$PHP_OUTPUT.= $raceInfo['Race Name'] . ' : ' . get_colored_text($player->getPureRelation($raceID), $player->getPureRelation($raceID)) . '<br />';
}
$PHP_OUTPUT.= '<br />';

$container['body'] = 'council_list.php';
$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Politics</span><a href="' . WIKI_URL . '/game-guide/politics" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Politics"/></a>');
$PHP_OUTPUT.= '<br />';

require_once(get_file_loc('council.inc'));

if($player->isOnCouncil()) {
	if($player->isPresident()) {
		$PHP_OUTPUT.= 'You are the <span class="red">President</span> of the ruling council.';
	}
	else {
		$PHP_OUTPUT.= 'You are a <span class="blue">member</span> of the ruling council.';
	}
}
else {
	$PHP_OUTPUT.= 'You are <span class="red">NOT</span> a member of the ruling council.';
}

$PHP_OUTPUT.= '<br /><br />';

$container['body'] = 'trader_savings.php';
$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Savings</span><a href="' . WIKI_URL . '/game-guide/locations#banks" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Banks"/></a>');
$PHP_OUTPUT.= '<br />You have <span class="yellow">';

$PHP_OUTPUT.= number_format($player->getBank());
$PHP_OUTPUT.= '</span> credits in your personal account.';

$PHP_OUTPUT.= '</td><td class="top" style="width:50%">';

$container['body'] = 'trader_bounties.php';
$PHP_OUTPUT.=create_link($container, '<span class="yellow bold">Bounties</span><a href="' . WIKI_URL . '/game-guide/locations#headquarters" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Bounties"/></a>');

$PHP_OUTPUT.= '<br /><span class="green">Federal: </span>';
$bounty = $player->getCurrentBounty('HQ');
if($bounty['Amount']>0||$bounty['SmrCredits']>0)
	$PHP_OUTPUT.= number_format($bounty['Amount']).' credits and '.number_format($bounty['SmrCredits']).' SMR credits';
else
	$PHP_OUTPUT.= 'None';
$PHP_OUTPUT.= '<br /><span class="red">Underground: </span>';
$bounty = $player->getCurrentBounty('UG');
if($bounty['Amount']>0||$bounty['SmrCredits']>0)
	$PHP_OUTPUT.= number_format($bounty['Amount']).' credits and '.number_format($bounty['SmrCredits']).' SMR credits';
else
	$PHP_OUTPUT.= 'None';

$PHP_OUTPUT.= '<br /><br /><span class="yellow bold">Ship</span><a href="' . URL . '/ship_list.php" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Ship List"/></a><br />Name: ';

$PHP_OUTPUT.= $ship->getName();
$PHP_OUTPUT.= '<br />Speed: ';
$PHP_OUTPUT.= $ship->getRealSpeed();
$PHP_OUTPUT.= ' turns/hour<br />Max: ';
$PHP_OUTPUT.= $player->getMaxTurns();
$PHP_OUTPUT.= ' turns<br /><br />';

$container['body'] = 'configure_hardware.php';
$PHP_OUTPUT.= create_link($container, '<span class="yellow bold">Supported Hardware</span>');
$PHP_OUTPUT.= '<a href="' . WIKI_URL . '/game-guide/technologies" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Technologies"/></a><br />';

if (!$ship->canHaveScanner() &&
	!$ship->canHaveIllusion() &&
	!$ship->canHaveCloak() &&
	!$ship->canHaveJump() &&
	!$ship->canHaveDCS()) $PHP_OUTPUT.= 'none<br />';
else {
	if ($ship->canHaveScanner()) $PHP_OUTPUT.= 'Scanner<br />';
	if ($ship->canHaveIllusion()) $PHP_OUTPUT.= 'Illusion Generator<br />';
	if ($ship->canHaveCloak()) $PHP_OUTPUT.= 'Cloaking Device<br />';
	if ($ship->canHaveJump()) $PHP_OUTPUT.= 'Jump Drive<br />';
	if ($ship->canHaveDCS()) $PHP_OUTPUT.= 'Drone Scrambler<br />';
}

$PHP_OUTPUT.= '<br /><a href="'.URL.'/level_requirements.php" target="levelRequirements"><span class="yellow bold">Next Level</span></a><a href="' . WIKI_URL . '/game-guide/experience-levels" target="_blank"><img src="images/silk/help.png" width="16" height="16" alt="Wiki Link" title="Goto SMR Wiki: Experience Levels"/></a><br />';
$db->query('SELECT level_name,requirement FROM level WHERE requirement>' . $db->escapeNumber($player->getExperience()) . ' ORDER BY requirement ASC LIMIT 1');
if(!$db->nextRecord()) {
	$db->query('SELECT level_name,requirement FROM level ORDER BY requirement DESC LIMIT 1');
	$db->nextRecord();
{'fraction_non_alphanumeric': 0.2323351126391025, 'fraction_numerical': 0.007056907626888627, 'mean_word_length': 6.4739688979039896, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 259, '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': '4989239', 'n_tokens_mistral': 4171, 'n_tokens_neox': 3875, 'n_words': 762}