<?php
$page_title = "出金申請";
include_once('template/base_head.php');
?>
			<!-- サイドバー -->
			<aside id="colLeft">
				<h1><a href="/ja/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 pleft40"><?php $this -> echoMessage(); ?></div>
						<div class="pleft40">
						<form id="acForm" action="" method="post">

							<table class="table col bdr default odd withdrawT fontM mb20 ma90sp">
								<tr>
									<th>過去の送金履歴</th>
									<td class="clr">
										<select id="withdraw_history" name="withdraw_history" class="w100p">
											<option>過去と同じ口座へ送金の場合は選択して下さい</option>
											<?php $this -> dispWithdarawHistory(); ?>
										</select>
									</td>
								</tr>
								<tr>
									<th>通貨口座選択</th>
									<td class="clr selectC">
										<?php $this -> dispBalances(); ?>
									</td>
								</tr>
								<tr>
									<th>金額</th>
									<td>
										<select name="currency" class="px90">
											<?php $this -> dispCurrency(); ?>
										</select>
										<input type="text" id="amount" name="amount" value="<?php $this -> echoAmount(); ?>" class="px180 ralign">
									</td>
								</tr>
								<tr>
									<th>口座番号またはIBAN</th>
									<td><input type="text" id="account_number" name="account_number" value="<?php $this -> echoAccountNumber(); ?>" class="w50p"></td>
								</tr>
								<tr>
									<th>口座名義</th>
									<td><input type="text" id="account_name" name="account_name" value="<?php $this -> echoAccountName(); ?>" class="w80p"></td>
								</tr>
								<tr>
									<th>受取人国</th>
									<td>
										<select id="receipt_country" name="receipt_country" class="w80p">
											<?php $this -> echoReceiptCountry(); ?>
										</select>
									</td>
								</tr>
								<tr>
									<th>受取人住所</th>
									<td><input type="text" id="receipt_address_1" name="receipt_address_1" value="<?php $this -> echoReceiptAddress1(); ?>" class="w100p"></td>
								</tr>
								<tr>
									<th>銀行名</th>
									<td><input type="text" id="receipt_bank_name" name="receipt_bank_name" value="<?php $this -> echoReceiptBankName(); ?>" class="w50p"></td>
								</tr>
								<tr>
									<th>SWIFTコード</th>
									<td><input type="text" id="receipt_bank_swift" name="receipt_bank_swift" value="<?php $this -> echoReceiptBankSwift(); ?>" class="px180"></td>
								</tr>
								<tr>
									<th>銀行の所在国</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>支店コード</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>支店名</th>
									<td><input type="text" id="receipt_branch_name" name="receipt_branch_name" value="<?php $this -> echoReceiptBranchName(); ?>" class="w50p"></td>
								</tr>
								<tr>
									<th>銀行住所</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>受取人へのメッセージ</th>
									<td><input type="text" id="receipt_message" name="receipt_message" value="<?php $this -> echoReceiptMessage(); ?>" class="w100p" /></td>
								</tr>
								<tr>
									<th>中継銀行を利用する</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>中継銀行名</th>
										<td><input type="text" id="intermediary_bank_name" name="intermediary_bank_name" value="<?php $this -> echoIntermediaryBankName(); ?>" class="w50p" /></td>
									</tr>
									<tr>
										<th>SWIFTコード</th>
										<td><input type="text" id="intermediary_bank_swift" name="intermediary_bank_swift" value="<?php $this -> echoIntermediaryBankSwift(); ?>" class="px180" /></td>
									</tr>
									<tr>
										<th>受取銀行国</th>
										<td>
											<select name="intermediary_bank_country">
												<?php $this -> dispIntermediaryBankCountry(); ?>
											</select>
									</tr>
									<tr>
										<th>受取銀行住所</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>中継銀行メッセージ</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;">※恐れ入りますが、Rakuten銀行への出金依頼は処理できかねます。
						<br>他の銀行をご指定いただきますようお願い致します。
						<br>出金先をRakuten銀行に出金を行った場合は、取消されますので、ご了承お願い致します。</p>
						<p class="withdrawButton"><input type="button" id="btnConfirm" value="確認画面へ" class="btn bg-grad px180 calign"></p>
						</div>
					</article>
				</div>
			</div>
			<!-- /メインカラム -->
		</div>
<?php include_once('template/base_foot.php'); ?>
	</div>
	<script src="../js/withdraw.js"></script>
</body>
</html>
