<div class="page-header">
	<h3 class="page-title">
		<span class="page-title-icon bg-gradient-primary text-white mr-2">
			<i class="mdi mdi-home"></i>
		</span>
		Dashboard
	</h3>
</div>
<?php if (!$notices == null && $user_data->active_status == 0) : foreach ($notices as $notice) : ?>
		<div class="col-12 border20  text-center p-2 mb-3" style="color: #0e6c5e;background: rgba(255,224,0,0.20)">
			<?php /*print_r($_SESSION); */ ?>
			<?= $notice->notice_content ?>
		</div>
<?php endforeach;
endif ?>
<?php
include "activate_dialogue.php";
?>
<?php if ($user_data->active_status == 1) : ?>
	<div class="row">

		<?php if (!$notices == null) : foreach ($notices as $notice) : ?>
				<div class="col-12 border20  text-center p-2 mb-3" style="color: #0e6c5e;background: rgba(255,224,0,0.20)">
					<?php /*print_r($_SESSION); */ ?>
					<?= $notice->notice_content ?>
				</div>
		<?php endforeach;
		endif ?>


		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Refer Income
						<i class="fa fa-users  fa-2x float-right"></i>
					</h4>
					<h1> <?= $refer_ern->total_earn == null ? 0 : number_format(($refer_ern->total_earn - ($myPaidReferIncome ? $myPaidReferIncome : 0)), 2) ?> </h1>
				</div>
			</div>
		</div>


		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Refer Bonus
						<i class="fa fa-users  fa-2x float-right"></i>
					</h4>
					<h1> <?= $refer_bonus->total_earn == null ? "0" : number_format(($refer_bonus->total_earn - ($myPaidReferBonus ? $myPaidReferBonus : 0)), 0) ?> </h1>
				</div>
			</div>
		</div>
		<!-- 
		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">PPC Income
						<i class="fa fa-mouse-pointer  fa-2x float-right"></i>
					</h4>
					<h1><?= $job_ern->total_earn == null ? "0" : number_format(($job_ern->total_earn - ($myPaidPPC ? $myPaidPPC : 0)), 2) ?> </h1>
				</div>
			</div>
		</div> -->


		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Digital Marketing Income
						<i class="fa fa-amazon  fa-2x float-right"></i>
					</h4>
					<h1>৳ <?= number_format($marketing_earn->marketing_earn, 2) ?></h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Affiliate Income
						<i class="fa fa-amazon  fa-2x float-right"></i>
					</h4>
					<h1> <?= $otr_ern->total_earn == null ? "0" : number_format(($otr_ern->total_earn - ($myPaidAffiliate ? $myPaidAffiliate : 0)), 0) ?></h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Freelance Income
						<i class="fa fa-globe  fa-2x float-right"></i>
					</h4>

					<?php
					$fIncome = 0;
					if ($freelanceNewIncome) {
						$encodeFreelance = json_decode($freelanceNewIncome);
						foreach ($encodeFreelance as $key => $incomeValue) {
							$fIncome += $incomeValue->amount;
						}
					}
					?>

					<h1> <?= number_format($fIncome, 0) ?> </h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Product Sell Income
						<i class="fa fa-cart-plus  fa-2x float-right"></i>
					</h4>
					<h1>৳ <?= number_format($marketing_earn->product_sell, 0) ?></h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Flexiload Income
						<i class="fa fa-phone-square  fa-2x float-right"></i>
					</h4>
					<h1>৳ <?= number_format($marketing_earn->flexiincome, 0) ?></h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Air Ticket Sell Income
						<i class="fa fa-plane  fa-2x float-right"></i>
					</h4>
					<h1>0</h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Bus Ticket Sell Income
						<i class="fa fa-bus  fa-2x float-right"></i>
					</h4>
					<h1>0</h1>
				</div>
			</div>
		</div>

		<div class="col-md-3  stretch-card grid-margin">
			<div class="card border20 bg-gradient-warning card-img-holder text-black shadow">
				<div class="card-body">
					<img src="https://admin.work.mali-mart.com/app-assets/images/dashboard/circle.svg" class="card-img-absolute" alt="circle-image">
					<h4 class="font-weight-normal mb-3">Billing Income
						<i class="fa fa-print  fa-2x float-right"></i>
					</h4>
					<h1>0</h1>
				</div>
			</div>
		</div>

	</div>
<?php endif ?>