<?php
$path="../../";
include("../../map.php");
?>
<table class="v3-table" style="">
<thead>
	<tr class="mdn">
		<th class="" style=""><?php echo ctranslate("Açıklama")?></th>
		<th class="" style=""><?php echo ctranslate($t25s[0])?></th>
		<th class="w5 mw5" style="text-align:right;"><?php echo ctranslate("Tarih")?></th>
		<th class="w15 mw15" style="text-align:right;"><?php echo ctranslate("Banka")?></th>
		<th class="w15 mw15" style="text-align:right;"><?php echo ctranslate("Tutar")?></th>
		<th class="w5 mw5" style="text-align:right;"><?php echo ctranslate("Detay")?></th>
	</tr>
</thead>
<tbody>
		<?php
		$sqld=mysqli_query($conn, "select * from t1 where ne='dekont' order by id desc"); while($rsd=mysqli_fetch_assoc($sqld)){
		$sqlu2=mysqli_query($conn, "select * from t5 where id=".$rsd["s1"].""); $rsu2=mysqli_fetch_assoc($sqlu2);
		$sqlu19=mysqli_query($conn, "select * from t5 where id=".$rsd["s19"].""); $rsu19=mysqli_fetch_assoc($sqlu19);
		if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and $rsd["t15"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days'))) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($rsd["t15"]>=$_GET["ts1"] and $rsd["t15"]<=$_GET["ts2"])){
		if(($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y12"]==3)){
			if ($authority==0){ $yetki=0; }else{ $yetki=1; }
		}else{
			$yetki=0;
		}
		?>
			<tr data-id="<?php echo $rsd["id"];?>" style="height:25px;">
				<td class="mdn"> <?php echo $rsd["n1"];?> </td>
				<td> <?php if(mysqli_num_rows($sqlu2)==0 and mysqli_num_rows($sqlu19)==0){echo "".$rsd["t3"]." {".translate("Üyeliksiz")."}";}elseif(mysqli_num_rows($sqlu2)==0 and mysqli_num_rows($sqlu19)<>0){echo "".$rsu19["t1"]." {".$rsd["t3"]."}";}else{echo $rsu2["t1"];}?> </td>
				<td class="mdn tar"> <div title="<?php echo dtarih($rsd["ts1"],"gg ka yyyy");?>" class="v3-date"><span><?php echo dtarih($rsd["ts1"],"gg");?></span><span><?php echo dtarih($rsd["ts1"],"ka");?></span></div></td>
				<td class="mdn tar"> <?php echo $rsd["t6"]?></td>
				<td class="tar digi"><?php echo wprice($rsd["pb1"]);?> <i class="fa fa-<?php echo strtolower($rsd["t9"]);?>"></i></td>
				<td class="tar">
					<a class="v3-btn v3-btn-warning v3-btn-xs mfrm" data-toggle="modal" data-target="#myModal" data-url="fonksiyon.php?islem=dekont&id=<?php echo $rsd["id"];?>" data-title="<?php echo ctranslate('Dekont')?>"><i class="fa fa-eye"></i></a>
				</td>
			</tr>
		<?php }}?>
	</tbody>	
</table>