<?php
$page_title = "Withdrawal Processing";
include_once('template/base_head.php');
?>
			<!-- サイドバー -->
			<aside id="colLeft">
				<h1><a href=""><img src="../img/logo.png" alt="iWallet"></a></h1>
				<div class="aside-heading">
					<div class="btns">
						<input type="button" id="btnSearchAll" value="All" class="btn bg-default px50 hi22">&nbsp;
						<input type="button" id="btnSearchToday" value="Today" class="btn bg-default px50 hi22">&nbsp;
						<input type="button" id="btnSearch" value="Search" class="btn bg-default px50 hi22">
					</div>
				</div>
				<form id="searchForm" action="" method="post">
					<table class="conditions fontS w100p">
						<colgroup>
							<col class="w50p">
							<col class="w50p">
						</colgroup>
						<tr>
							<th>Transaction Number</th>
							<td><input type="text" id="transaction_number" name="transaction_number" value="<?php $this -> echoSTransactionNumber(); ?>" class="w100p"></td>
						</tr>
						<tr>
							<th>Account Number</th>
							<td><input type="text" id="s_user_account" name="s_user_account" value="<?php $this -> echoSUserAccount(); ?>" class="w100p"></td>
						</tr>
						<tr>
							<th>Bank Name</th>
							<td><input type="text" id="s_bank" name="s_bank" value="<?php $this -> echoSBank(); ?>" class="w100p"></td>
						</tr>
						<tr>
							<th>Remittance Account</th>
							<td><input type="text" id="s_account" name="s_account" value="<?php $this -> echoSAccount(); ?>" class="w100p"></td>
						</tr>
						<tr>
							<th>Bank Slip Number</th>
							<td><input type="text" id="s_order_number" name="s_order_number" value="<?php $this -> echoSOrderNumber(); ?>" class="w100p"></td>
						</tr>
						<tr>
							<th>Account Category</th>
							<td>
								<select id="test_account_flg" name="test_account_flg" class="w100p">
									<option value="">--- All ---</option>
									<?php $this -> echoTestAccountFlg(); ?>
							</td>
						</tr>
						<tr>
							<td><?php $this -> dispWithdrawRadio(); ?></td>
						</tr>
                        <tr>

							<td>
								<select id="s_fee" name="s_fee" class="px60 searchSelect" style="display:none;">
                                    <?php
                                        $withdrawFee = $this -> getWithdrawFeeList();
                                        $selectedWithdrawFee = $this -> getSelectedWithdrawFee();
                                        $isSelectedFee = NO_STRING;
                                        //$feetype = array('F', 'M')
                                        foreach($withdrawFee as $fee => $feeValue){
                                            if(!empty($selectedWithdrawFee) && $selectedWithdrawFee == $feeValue){
                                                $isSelectedFee = "selected = 'selected'";
                                            } else{
                                                $isSelectedFee = '';
                                            }

                                    ?>
									<option value="<?php echo $feeValue; ?>"  <?php echo $isSelectedFee; ?> ><?php echo $fee; ?></option>
                                    <?php } ?>
								</select>
								<select id="s_solution" name="s_solution" class="px60">
                                    <?php
                                        $withdrawSolutions = $this -> getWithdrawSolutionList();
                                        $selectedWithdrawSolution = $this -> getSelectedWithdrawSolution();
                                        $isSelected = NO_STRING;
                                        foreach($withdrawSolutions as $solution){
                                            if(!empty($selectedWithdrawSolution) && $selectedWithdrawSolution == $solution){
                                                $isSelected = "selected = 'selected'";
                                            } else{
                                                $isSelected = '';
                                            }
                                    ?>
									<option value="<?php echo $solution; ?>"  <?php echo $isSelected; ?> ><?php echo $solution; ?></option>
                                    <?php } ?>
								</select>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<span class="th">Status</span>
								<select id="s_status" name="s_status" class="px60">
									<option value="">All</option>
									<?php $this -> echoSStatus(); ?>
								</select>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<span class="th">Tier</span>
								<select id="s_tier" name="s_tier" class="px60">
									<option value="">All</option>
									<?php $this -> echoSTier(); ?>
								</select>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<span class="th">Remittance Amount</span>
								<select id="s_currency" name="s_currency" class="px60">
									<option value="">All</option>
									<?php $this -> echoCurrencyList(); ?>
								</select>
								<input type="text" id="s_min_amount" name="s_min_amount" value="<?php $this -> echoSMinAmount(); ?>" class="px80"> - <input type="text" id="s_max_amount" name="s_max_amount" value="<?php $this -> echoSMaxAmount(); ?>" class="px80">
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<span class="th">Application Date</span>
								<?php $this -> dispRegistFlg(); ?>
									<input type="text" id="s_from" name="s_from" value="<?php $this -> echoSFrom(); ?>" class="px110" placeholder="Date"> - <input type="text" id="s_to" name="s_to" value="<?php $this -> echoSTo(); ?>" class="px110" placeholder="Date">

							</td>
						</tr>
						<tr>
							<td colspan="2">
								<span class="th">Processing Date</span>
								<?php $this -> dispProcessFlg(); ?>
									<input type="text" id="s_process_from" name="s_process_from" value="<?php $this -> echoSProcessFrom(); ?>" class="px110" placeholder="Date"> - <input type="text" id="s_process_to" name="s_process_to" value="<?php $this -> echoSProcessTo(); ?>" class="px110" placeholder="Date">

							</td>
						</tr>
					</table>
					<input type="hidden" value="search" id="type_search" name="type" />
				</form>
			</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>
							<?php $this -> dispPager(); ?>
						</div>
						<?php $this -> echoMessage(); ?>
						<form id="acForm" action="" method="post">
							<table class="table col bdr default odd w30p fontXS calign mb20">
								<tr>
									<th class="w20p">Currency</th>
									<th class="w30p">Number</th>
									<th class="w50p">Amount</th>
								</tr>
								<?php $this -> echoTotalList(); ?>
							</table>
							<table class="table col bdr default odd w100p fontXS calign">
								<tr>
									<th class="w10p">Application Date</th>
									<th class="w10p">Transaction Number</th>
									<th class="w5p">Account Number</th>
									<th class="w5p">Tier Level</th>
									<th class="w5p">Currency</th>
									<th class="w5p">Amount</th>
									<th class="w10p">Remittance Bank</th>
									<th class="w10p">Intermediary Bank</th>
									<th class="w5p">Fee</th>
									<th class="w5p">Refund</th>
									<th class="w10p">Bank Slip Number</th>
									<th class="w5p">Person In Charge</th>
									<th class="w10p">Processing Date</th>
									<th class="w5p">Rate</th>
									<th class="w5p">Status</th>
								</tr>
								<?php $this -> echoList(); ?>
							</table>

							<input type="hidden" value="action" id="type" name="type" />
							<input type="hidden" value="withdraw" name="action" />
							<input type="hidden" id="w_id" name="w_id" />
							<input type="hidden" id="detail_account" name="detail_account" />
                            <?php
                                if($selectedWithdrawSolution == 'Flat3'){
                                    $flat3_result = htmlspecialchars(json_encode($this -> getResult()));
                            ?>
							<input type="hidden" id="flat3_result" name="flat3_result" value="<?php echo $flat3_result; ?>" />
                        <?php } ?>
						</form>
						<div class="article-bottom">
							<?php $this -> dispPager(); ?>
						</div>
					</article>
				</div>
			</div>
			<!-- /メインカラム -->
		</div>
<?php include_once('template/base_foot.php'); ?>
	</div>
	<script src="../js/withdraw.js"></script>
</body>
</html>
