<div class="inner-wrapper">
	<section role="main" class="content-body">
		<header class="page-header">
			<h2><?php echo $t36; //Servis?></h2>	
			<div class="right-wrapper text-right">
				<ol class="breadcrumbs">
					<li>
						<a href=".">
							<i class="fa fa-home"></i>
						</a>
					</li>
					<li><span><?php echo $sdil[23]; //Muhasebe?></span></li>
					<li><span><?php echo $t36; //Servis?></span></li>
				</ol>
				<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
			</div>
		</header>
		<?php if($_GET["durum"]=="ok"){?>
			<div class="alert alert-success">
				<?php echo $sdil[212]; //Islem Basariyla Gerçeklestirilmistir !?>
			</div>
		<?php }?>
		<div class="v3-row" id="process"></div>
		<div class="row">
			<div class="col">
				<section class="card">
					<header class="card-header v3-bg-info">
						<div class="card-actions">
							<?php include("modules/public/filter.php");?>
							<a class="mb-1 mt-1 mr-1 btn btn-warning mfrm" data-toggle="modal" data-target="#myModal" data-url="modules/public/add.php?ne=service&islem=service" data-ref="?ne=service&islem=service" data-title="<?php echo ctranslate("Yeni ".$t36s[0]." Ekle")?>" style="margin-top:-2px;"><i class="fa fa-plus" aria-hidden="true"></i> <?php echo $nedir; echo $sdil[201]; //Ekle?></a>
						</div>
						
						<h2 class="card-title mdn"><?php echo $t36; //Servis?></h2>
						<p class="card-subtitle">...</p>
					</header>
					<div class="card-body" style="">
					<?php if($_GET["ts1"]=="" and $_GET["ts2"]==""){?>
						<div class="alert alert-warning">#<?php echo translate("Son 30 Gün Listeniyor.")?></div>
					<?php }?>
						<table class="v3-table"  style="" id="tservice">
							<thead>
								<tr class="mdn <?php if($_SESSION["kim"]=="Admin"){echo "cols";}?>" data-ne="<?php echo $_GET["ne"]?>">
									<th class="black-cell w6 mw6" style=" text-align:center;">ID</span></th>
									<th class=""><?php echo $t36; //Servis?></th>
									<th class="w15 mw15"><?php echo $t25s[0]; //Cari?></th>
									<th class="w10 mw10"><?php echo translate("Yetkili")?></th>
									<th class="w10 mw10"><?php echo translate("Tarih")?></th>
									<th class="w8 mw8" style="text-align:right;"><?php echo $sdil[176]; //tutar?></th>
								</tr>
							</thead>
							<tbody>
								<?php
								$users = json_decode(GetArr("","users","s9=1"), true);
								$sqlf = mysqli_query($conn, "select * from t4 where ne='service' ".$lteklif." order by id desc"); while($rsf=mysqli_fetch_assoc($sqlf)){
								if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and ($rsf["t9"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days')) or $rsf["t9"]=="")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($rsf["t9"]>=$_GET["ts1"] and $rsf["t9"]<=$_GET["ts2"])){
									$sqlm = mysqli_query($conn, "select * from t5 where id=".$rsf["s1"]." order by id desc"); $rsm=mysqli_fetch_assoc($sqlm); $jsmi = json_decode($rsm["n17"],true);
									$sqlc = mysqli_query($conn, "select * from t5 where id=".$rsf["s19"]." order by id desc"); $rsc=mysqli_fetch_assoc($sqlc); $jsci = json_decode($rsc["n17"],true);
									$alert=0;
									?>
									<tr data-id="<?php echo $rsf["id"]?>" style="cursor:pointer; border:0px; clear:both;" class="v3-bg-<?php if($rsf["s13"]==1){echo "warning";}elseif($rsf["s13"]==2){echo "info";}elseif($rsf["s13"]==3){echo "success";}elseif($rsf["s13"]==4){echo "danger";}else{echo "default";}?> mfrm" data-width="90%" data-toggle="modal" data-target="#myModal" data-url="modules/services/service.php?ne=<?php echo $_GET["ne"]?>&islem=d<?php echo $_GET["islem"]?>&id=<?php echo $rsf["id"]?>" data-ref="?ne=service&islem=service" data-title="<?php echo ctranslate("Düzenle")?>">
										<td class="mdn table-check-cell tal"><?php echo i2a($rsf["id"],7);?><br><?php echo $rsf["t1"]?> </td>
										<td class="tal"><?php if($rsf["s13"]==0){?><i class="fa fa-clock-o text-warning" title="Beklemede, Gönderilmedi"></i><?php }elseif($rsf["s13"]==1){?><i class="fa fa-paper-plane text-warning" title="Gönderildi, Henüz Açılmadı"></i><?php }elseif($rsf["s13"]==2){?><i class="fa fa-envelope-open-o text-info" title="Teklif İncelendi"></i><?php }elseif($rsf["s13"]==3){?><i class="fa fa-check text-success" title="Teklif Onaylandı"></i><?php }elseif($rsf["s13"]==4){?><i class="fa fa-ban text-danger" title="Teklif kabul edilmedi"></i><?php }elseif($rsf["s13"]==5){?><i class="fa fa-check text-success" title="Tamamlandı"></i><?php }?> <?php echo $rsf["n2"]?></td>
										<td class="tal"><?php echo $rsm["t1"]?><?php if($jsmi["ifirma"]<>""){echo "<br><span class=\"fs12 mfs12\">".$jsmi["ifirma"]."</span>";}?></td>
										<td class="mdn tal">
											<?php
												$s19s="";
												$s19s .= ($rsf["s19"] == '0' || in_array('0', multivalues($rsf["s19"]))) ? '<span class="badge badge-warning">Admin</span>' : '';
												foreach($users as $key=>$value){
													$s19s .= ($value["id"] == $rsf["s19"] || in_array($value["id"], multivalues($rsf["s19"]))) ? "<span class='badge badge-info'>".$value["item"]."</span>" : '';
												}
												echo empty(rtrim($s19s, ', ')) ? "..." : rtrim($s19s, ', ');
											?>
										</td>
										<td class="tal"><span class="text-info"><?php echo dtarih($rsf["t9"],"gg ka yy")?></span> <i class="fas fa-arrows-alt-h"></i> <span class="text-danger"><?php echo dtarih($rsf["t10"],"gg ka yy")?></span></td>
										<td class="tar"><?php echo wprice($rsf["pb2"])?> <?php echo $ikpb?></td>
									</tr>
								<?php }}?>
							</tbody>
						</table>
					</div>
				</section>
			</div>
		</div>
		<!-- end: page -->
	</section>
</div>
<aside id="sidebar-right" class="sidebar-right">
	<div class="nano">
		<div class="nano-content">
			<a href="#" class="mobile-close d-md-none">
				Collapse <i class="fa fa-chevron-right"></i>
			</a>
			<div class="sidebar-right-wrapper">
				...
			</div>
		</div>
	</div>
</aside>
</section>