<!DOCTYPE html>
<html lang="ru">

{include file="account_header.tpl"}

<style>
#data_APP {
    display:none;
}

.chart-lk-main {
    padding-bottom: initial;
}

.scrollbar-external_wrapper .external-scroll_x {
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 20px;
}


.ct-chart .ct-label {
    width: 55px !important;
}
</style>

<body>


<div id="data_APP" class="data_app_rex" style="display:none;">
{foreach from=$trans item=t}
<div class="data_APP_info"><span class="data_APP_amount">{$t.amount}</span><span class="data_APP_date">{$t.d|date_format:"%m/%d"}</span></div>
{foreachelse}
{/foreach}
</div>
    
<div class="flex page-lk-main">
    <div class="menu-lk">
        <div class="lk-burger">
            <div class="icon--lk-burger"></div>
        </div>
        <div class="menu-lk-inner">
            <a class="btn-link" href="/">
                <div class="logo">
                    <img src="styles/assets/img/logo.svg">
                </div>
            </a>
            <div class="flex">
                <a class="btn-link" href="/">
                    <div class="btn-link__icon icon--lk-home"></div>
                    <div class="btn-link__text">Main</div>
                </a>
               {include file="multilang.tpl"}
            </div>
            {include file="token_price.tpl"}
            <div class="caption-wrapper">
                <div class="caption">Menu</div>
                <div class="caption-decor"></div>
            </div>
            {include file="account_menu.tpl"}
            <div class="caption-wrapper">
                <div class="caption">Social media</div>
                <div class="caption-decor"></div>
            </div>
            {include file="social_account.tpl"}
        </div>
    </div>
    <div class="content-lk">
<div class="content-lk-inner">
    <div class="container">
	<div class="complex-block-wrapper scrollbar-external_wrapper">
            <div class="complex-block__bg"></div>
            <div class="complex-block">
                <div class="complex-block__caption">Profitability progress</div>
                <div class="transact-chart">
                    <div class="ct-chart-wrapper stripe-highlight">
                        <div class="ct-chart scrollbar-external"></div>
                    </div>
                </div>
            </div>
            <div class="transact-chart__scroll">
                <div class="external-scroll_x">
                    <div class="scroll-arrow scroll-arrow_less"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 3c9.389 0 17 7.611 17 17s-7.611 17-17 17S3 29.389 3 20 10.611 3 20 3Zm0-3c11.046 0 20 8.954 20 20s-8.954 20-20 20S0 31.046 0 20 8.954 0 20 0Z" fill="#fff" fill-opacity=".3"/><path d="m20 17.828 4.95 4.95 1.414-1.414L20 15l-6.364 6.364 1.414 1.414 4.95-4.95Z" fill="#fff"/></svg></div>
                    <div class="scroll-element_outer">
                        <div class="scroll-element_size"></div>
                        <div class="scroll-element_track"></div>
                        <div class="scroll-bar"></div>
                    </div>
                    <div class="scroll-arrow scroll-arrow_more"><svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 3c9.389 0 17 7.611 17 17s-7.611 17-17 17S3 29.389 3 20 10.611 3 20 3Zm0-3c11.046 0 20 8.954 20 20s-8.954 20-20 20S0 31.046 0 20 8.954 0 20 0Z" fill="#fff" fill-opacity=".3"/><path d="m20 17.828 4.95 4.95 1.414-1.414L20 15l-6.364 6.364 1.414 1.414 4.95-4.95Z" fill="#fff"/></svg></div>
                </div>
            </div>
        </div>
		
		<div class="complex-block-mob-wrapper scrollbar-external_wrapper">
            <div class="complex-block-mob-bg">
                <div class="complex-block-mob__bg-left"></div>
                <div class="complex-block-mob">
                    <div class="complex-block-mob__inner">
                        <div class="complex-block__caption">Profitability progress</div>
                        <div class="transact-chart"></div>
                    </div>
                </div>
                <div class="complex-block-mob__bg-left right"></div>
            </div>
            <div class="transact-chart__scroll"></div>
        </div>
        <div class="title-icon">
            <div class="orange-icon">
                <div class="icon--news"></div>
            </div>
            <div class="title-icon__title-wrapper">
                <div class="title-icon__title1">Transactions</div>
                <div class="title-icon__title2">Financial history</div>
            </div>
        </div>
		<form method=post name=opts id="form_App">
        <input type=hidden name=a value=history>
        <input type=hidden name=page value={$current_page}>
		<input id="type_App" type=hidden name=type value="all">
		<input type=hidden name=month_from value="01">
		<input type=hidden name=day_from value="01">
		<input type=hidden name=year_from value="2021">
		<input id="month_to" type=hidden name=month_to value="">
		<input id="day_to" type=hidden name=day_to value="">
		<input id="year_to" type=hidden name=year_to value="">
		</form>
		
        <div id="transactionsApp">
            <div class="lk-table-filter">
                <div class="row-3">
                    <div class="col">
                        <div class="caption-wrapper">
                            <div class="caption">Date</div>
                            <div class="caption-decor"></div>
                        </div>
                        <div class="input-wrapper">
                            <div class="input-extra-icon extra-bg"></div>
                            <input type="date" id="dateInput">
                        </div>
                    </div>
                    <div class="col">
                        <div class="caption-wrapper">
                            <div class="caption">Type</div>
                            <div class="caption-decor"></div>
                        </div>
                        <div class="input-wrapper">
                            <div class="select-control">
                                <div class="select-wrapper">
                                    <div class="select-control__selected">
                                        <div class="item">
											{if $frm.type == "add_funds"}
                                            <div class="item-name">Transfer from external processings</div>
											{elseif $frm.type == "commissions"}
											<div class="item-name">Referral commission</div>
											{elseif $frm.type == "deposit"}
											<div class="item-name">Deposit</div>
											{elseif $frm.type == "earning"}
											<div class="item-name">Income</div>
											{elseif $frm.type == "internal_transaction"}
											<div class="item-name">Internal Transaction</div>
											{elseif $frm.type == "release_deposit"}
											<div class="item-name">Deposit returned to user account</div>
											{elseif $frm.type == "withdrawal"}
											<div class="item-name">Withdrawal</div>
											{elseif $frm.type == "withdraw_pending"}
											<div class="item-name">Withdrawal request</div>
											{else}
											<div class="item-name">All</div>
											{/if}
                                        </div>
                                    </div>
                                    <div id="list_App" class="select-control__list">
                                        <div class="item item_rex_app" data-item="all">
                                            <div class="item-name">All</div>
                                        </div>
										{section name=opt loop=$options}
                                        <div class="item item_rex_app" data-item="{$options[opt].type}" {if $options[opt].selected}selected{/if}>
                                            <div class="item-name">{$options[opt].type_name|replace:"Earning":"Income"}</div>
                                        </div>
										{/section}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="lk-table lk-table-transact">
                <div class="lk-table__row-header">
                    <div class="lk-table__col">#</div>
                    <div class="lk-table__col">Date</div>
                    <div class="lk-table__col">Type</div>
                    <div class="lk-table__col">Amount</div>
                    <div class="lk-table__col">Token</div>
                    <div class="lk-table__col">Status</div>
                    <div class="lk-table__col"></div>
                </div>
                <div class="frame-line"></div>
                <div class="frame-inner notranslate" translate="no">
				
				    {foreach from=$trans item=t}
                    <div class="lk-table__row" v-for="operation in operationsToShow">
                        <div class="slide-list-title">
                            <div class="lk-table__col">#{$t.d|md5|regex_replace:'/[^0-9]+/':''|truncate:7:"":true}</div>
                            <div class="lk-table__col">{$t.d|date_format:"%d.%m.%y %H:%M"}</div>
                            <div class="lk-table__col">
							    {if $t.transtype == "Referral commission"}
                                <div class="lk-label label-violet">
								{elseif $t.transtype == "Withdrawal request"}
								<div class="lk-label label-red">
								{elseif $t.transtype == "Earning"}
								<div class="lk-label label-green">
								{else}
								<div class="lk-label label-orange">
								{/if}
                                    <span>{$t.transtype|replace:"Withdrawal request":"Withdrawal"|replace:"Referral commission":"Commission"|replace:"Earning":"Income"}</span>
                                </div>
                            </div>
                            <div class="lk-table__col">
                                <div class="flex middle">
								    {if $t.transtype == "Referral commission"}
                                    <div class="lk-table__icon-amount icon--lk-bonus"></div>
									{elseif $t.transtype == "Withdrawal request"}
									<div class="lk-table__icon-amount icon--lk-withdraw"></div>
									{elseif $t.transtype == "Earning"}
									<div class="lk-table__icon-amount icon--lk-income"></div>
									{else}
									<div class="lk-table__icon-amount icon--lk-depo"></div>
									{/if}
                                    <div class="icon-text">{$t.amount}</div>
                                </div>
                            </div>
                            <div class="lk-table__col">
                                <div class="flex middle">
                                    <div class="lk-table__icon-pay {if $t.ec_name == "Bitcoin" }icon--btc{elseif $t.ec_name == "Ethereum" }icon--eth{elseif $t.ec_name == "USDT.ERC20" || $t.ec_name == "USDT.TRC20" || $t.ec_name == "USDT.BEP20"}icon--usdt{elseif $t.ec_name == "Tron" }icon--trx{elseif $t.ec_name == "Litecoin" }icon--ltc{elseif $t.ec_name == "BNB" }icon--bnb{elseif $t.ec_name == "Dogecoin" }icon--doge{elseif $t.ec_name == "Ripple" }icon--xrp{else}icon--usd{/if}"></div>
                                    <div class="icon-text">{$t.ec_name|replace:"Bitcoin":"BTC"|replace:"Litecoin":"LTC"|replace:"Dogecoin":"DOGE"|replace:"Ethereum":"ETH"|replace:"Dash":"DASH"|replace:"Ripple":"XRP"|replace:"Tron":"TRX"|replace:"Bitcoin Cash":"BCH"|replace:"Tether ERC20":"USDT.ERC20"|replace:"Tether TRC20":"USDT.TRC20"|replace:"Tether BEP20":"USDT.BEP20"|replace:"Stellar":"XLM"}</div>
                                </div>
                            </div>
                            <div class="lk-table__col">
                                <div class="flex middle">
								    {if $t.type == 'withdraw_pending'}
									<div class="lk-led led-orange"></div>
                                    <div class="icon-text">Pending</div>
									{else}
                                    <div class="lk-led led-green"></div>
                                    <div class="icon-text">Completed</div>
									{/if}
                                </div>
                            </div>
                            <div class="lk-table__col">
                                <div class="flex middle" v-if="operation.type != 'accrual' && operation.type != 'exchange'">
                                    <div class="slide-control__text">Details</div>
                                    <div class="slide-control__icon"></div>
                                </div>
                            </div>
                        </div>
						
						
                        <div class="slide-list-content" v-if="operation.type != 'accrual' && operation.type != 'exchange'">
                            <div class="lk-table__detail-row">
                                <div class="lk-table__detail-name">Currency:</div>
                                <div class="lk-table__detail-text">
                                    <div class="flex middle">
                                        <div class="lk-table__icon-pay icon--usdt"></div>
                                        <div class="icon-text">USD</div>
                                    </div>
                                </div>
                            </div>
                            <div class="lk-table__detail-row">
                                <div class="lk-table__detail-name">Direction:</div>
                                <div class="lk-table__detail-text">
                                    3rr3r3r3r3
                                </div>
                            </div>
							{if $t.description}
                            <div class="lk-table__detail-row" v-show="operation.wallet">
                                <div class="lk-table__detail-name">Description:</div>
                                <div class="lk-table__detail-text">{$t.description}</div>
                            </div>
							{/if}
							
							{if $t.type == 'withdraw_pending'}
							<div class="lk-table__detail-row" v-show="operation.wallet">
                                <div class="lk-table__detail-name">Request Withdrawal:</div>
                                <div class="lk-table__detail-text lk-label label-orange"><a class="lk-label label-orange"href="{"?a=cancelwithdraw&id=`$t.id`&return=`$return`&"|encurl}" onclick="return confirm('Are you sure you want to delete this request?')">Cancel</a></div>
                            </div>
							{/if}
							
							{if $t.transtype == "Referral commission"}
							{if $t.str}
                            <div class="lk-table__detail-row" v-show="operation.level">
                                <div class="lk-table__detail-name">Level:</div>
                                <div class="lk-table__detail-text">{$t.str|replace:"level ":""}</div>
                            </div>
							{/if}
							{/if}
							<div class="lk-table__detail-row" v-show="operation.wallet">
                                <div class="lk-table__detail-name">Date:</div>
                                <div class="lk-table__detail-text">{$t.d}</div>
                            </div>
							<div class="lk-table__detail-row" v-show="operation.wallet">
                                <div class="lk-table__detail-name">Payment system:</div>
                                <div class="lk-table__detail-text">{$t.ec_name}</div>
                            </div>						
							{if $t.batch}
                            <div class="lk-table__detail-row" v-show="operation.txId">
                                <div class="lk-table__detail-name">Txid:</div>
                                <div class="lk-table__detail-text underline">
                                    <a target="_blank" href="ps[operation.ps].txLink + operation.txId">{$t.batch}</a>
                                </div>
                            </div>
							{/if}
                            <div class="lk-table__detail-row" v-show="operation.login" style="margin-bottom: 0px;">
                              
                            </div>
                            <div class="lk-table__detail-row" v-show="operation.email" style="margin-bottom: 0px;">
                                
                            </div>
                        </div>
						
						
						
                    </div>
					{foreachelse}
					<div class="tickets-wrapper form-wrapper">
                        <div class="frame">
                            <div class="frame-line"></div>
                            <div class="frame-inner">
                                <div class="flex middle">
                                    <div class="form-item__icon gray-icon"><svg width="67" height="68" viewBox="0 0 67 68" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M45.216.5a9.5 9.5 0 0 1 7.153 3.249l11.784 13.485a9.5 9.5 0 0 1 2.347 6.251v21.052a9.5 9.5 0 0 1-2.322 6.223L52.506 64.223a9.5 9.5 0 0 1-7.178 3.277H21.672a9.5 9.5 0 0 1-7.178-3.277L2.822 50.76A9.5 9.5 0 0 1 .5 44.537V23.44a9.5 9.5 0 0 1 2.297-6.194l11.56-13.44A9.5 9.5 0 0 1 21.559.5h23.657Z" stroke="#fff" stroke-opacity=".2"/><circle cx="1" cy="1" r="1" fill="#fff"/><circle cx="66" cy="1" r="1" fill="#fff"/><circle cx="1" cy="67" r="1" fill="#fff"/><circle cx="66" cy="67" r="1" fill="#fff"/><g clip-path="url(#clip0_227_1943)"><path d="M21 22h24a1.333 1.333 0 0 1 1.334 1.333v21.334A1.333 1.333 0 0 1 45 46H21a1.334 1.334 0 0 1-1.333-1.333V23.333A1.334 1.334 0 0 1 21 22Zm22.667 14.667h-4.555a6.668 6.668 0 0 1-12.224 0h-4.554v6.666h21.333v-6.666Zm0-2.667v-9.333H22.334V34H29a4 4 0 0 0 8 0h6.667Z" fill="#fff"/></g><defs><clipPath id="clip0_227_1943"><path fill="#fff" d="M17 18h32v32H17z"/></clipPath></defs></svg></div>
                                    <div class="form-item__text">List of transactions is empty</div>
                                </div>
                            </div>
                            <div class="frame-line"></div>
                        </div>
                    </div>
					{/foreach}
					
                   
					
					
                </div>
                <div class="frame-line"></div>
            </div>
			
			
           
			
        </div>
	   
    </div>
</div>

{include file="account_footer.tpl"}

</div>
</div>


{include file="account_footer_scripts.tpl"}


<script>
var inputDate = document.querySelector('input[type="date"]');
var setup_date_now = "{$frm.year_to}-{$frm.month_to}-{$frm.day_to}";
var fecha = setup_date_now; 
inputDate.value = fecha;
</script>

<script>
var dateInput = document.getElementById('dateInput');
var monthTo = document.getElementById('month_to');
var dayTo = document.getElementById('day_to');
var yearTo = document.getElementById('year_to');
var formApp = document.getElementById('form_App');

dateInput.addEventListener('change', function() {
  var fechaSeleccionada = dateInput.value;

  var partes = fechaSeleccionada.split('-');

  yearTo.value = partes[0];
  monthTo.value = partes[1];
  dayTo.value = partes[2];
  
  formApp.submit();
});
</script>

<script>
var items = document.querySelectorAll('.item.item_rex_app');
var formApp = document.getElementById('form_App');
items.forEach(function(item) {
  item.addEventListener('click', function() {
    var dataItemValue = item.getAttribute('data-item');    
    document.getElementById('type_App').value = dataItemValue;
	formApp.submit();
  });
});
</script>


<script>
document.write("<script type='text/javascript' src='styles/assets/js/worker.js?v=" + Date.now() + "'><\/script>");
</script>

</body>
</html>