<?php
$page_title = "Withdrawal Application";
include_once('template/base_head.php');
?>
			<!-- サイドバー -->
			<aside id="colLeft">
				<h1><a href="/en/menu"><img src="../img/logo.png" alt="iWallet"></a></h1>
<?php include_once('template/base_sidebar.php'); ?>
			</aside>
			<!-- /サイドバー -->
			<!-- メインカラム -->
			<div id="colMain">
				<div class="mainIn">
<?php include_once('template/base_nav.php'); ?>
					<article>
						<div class="article-heading">
							<h2><?php echo $page_title; ?></h2>
						</div>
						<div class="mb10"><?php $this -> echoMessage(); ?></div>
						<form id="acForm" action="" method="post">

							<table class="table col bdr default odd withdrawT fontM mb20 ma90sp">
								<tr>
									<th>Transaction History</th>
									<td class="clr">
										<select id="withdraw_history" name="withdraw_history" class="w100p">
											<option>Choose from History</option>
											<?php $this -> dispWithdarawHistory(); ?>
										</select>
									</td>
								</tr>
								<tr>
									<th>Debit Currency</th>
									<td class="clr selectC">
										<?php $this -> dispBalances(); ?>
									</td>
								</tr>
								<tr>
									<th>Amount</th>
									<td>
										<select name="currency" class="px70">
											<?php $this -> dispCurrency(); ?>
										</select>
										<input type="text" id="amount" name="amount" value="<?php $this -> echoAmount(); ?>" class="px180 ralign">
									</td>
								</tr>
								<tr>
									<th>Account Number or IBAN</th>
									<td><input type="text" id="account_number" name="account_number" value="<?php $this -> echoAccountNumber(); ?>" class="w50p"></td>
								</tr>
								<tr>
									<th>Beneficiary Name</th>
									<td><input type="text" id="account_name" name="account_name" value="<?php $this -> echoAccountName(); ?>" class="w80p"></td>
								</tr>
								<tr>
									<th>Beneficiary Country</th>
									<td>
										<select id="receipt_country" name="receipt_country" class="w80p">
											<?php $this -> echoReceiptCountry(); ?>
										</select>
									</td>
								</tr>
								<tr>
									<th>Beneficiary Address</th>
									<td><input type="text" id="receipt_address_1" name="receipt_address_1" value="<?php $this -> echoReceiptAddress1(); ?>" class="w100p"></td>
								</tr>
								<tr>
									<th>Bank Name</th>
									<td><input type="text" id="receipt_bank_name" name="receipt_bank_name" value="<?php $this -> echoReceiptBankName(); ?>" class="w50p"></td>
								</tr>
								<tr>
									<th>Swift Code</th>
									<td><input type="text" id="receipt_bank_swift" name="receipt_bank_swift" value="<?php $this -> echoReceiptBankSwift(); ?>" class="px180"></td>
								</tr>
								<tr>
									<th>Bank Country</th>
									<td>
										<select id="receipt_bank_country" name="receipt_bank_country" class="w80p">
											<?php $this -> echoReceiptBankCountry(); ?>
										</select>
									</td>
								</tr>
								<tr id="receiptBranchCode" style="display:none;">
									<th>Branch Code</th>
									<td><input type="text" id="receipt_branch_code" name="receipt_branch_code" value="<?php $this -> echoReceiptBranchCode(); ?>" class="px100"></td>
								</tr>
								<tr id="receiptBranch" style="display:none;">
									<th>Branch Name</th>
									<td><input type="text" id="receipt_branch_name" name="receipt_branch_name" value="<?php $this -> echoReceiptBranchName(); ?>" class="w50p"></td>
								</tr>
								<tr>
									<th>Bank Address</th>
									<td><input type="text" id="receipt_bank_address_1" name="receipt_bank_address_1" value="<?php $this -> echoReceiptBankAddress1(); ?>" class="w100p"></td>
								</tr>
								<tr>
									<th>Message</th>
									<td><input type="text" id="receipt_message" name="receipt_message" value="<?php $this -> echoReceiptMessage(); ?>" class="w100p" /></td>
								</tr>
								<tr>
									<th>Please fill in the intermediary bank information if it’s required.</th>
									<td colspan="2"><?php $this -> echoIntermediaryFlg(); ?></td>
								</tr>
							</table>

							<div id="intermediaries">
								<table class="table col bdr default odd withdrawT fontM mb20 ma90sp">
									<tr>
										<th>Intermediary Bank Name</th>
										<td><input type="text" id="intermediary_bank_name" name="intermediary_bank_name" value="<?php $this -> echoIntermediaryBankName(); ?>" class="w50p" /></td>
									</tr>
									<tr>
										<th>Intermediary Bank Swift Code</th>
										<td><input type="text" id="intermediary_bank_swift" name="intermediary_bank_swift" value="<?php $this -> echoIntermediaryBankSwift(); ?>" class="px180" /></td>
									</tr>
									<tr>
										<th>Intermediary Bank Country</th>
										<td>
											<select name="intermediary_bank_country">
												<?php $this -> dispIntermediaryBankCountry(); ?>
											</select>
									</tr>
									<tr>
										<th>Intermediary Bank Address</th>
										<td><input type="text" id="intermediary_bank_address_1" name="intermediary_bank_address_1" value="<?php $this -> echoIntermediaryBankAddress1(); ?>" class="w100p" /></td>
									</tr>
									<tr>
										<th>Intermediary Bank Message</th>
										<td><input type="text" id="intermediary_bank_message" name="intermediary_bank_message" value="<?php $this -> echoIntermediaryBankMessage(); ?>" class="w100p" /></td>
									</tr>
								</table>
							</div>

							<input type="hidden" value="" id="type" name="type" />
						</form>
						<p class="ol_list ml20" style="color: red;font-weight: bolder;">
						※We are unable to process withdrawal request to Rakuten Bank. 
						<br>Please use another bank, otherwise, your request will be cancelled.</p>
						<p class=""><input type="button" id="btnConfirm" value="Confirm" class="btn bg-grad px180 calign"></p>
					</article>
				</div>
			</div>
			<!-- /メインカラム -->
		</div>
<?php include_once('template/base_foot.php'); ?>
	</div>
	<script src="../js/withdraw.js"></script>
</body>
</html>
