<commit_before><?php
$db2 = new SmrMySqlDatabase();
if(isset($_REQUEST['amount']))
	SmrSession::updateVar('amount',$_REQUEST['amount']);
if(isset($_REQUEST['account_id']))
	SmrSession::updateVar('account_id',$_REQUEST['account_id']);
$amount = $var['amount'];
$account_id = $var['account_id'];
if (!is_numeric($amount))
	create_error('Numbers only please');
$amount = round($amount);
if ($amount <= 0)
	create_error('You can only tranfer a positive amount');

if ($amount > $account->getSmrCredits())
	create_error('You can\'t transfer more than you have!');

$template->assign('PageTopic','Confirmation');

$PHP_OUTPUT.=('Are you sure you want to transfer '.$amount.' credits to<br />');

$db->query('SELECT hof_name FROM account WHERE account_id = '.$account_id);
if ($db->nextRecord())
	$hofName = $db->getField('hof_name');

//$db->query('SELECT * FROM player WHERE account_id = '.$account_id);
//if ($db->getNumRows())
//{
//	while ($db->nextRecord())
//	{
//	    $player_name = stripslashes($db->getField('player_name'));
//    	$game_id = $db->getField('game_id');
//
//	    $db2->query('SELECT * FROM game WHERE game_id = '.$game_id);
//    	if ($db2->nextRecord())
//			$game_name = $db2->getField('game_name');
//
//		$PHP_OUTPUT.=($player_name.' in game '.$game_name.'('.$game_id.')<br />');
//	}
//}
//else
	$PHP_OUTPUT.=('Player with HoF name '.$hofName.'?<br />');

$PHP_OUTPUT.=('<br/><h3>Please make sure this is definitely the correct person before confirming.</h3>');
$PHP_OUTPUT.=('<p>&nbsp;</p>');

$container = array();<commit_msg>Add a check for numeric account id and get HoF name using OO.<commit_after><?php
$db2 = new SmrMySqlDatabase();
if(isset($_REQUEST['amount']))
	SmrSession::updateVar('amount',$_REQUEST['amount']);
if(isset($_REQUEST['account_id']))
	SmrSession::updateVar('account_id',$_REQUEST['account_id']);
$amount = $var['amount'];
$account_id = $var['account_id'];
if (!is_numeric($amount))
	create_error('Numbers only please');
if (!is_numeric($account_id))
	create_error('Invalid player selected');
$amount = round($amount);
if ($amount <= 0)
	create_error('You can only tranfer a positive amount');

if ($amount > $account->getSmrCredits())
	create_error('You can\'t transfer more than you have!');

$template->assign('PageTopic','Confirmation');

$PHP_OUTPUT.=('Are you sure you want to transfer '.$amount.' credits to<br />');

$PHP_OUTPUT.=('Player with HoF name '.SmrAccount::getAccount($account_id)->getHofName().'?<br />');

$PHP_OUTPUT.=('<br/><h3>Please make sure this is definitely the correct person before confirming.</h3>');
$PHP_OUTPUT.=('<p>&nbsp;</p>');

$container = array();
{'fraction_non_alphanumeric': 0.21859582542694497, 'fraction_numerical': 0.004174573055028463, 'mean_word_length': 6.105121293800539, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 36, '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': '3090236', 'n_tokens_mistral': 897, 'n_tokens_neox': 876, 'n_words': 194}