<?php
$path="../../";
include("../../map.php");
$b=0;$o=0;$t=0;$i=0;
$sqltc = mysqli_query($conn, "select s13 from t4 where ne='service' ".$lteklif." order by id desc"); while($rstc=mysqli_fetch_assoc($sqltc)){
	if($rstc["s13"]==1 or $rstc["s13"]==2){$b++;}
	if($rstc["s13"]==3){$o++;}
	if($rstc["s13"]==5){$t++;}
	if($rstc["s13"]==4){$i++;}
}
?>
	<div class="v3-col-xl-3 v3-col-md-3 v3-col-xs-3" style="border-right: 1px solid <?php echo $module["clrcinfo"];?>17; font-size: 12px; padding: 12px;  background: <?php echo $module["bcinfo"]?>50; color: <?php echo $module["clrcinfo"];?>;">
		<div style="position: absolute; top: 0px; text-align: center; right: 15px; width: 80px; height: 20px; background: <?php echo $module["bcinfo"]?>50; color: <?php echo $module["clrcinfo"];?>; border-radius: 0px 0px 5px 5px;"><?php echo ctranslate("Bekleyen"); ?></div>
		<div class="mtac mmt10" style="padding-top:5px;"><span class="digi" style="font-size: 30px !important;"><?php echo $b?></span></div>
	</div>
	<div class="v3-col-xl-3 v3-col-md-3 v3-col-xs-3" style="border-right: 1px solid <?php echo $module["clrcinfo"];?>17; font-size: 12px; padding: 12px; background: <?php echo $module["bcinfo"]?>70; color: <?php echo $module["clrcinfo"];?>;">
		<div style="position: absolute; top: 0px; text-align: center; right: 15px; width: 80px; height: 20px; background: <?php echo $module["bcinfo"]?>70; color: <?php echo $module["clrcinfo"];?>; border-radius: 0px 0px 5px 5px;"><?php echo ctranslate("Onaylanmış"); ?></div>
		<div class="mtac mmt10" style="padding-top:5px;"><span class="digi fs40" style="font-size: 30px !important;"><?php echo $o?></span></div>
	</div>
	<div class="v3-col-xl-3 v3-col-md-3 v3-col-xs-3" style="border-right: 1px solid <?php echo $module["clrcinfo"];?>17; font-size: 12px; padding: 12px; background: <?php echo $module["bcinfo"]?>99; color: <?php echo $module["clrcinfo"];?>;">
		<div style="position: absolute; top: 0px; text-align: center; right: 15px; width: 80px; height: 20px; background: <?php echo $module["bcinfo"]?>99; color: <?php echo $module["clrcinfo"];?>; border-radius: 0px 0px 5px 5px;"><?php echo ctranslate("Tamamlanmış"); ?></div>
		<div class="mtac mmt10" style="padding-top:5px;"><span class="digi fs40" style="font-size: 30px !important;"><?php echo $t?></span></div>
	</div>
	<div class="v3-col-xl-3 v3-col-md-3 v3-col-xs-3" style="border-right: 1px solid <?php echo $module["clrcinfo"];?>17; font-size: 12px; padding: 12px; background: <?php echo $module["bcinfo"]?>99; color: <?php echo $module["clrcinfo"];?>;">
		<div style="position: absolute; top: 0px; text-align: center; right: 15px; width: 80px; height: 20px; background: <?php echo $module["bcinfo"]?>99; color: <?php echo $module["clrcinfo"];?>; border-radius: 0px 0px 5px 5px;"><?php echo ctranslate("İptal"); ?></div>
		<div class="mtac mmt10" style="padding-top:5px;"><span class="digi fs40" style="font-size: 30px !important;"><?php echo $i?></span></div>
	</div>
	<table class="v3-table" style="">
		<thead style="">
			<tr class="mdn">
			<th class="w15 mw13">ID</th>
			<th class="mw25 w18"><?php echo ctranslate($t25s[0]);?></th>
			<th class=""><?php echo ctranslate("Konu");?></th>
			<th class="mw15 w15"><?php echo ctranslate("Tarihi")?></th>
			<th class="mw12 w15 tar"><?php echo ctranslate("Tutar")?></th>
			</tr>
		</thead>
	<tbody>
	<?php
		$sqlg = mysqli_query($conn, "select * from t4 where ne='service' ".$lteklif." order by id desc limit 0,10"); while($rsf=mysqli_fetch_assoc($sqlg)){
		//$sqlg = mysqli_query($conn, "SELECT t4.*,t5.t1 AS t5_t1 FROM t4 INNER JOIN t5 ON t4.s1 = t5.id where ne='service' ".$luye." order by id desc limit 0,10"); while($rsf=mysqli_fetch_assoc($sqlg)){ $alert=0;
		$alert=0;
		$sqlfu=mysqli_query($conn, "select * from t4 where ne='furun' and s1=".$rsf["id"].""); while($rsfu=mysqli_fetch_assoc($sqlfu)){
		$sqlu=mysqli_query($conn, "select * from ".$_SESSION["lang"]." where id=".$rsfu["s2"].""); $rsu=mysqli_fetch_assoc($sqlu);
			$id=$rsu["id"];
			if($rsfu["s5"]-$rsu["s5"]>0){$alert=1;};
			include("../deppo/tools/script/price.php");
			include("modules/accounting/accounting_calc2.php");
		} //rsfu.movenext : loop
	?>
		<?php //if($rsf["t10"]<>"" and (dt($rsf["t10"])==1 or dt($rsf["t10"])==0)){?>
			<tr class="<?php if($rsf["t10"]<>"" and dt($rsf["t10"])==1){?>alert alert-warning<?php }elseif($rsf["t10"]<>"" and dt($rsf["t10"])==0){?>alert alert-success<?php }?> mfrm" data-toggle="modal" data-target="#myModal" data-width="90%" data-url="modules/services/service.php?ne=service&islem=dservice&id=<?php echo $rsf["id"]?>" data-title="#<?php echo $rs['id']?>">
				<td class="mdn"><?php echo i2a($rsf["id"],7)?> <?php if($rsf["s13"]==0){?><i class="fa fa-clock-o text-warning"></i><?php }elseif($rsf["s13"]==1){?><i class="fa fa-paper-plane text-warning"></i><?php }elseif($rsf["s13"]==2){?><i class="fa fa-envelope-open-o text-info"></i><?php }elseif($rsf["s13"]==3){?><i class="fa fa-check text-success"></i><?php }elseif($rsf["s13"]==4){?><i class="fa fa-ban text-danger"></i><?php }elseif($rsf["s13"]==5){?><i class="fa fa-check text-success" title="Tamamlandı"></i><?php }?></td>
				<td class=""><?php $sqlm=mysqli_query($conn, "select t1 from t5 where id=".$rsf['s1'].""); $rsm=mysqli_fetch_assoc($sqlm); echo names($rsm["t1"],"sname");?></td>
				<td class=""><?php echo $rsf["n2"];?></td>
				<td class="mdn"><?php echo dtarih($rsf["t10"],"gg ka yy");?> <span class="badge badge-warning"><?php //if(dt($rsf["t10"])==1){echo ctranslate("Yarın");}elseif(dt($rsf["t10"])==0){echo ctranslate("Bugün"); }?></span></td>
				<td class="tar digi"><?php echo wprice($rsf["pb2"])?> <?php echo $ikpb?></td>
			</tr>
		<?php }?>
	</tbody>
</table>