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

	$sys = new System();

	// 変数宣言部
	$rtn			= array();
	$wId			= NO_STRING;
	$row			= null;

	try {

		// 出金IDの取得
		$wId	= $sys -> getPosParameter(PARAM_W_ID);
		$row	= $sys -> getRowData($sys -> accessSelect('SELECT_WITHDRAW', array($wId)));

		$rtn[PARAM_W_ID]						= $sys -> getColumnData($row, COLUMN_W_ID);
		$rtn[PARAM_ACCOUNT_NAME]				= $sys -> getColumnData($row, COLUMN_ACCOUNT_NAME);
		$rtn[PARAM_RECEIPT_COUNTRY]				= $sys -> getColumnData($row, COLUMN_RECEIPT_COUNTRY);
		$rtn[PARAM_RECEIPT_ADDRESS_1]			= $sys -> getColumnData($row, COLUMN_RECEIPT_ADDRESS_1);
		$rtn[PARAM_RECEIPT_ADDRESS_2]			= $sys -> getColumnData($row, COLUMN_RECEIPT_ADDRESS_2);
		$rtn[PARAM_TEL]							= $sys -> getColumnData($row, COLUMN_TEL);
		$rtn[PARAM_RECEIPT_MESSAGE]				= $sys -> getColumnData($row, COLUMN_RECEIPT_MESSAGE);
		$rtn[PARAM_RECEIPT_BANK_NAME]			= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_NAME);
		$rtn[PARAM_RECEIPT_BRANCH_CODE]			= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_BRANCH_CODE);
		$rtn[PARAM_RECEIPT_BRANCH_NAME]			= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_BRANCH_NAME);
		$rtn[PARAM_RECEIPT_BANK_SWIFT]			= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_SWIFT);
		$rtn[PARAM_RECEIPT_BANK_COUNTRY]		= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_COUNTRY);
		$rtn[PARAM_RECEIPT_BANK_ADDRESS_1]		= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_ADDRESS_1);
		$rtn[PARAM_RECEIPT_BANK_ADDRESS_2]		= $sys -> getColumnData($row, COLUMN_RECEIPT_BANK_ADDRESS_2);
		$rtn[PARAM_ACCOUNT_NUMBER]				= $sys -> getColumnData($row, COLUMN_ACCOUNT_NUMBER);
		$rtn[PARAM_INTERMEDIARY_FLG]			= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_FLG);
		$rtn[PARAM_INTERMEDIARY_BANK_NAME]		= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_BANK_NAME);
		$rtn[PARAM_INTERMEDIARY_BANK_SWIFT]		= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_BANK_SWIFT);
		$rtn[PARAM_INTERMEDIARY_BANK_COUNTRY]	= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_BANK_COUNTRY);
		$rtn[PARAM_INTERMEDIARY_BANK_ADDRESS_1]	= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_BANK_ADDRESS_1);
		$rtn[PARAM_INTERMEDIARY_BANK_ADDRESS_2]	= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_BANK_ADDRESS_2);
		$rtn[PARAM_INTERMEDIARY_BANK_MESSAGE]	= $sys -> getColumnData($row, COLUMN_INTERMEDIARY_BANK_MESSAGE);

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