<?php if(!defined('FastCore')){exit('Opss!');}

# Заголовок
$opt['title'] = 'My history';

?>

<div class="row d-flex justify-content-center">
<div class="col-lg-6 p-1">
<div class="center-title mt-2 text-uppercase">
<p style="color:#cdcdcd;" class="mb-0">Your deposits</p>
</div>
<?php
$status_array = array(0 => '<span class="badge bg-warning text-dark"><i class="fa fa-clock" title="Wait"></i> Wait...</span>', 1 => '<span class="badge bg-warning text-light"><i class="fa fa-check" title="Success"></i> Success</span>'); // статусы

$inserts = $db->query('SELECT * FROM db_insert WHERE uid = '.$uid.' ORDER BY id DESC LIMIT 10')->fetchAll();
foreach ($inserts as $inserts) {
	if ($inserts['status'] == 0) {
		$sumIn = 0;
	} else {
		$sumIn = sprintf("%.2f",$inserts['sum']);
	}
?>
<div class="statistics p-1 p-lg-2 mb-2">
	<table class="w-100">
<tr>
<td>
	
<div class="icon-hy-pd text-center">
<svg width="43" height="43" viewBox="0 0 43 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="21.5" cy="21.5" r="21.5" fill="url(#paint0_linear_84_22)"></circle>
<g filter="url(#filter0_d_84_22)">
<path d="M27.3337 15.2767L11.5769 12.4038L19.8692 33.0769L31.4231 19.13L27.3337 15.2767ZM27.0801 16.5425L29.4903 18.8123L22.898 19.995L27.0801 16.5425ZM21.4664 19.7585L14.5179 14.0489L25.8745 16.1193L21.4664 19.7585ZM20.9712 20.7682L19.8386 30.0486L13.7296 14.8172L20.9712 20.7682ZM22.0199 21.2609L29.3197 19.9511L20.9465 30.0584L22.0199 21.2609Z" fill="#ECE8E9"></path>
</g>
<defs>
<filter id="filter0_d_84_22" x="10.6769" y="12.4038" width="21.6462" height="23.5729" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix>
<feOffset dy="2"></feOffset>
<feGaussianBlur stdDeviation="0.45"></feGaussianBlur>
<feComposite in2="hardAlpha" operator="out"></feComposite>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_84_22"></feBlend>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_84_22" result="shape"></feBlend>
</filter>
<linearGradient id="paint0_linear_84_22" x1="30.1827" y1="2.89423" x2="11.5769" y2="42.1731" gradientUnits="userSpaceOnUse">
<stop stop-color="#F84B73"></stop>
<stop offset="0.99321" stop-color="#AF3451"></stop>
</linearGradient>
</defs>
</svg>
</div>

</td>
<td>
<p class="mb-1"><?=$status_array[$inserts['status']]; ?> </p>
<p class="mb-0" style="color: #cdcdcd;"> <?=date("d M Y - H:i",$inserts['add']); ?></p>
</td>
<td class="text-end">
<span style="color: #02ed77;font-weight: bold;font-size: 140%;"><?=$sumIn; ?> {!VAL!}</span>
</td>
</tr>
</table>
</div>
<?php
	}
?>

</div>


<div class="col-lg-6 p-1">
<div class="center-title mt-2 text-uppercase">
<p style="color:#cdcdcd;" class="mb-0">Your payouts</p>
</div>
<?php

$status_array2 = array(0 => '<span class="badge bg-warning text-dark"><i class="fa fa-clock" title="Wait"></i> Wait...</span>', 1 => '<span class="badge bg-warning text-dark"><i class="fa fa-clock" title="Wait"></i> Wait...</span>', 2 => '<span class="badge bg-danger">Cancel</span>', 3 => '<span class="badge bg-success text-white"><i class="fa fa-check" title="Success"></i>  Success</span>');
$payout = $db->query('SELECT * FROM db_payout WHERE uid = '.$uid.' ORDER BY id DESC LIMIT 10')->fetchAll();
foreach ($payout as $payout) {
$sumIn = sprintf("%.2f",$payout['sum']);
?>
<div class="statistics p-1 p-lg-2 mb-2">
	<table class="w-100">
<tr>
<td>
	
<div class="icon-hy-pd text-center">
<svg width="43" height="43" viewBox="0 0 43 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="21.5" cy="21.5" r="21.5" fill="url(#paint0_linear_84_22)"></circle>
<g filter="url(#filter0_d_84_22)">
<path d="M27.3337 15.2767L11.5769 12.4038L19.8692 33.0769L31.4231 19.13L27.3337 15.2767ZM27.0801 16.5425L29.4903 18.8123L22.898 19.995L27.0801 16.5425ZM21.4664 19.7585L14.5179 14.0489L25.8745 16.1193L21.4664 19.7585ZM20.9712 20.7682L19.8386 30.0486L13.7296 14.8172L20.9712 20.7682ZM22.0199 21.2609L29.3197 19.9511L20.9465 30.0584L22.0199 21.2609Z" fill="#ECE8E9"></path>
</g>
<defs>
<filter id="filter0_d_84_22" x="10.6769" y="12.4038" width="21.6462" height="23.5729" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix>
<feOffset dy="2"></feOffset>
<feGaussianBlur stdDeviation="0.45"></feGaussianBlur>
<feComposite in2="hardAlpha" operator="out"></feComposite>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_84_22"></feBlend>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_84_22" result="shape"></feBlend>
</filter>
<linearGradient id="paint0_linear_84_22" x1="30.1827" y1="2.89423" x2="11.5769" y2="42.1731" gradientUnits="userSpaceOnUse">
<stop stop-color="#F84B73"></stop>
<stop offset="0.99321" stop-color="#AF3451"></stop>
</linearGradient>
</defs>
</svg>
</div>

</td>
<td>
<p class="mb-1"><?=$status_array2[$payout['status']]; ?></p>
<p class="mb-0" style="color: #cdcdcd;"> <?=date("d M Y - H:i",$payout['add']); ?></p>
</td>
<td class="text-end">
<span style="color: #f14b59;font-weight: bold;font-size: 140%;"><?=$sumIn; ?> {!VAL!}</span>
</td>
</tr>
</table>
</div>
<?php
	}
?>

</div>

</div>