<?php
$path="../../";
include("../../map.php");
?>
<script>
    jQuery(document).ready(function () {
        jQuery(".mfrm").on("click", function () {
            var target = jQuery(this).data("target"),
			theModal = jQuery(target),
			title = jQuery(this).data("title"),
			width = jQuery(this).data("width"),
			frmSRC = jQuery(this).data("url"),
			refSRC = jQuery(this).data("ref");
            theModal.fadeIn().addClass("in");
            theModal.find(".v3-modal-title").text(title);
            
            <?php if ($mobile == "") { ?>
                if (width !== undefined) { theModal.css("width", width); }
            <?php } ?>
            if (refSRC !== undefined) { theModal.find(".mcbtn").attr("onclick", "location.href='" + refSRC + "'"); }
            theModal.find("iframe").attr("src", frmSRC);
            theModal.find(".close").on("click", function () { theModal.find("iframe").attr("src", "about:blank"); });
        });
    });
</script>
<table class="v3-table" style="">
	<thead>
		<tr class="mdn">
		<th class="w8 mw8">ID</th>
		<th class="qfont mw15 w15"><?php echo ctranslate(telefon($t25s[0]));?></th>
		<th class="qfont"><?php echo ctranslate("Detay")?></th>
		<th class="qfont mw20 w20" style="text-align:left;"><?php echo ctranslate("Tip")?></th>
		<th class="qfont mw15 w15" style="text-align:left;"><?php echo ctranslate("Kalan")?></th>
	</tr>
	</thead>
	<tbody>
	<?php
		$lmt = 0;$sqlas=mysqli_query($conn, "select * from t4 where ne='hizmet' $luye order by t4 asc"); while($rsas=mysqli_fetch_assoc($sqlas)){
		if ($lmt >= 10) break; $lmt++;
		$sql=mysqli_query($conn, "select id,t1 from t5 where id=".$rsas["s1"].""); $rs=mysqli_fetch_assoc($sql);
	?>
		<tr class="qfont <?php if((daydmy($rsas["t4"]) >= $module["servicenf"]) and daydmy($rsas["t4"]) < ($module["servicenl"]/2)){echo "bg-danger";}elseif((daydmy($rsas["t4"]) >= $module["servicenf"]) and daydmy($rsas["t4"]) > ($module["servicenl"]/2) and daydmy($rsas["t4"]) < ($module["servicenl"]) ){echo "bg-warning";}else{echo "bg-info";}?>" style="cursor:pointer;" title="<?php echo dtarih($rsas["t3"],"gg ka yyyy")?> > <?php echo dtarih($rsas["t4"],"gg ka yyyy")?>">
			<td class="mdn tac"><?php echo i2a($rsas["id"],7)?></td>
			<td class="mfrm" data-toggle="modal" data-target="#myModal" data-width="100%" data-url="modules/clients/client.php?islem=duye&ne=uye&id=<?php echo $rsas['s1']?>" data-title="#<?php echo $rsas['s1']?>"><?php echo names($rs["t1"],"sname")?></td>
			<td class="mfrm" data-toggle="modal" data-target="#myModal" data-width="100%" data-url="modules/clients/client.php?islem=duye&ne=uye&id=<?php echo $rsas['s1']?>#&tab-hizmet" data-title="#<?php echo $rs['id']?>" style="<?php if(date("Y-m-d") > $rsas["t4"]){echo "text-decoration: line-through;";}?>"><?php echo $rsas["n1"]?></td>
			<td class="mdn"><?php echo $rsas["t1"]?> <?php echo $rsas["n2"]?></td>
			<td class=""><div title="<?php echo dtarih($rsas["t4"],"gg ka yyyy");?>" class="v3-date"><span><?php echo dtarih($rsas["t4"],"gg");?></span><span><?php echo dtarih($rsas["t4"],"ka");?></span></div></td>
		</tr>
	<?php }?>
	</tbody>
</table>