{include file="mlogo.tpl"}

<h3>Dashboard</h3>
<div class="row">
	<div class="col-xl-12">
		<div class="content-box"> 
			<div class="row">
				<div class="col-xl-3">
					<canvas id="myBalance" width="250" height="250"></canvas>
			 
					{literal}<script>
					document.addEventListener("DOMContentLoaded", function()
					{
						var ctx = document.getElementById('myBalance').getContext('2d');
						var myBalance = new Chart(ctx, {
						    type: 'doughnut',
						    data: {
						        labels: ['BTC', 'ETH', 'LTC', 'BCH', 'PM', 'PAYEER', 'ADV'],
								{/literal} datasets: [{
						            data: [{$userinfo.balances.48.balance|amount_format}, {$userinfo.balances.69.balance|amount_format}, {$userinfo.balances.68.balance|amount_format}, {$userinfo.balances.77.balance|amount_format}, {$userinfo.balances.18.balance|amount_format}, {$userinfo.balances.43.balance|amount_format}, {$userinfo.balances.56.balance|amount_format}],
						           {literal} backgroundColor: [
						                'rgba(247, 147, 26, 0.2)',
						                'rgba(104, 127, 227, 0.2)',
						                'rgba(167, 167, 167, 0.2)',
						                'rgba(141, 195, 81, 0.2)',
						                'rgba(28, 117, 188, 0.2)',
						                'rgba(0, 170, 228, 0.2)',
						                'rgba(38, 161, 123, 0.2)'
						            ],
						            hoverBackgroundColor:
						            [
						            	'rgba(247, 147, 26, 0.7)',
						                'rgba(104, 127, 227, 0.7)',
						                'rgba(167, 167, 167, 0.7)',
						                'rgba(141, 195, 81, 0.7)',
						                'rgba(28, 117, 188, 0.7)',
						                'rgba(0, 170, 228, 0.7)',
						                'rgba(38, 161, 123, 0.7)'
						            ],
						            borderColor: [
						                'rgba(247, 147, 26, 1)',
						                'rgba(104, 127, 227, 1)',
						                'rgba(167, 167, 167, 1)',
						                'rgba(141, 195, 81, 1)',
						                'rgba(28, 117, 188, 1)',
						                'rgba(0, 170, 228, 1)',
						                'rgba(38, 161, 123, 1)'
						            ],
						            borderWidth: 1
						        }]
						    },
						    options: {
						    	legend: {
						            display: false,
						        },
						        tooltips: {
						        	bodyFontSize: 14,
						        	xPadding: 15,
						        	yPadding: 15,
						        	position: "nearest",
						        	multiKeyBackground: 'rgba(0, 0, 0, 0)',
						        	callbacks: {
						                labelColor: function(tooltipItem, chart) {
						                    return {
						                        display: false
						                    };
						                },
					            	}
						        },
						    }
						});
					});
					</script>{/literal}
				</div>
				<div class="col-xl-9 col-lg-12">
					Current balance					<h2 class="green mb-30">{$currency_sign}{$ab_formated.total}</h2>

					<div class="row">
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="btc-20"></span>
								{$userinfo.balances.1006.balance|amount_format} {$currency_sign}
								<div class="text-muted"> </div>
							</div>
						</div>
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="eth-20"></span>
								{$userinfo.balances.1007.balance|amount_format} {$currency_sign}
								<div class="text-muted"> </div>
							</div>
						</div>
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="ltc-20" style="background: url(/img/icons/coins_sprite_20.png) -120px
-0px !important;"></span>
								{$userinfo.balances.1008.balance|amount_format} {$currency_sign}
								<div class="text-muted"> </div>
							</div>
						</div>
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="bch-20" style="background: url(doge.png) !important; background-size: 20px 20px !important;"></span>
								{$userinfo.balances.1009.balance|amount_format} {$currency_sign}
								<div class="text-muted"> </div>
							</div>
						</div>
						<!----
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="dash-20"></span>
								 
								<div class="text-muted"> </div>
							</div>
						</div>
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="xrp-20"></span>
								0.0000 XRP
								<div class="text-muted"> ~ 0.000000 ₿</div>
							</div>
						</div>
						<div class="col-xl-3 mb-4">
							<div class="blue-box">
								<span class="usdt-20"></span>
								0.0000 USDT
								<div class="text-muted"> ~ 0.000000 ₿</div>
						</div>
						</div>
						---->
					</div>
					You can withdraw your available balance instantly to your ecurrency wallet from fund withdrawal page.</div>

			</div>

		</div>
	</div>

	<div class="col-xl-6">
		<div class="content-box">
			<div class="row align-items-center ">		
				<div class="col-xl-6 text-center">
					<b>Deposited</b>
					<h2>{$currency_sign}{$ab_formated.deposit}</h2>
				</div>
				<div class="col-xl-6 text-right">
					<a class="btn-fill w-100 text-center mb-3" href="/?a=deposit">Deposit</a>
					<a class="btn-bordered w-100 text-center" href="/?a=deposit_history">Deposit History</a>
				</div>
			</div>
		</div>
	</div>

	<div class="col-xl-6">
		<div class="content-box">
			<div class="row align-items-center">
				<div class="col-xl-6 text-center">
					<b>Withdrawn</b>
					<h2>{$currency_sign}{$ab_formated.withdrawal}</h2>
				</div>
				<div class="col-xl-6 text-right">
					<a class="btn-fill w-100 text-center mb-3" href="/?a=withdraw">Withdraw</a>
					<a class="btn-bordered w-100 text-center" href="/?a=withdraw_history">Withdrawal History</a>
				</div>
			</div>
		</div>
	</div>


	<div class="col-xl-6">
		<div class="content-box">
			<h4>Financial Orders</h4>

			<div class="row align-items-end">
				<div class="col-xl-6 mb-xl-0 mb-md-4">
					Last Deposit		            <div class="white-box mt-2 mb-4">
		               {$currency_sign} {if $last_deposit}{$last_deposit}{else}N/A{/if}
		            </div>
		            <a class="btn-fill text-center" href="/?a=deposit">Create deposit</a>
				</div>

				<div class="col-xl-6">
					Last Withdrawal		            <div class="white-box mt-2">
		               {$currency_sign} {if $last_withdrawal}{$last_withdrawal}{else}N/A{/if}
		            </div>
		            <a class="btn-bordered text-center mt-4 float-xl-right" href="/?a=withdraw">Withdraw</a>
				</div>
			</div>
		</div>
	</div>

	<div class="col-xl-6">
		<div class="content-box">
			<h4>Earning Information</h4>

			<div class="row align-items-end">
				<div class="col-xl-6 mb-xl-0 mb-md-4">
					Earned Total	            <div class="white-box mt-2 mb-4">
		               {$currency_sign}{$ab_formated.earning}
		            </div>
		            <a class="btn-fill text-center" href="/?a=earnings">Earnings</a> 
		        </div>

		        <div class="col-xl-6">
		        	Active 	Deposits            <div class="white-box mt-2">
		              {$currency_sign}{$ab_formated.active_deposit}
		            </div>
		        <a class="btn-bordered text-center mt-4 float-xl-right" href="/?a=deposit_list">Your Deposits</a> 
		        </div>
		    </div>
		</div>
	</div>


</div>

{include file="mfooter2.tpl"}