<?php
include_once('../system/lib/config.php');

	$sys = new System();

	// 変数宣言部
	$rtn			= array();
	$from			= NO_STRING;
	$to				= NO_STRING;
	$amount			= NO_STRING;
	$exchange		= null;

	try {

		$from	= $sys -> getPosParameter(PARAM_FROM);
		$to		= $sys -> getPosParameter(PARAM_TO);
		$amount	= $sys -> getPosParameter(PARAM_AMOUNT);

		$exchange = $sys -> getExchangeCommon($amount, 
												$from, 
												$to, 
												false, 
												true, 
												NO_STRING, 
												$sys -> getUserData(PARAM_USER_ACCOUNT));

		$rtn['original_amount']	= $exchange[PARAM_ORIGINAL_AMOUNT];
		$rtn['publish_amount']	= $exchange[PARAM_AMOUNT];

		echo json_encode($rtn);
	} catch(Exception $e) {
		echo $e -> getMessage();
	}
?>
