<?php
$path="../../";
include("../../map.php");
include("../../secure.php");
$words = $_GET['key']; $i=0;
$parts = explode(" ",trim($words));
$clauses=array();
foreach ($parts as $part){
	$clauses[]="(ne LIKE '%" . mysqli_real_escape_string($part) . "%' or id LIKE '%" . mysqli_real_escape_string($part) . "%' or t1 LIKE '%" . mysqli_real_escape_string($part) . "%' or n2 LIKE '%" . mysqli_real_escape_string($part) . "%' or n4 LIKE '%" . mysqli_real_escape_string($part) . "%' or t4 LIKE '%" . mysqli_real_escape_string($part) . "%' or t5 LIKE '%" . mysqli_real_escape_string($part) . "%' or n17 LIKE '%" . mysqli_real_escape_string($part) . "%')";
}
$clause="(ne LIKE '%" . $words . "%' or id LIKE '%" . $words . "%' or t1 LIKE '%" . $words . "%' or t2='".v3e($words)."' or t4 LIKE '%" . $words . "%' or t5 LIKE '%" . $words . "%' or n2 LIKE '%" . $words . "%' or n4 LIKE '%" . $words . "%' or n17 LIKE '%" . $words . "%')";
//$clause=implode(' and ' ,$clauses);
if(substr($_GET["key"],0,2)=="id"){
	$sor=" id=".substr($_GET["key"],-4)."";
}else{
	$sor=" $clause";
}
//echo $sor;
$sqlc=mysqli_query($conn, "select id,t1 from t5 order by t1 asc"); while($rsc=mysqli_fetch_assoc($sqlc)){$clients[] = $rsc; }
?>
<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>
<style>
	.v3-search-list li {border-bottom: 2px solid #f6f6f6 !important;}
	.v3-list-group-item {padding: 5px 10px;}
	.v3-list-group-item span {display:block; opacity:0.5}
</style>
<ul class="v3-search-list list-group" id="search-list" style="<?php if($_GET["key"]==""){?>display:none;<?php }?>">
	<?php if(($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y3_ayar"]==1))){?>
		<?php if(strpos(strtolower($words),'ayar') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;"  onclick="window.open('?ne=ayarlar&islem=ayarlar','_blank');">
				<?php echo ctranslate("Ayarlar")?><br>
				<b><i class="fa-solid fa-sliders"></i> <?php echo ctranslate("Genel Ayarlar")?></b>
			</li>
		<?php }?>
		<?php if(strpos(strtolower($words),'slide') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=ayarlar&islem=ayarlar#&tab-slide','_blank');">
				<?php echo ctranslate("Ayarlar")?><br>
				<b><i class="fa-solid fa-sliders"></i> <?php echo ctranslate("Slider")?></b>
			</li>
		<?php }?>
	<?php }?>
	<?php if(($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y3_tanim"]==1))){?>
		<?php if(strpos(strtolower($words),'tanım') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="50%" data-toggle="modal" data-target="#myModal" data-url="modules/public/defination.php?ne=ayarlar&islem=tanimlar" data-title="<?php echo ctranslate("Tanımlar")?>">
				<?php echo ctranslate("Ayarlar")?><br>
				<b><i class="fa-solid fa-sliders"></i> <?php echo ctranslate("Tanımlar")?></b>
			</li>
		<?php }?>
	<?php }?>
	<?php if(!empty($m1) and $MSA==1){?>
		<?php if(strpos(strtolower($words),'translate') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="50%" data-toggle="modal" data-target="#myModal" data-url="modules/public/translate.php?ne=ayarlar&islem='?ne=ayarlar&islem=sdil" data-title="<?php echo ctranslate("Translate")?>">
				<?php echo ctranslate("Ayarlar")?><br>
				<b><i class="fa-solid fa-sliders"></i> <?php echo ctranslate("Translate")?></b>
			</li>
		<?php }?>
	<?php }?>
	<?php if(($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y3_backup"]==1))){?>
		<?php if(strpos(strtolower($words),'backup') !== FALSE or strpos(strtolower($words),'yedek') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="50%" data-toggle="modal" data-target="#myModal" data-url="modules/public/backup<?php echo $ver?>.php" data-title="<?php echo ctranslate("Backup")?>">
				<?php echo ctranslate("Ayarlar")?><br>
				<b><i class="fa-solid fa-sliders"></i> <?php echo ctranslate("Backup")?></b>
			</li>
		<?php }?>
	<?php }?>
	<?php if($m16==1 and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y2_siparis"]==1))){?>
		<?php if(strpos(strtolower($words),'sipariş') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=eticaret&islem=siparisler','_blank');">
				<?php echo $sdil[4]; //Eticaret?><br>
				<b><i class="fa-solid fa-dumpster"></i> <?php echo $sdil[5]; //Siparişler?></b>
			</li>
		<?php }?>
		<?php if(strpos(strtolower($words),'kargo') !== FALSE or strpos(strtolower($words),'sevkiyat') !== FALSE){$i++;?>
			<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/ecommerce/ecommerce_deliveries.php" data-title="<?php echo $sdil[7]; //Sevkiyat & Desi İşlemleri?>">
				<?php echo $sdil[4]; //Eticaret?><br>
				<b><i class="fa-solid fa-dumpster"></i> <?php echo $sdil[7]; //Sevkiyat & Desi İşlemleri?></b>
			</li>
		<?php }?>
	<?php }?>
	<?php if(strpos(strtolower($words),'ürünler') !== FALSE and ($m14==1 and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y0"]<>0)))){$i++;?>
		<?php $sqlk = mysqli_query($conn, "select * from ".$_SESSION['lang']." where ne='kayit' $lkayit order by t1 asc"); $kcount = mysqli_num_rows($sqlk);?>
		<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=kayit&islem=kayitlar','_blank');">
			<?php echo ctranslate("Katalog");?><br>
			<b><i class="fa fa-cubes"></i> <?php echo ctranslate($t24);?></b> <span class="v3-badge"><?php echo $kcount;?></span>
		</li>
	<?php }?>
	<?php if(strpos(strtolower($words),'üyeler') !== FALSE and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y1_uyeler"]<>0))){$i++;?>
		<?php $sqlu = mysqli_query($conn, "select * from t5 where ne='uye' $luye order by t1 asc"); $ucount = mysqli_num_rows($sqlu);?>
		<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=uye&islem=uyeler','_blank');">
			<?php echo ctranslate($t25);?><br>
			<b><i class="fa fa-cubes"></i> <?php echo ctranslate($t25);?></b> <span class="v3-badge"><?php echo $ucount;?></span>
		</li>
	<?php }?>
	<?php if(strpos(strtolower($words),'talepler') !== FALSE and ($module["request"]==1 and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y17"]<>0)))){$i++;?>
		<?php $sqlr = mysqli_query($conn, "select * from t2 where ne='request' $lreq order by t1 asc"); $rcount = mysqli_num_rows($sqlr);?>
		<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=request&islem=request','_blank');">
			<?php echo telefon($module["requests"]);?><br>
			<b><i class="fa fa-cubes"></i> <?php echo telefon($module["requests"]);?></b> <span class="v3-badge"><?php echo $rcount;?></span>
		</li>
	<?php }?>
	<?php if((($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y9"]<>0))){?>
		<?php $sql = mysqli_query($conn, "select ne,Cat_ID,Cat_".$_SESSION['lang'].",c1,c2,s3 from kategoriler where Cat_".$_SESSION['lang']." LIKE '%".$_GET["key"]."%' order by Cat_".$_SESSION['lang']." asc"); while($rsx=mysqli_fetch_assoc($sql)){$i++;?>
			<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=<?php if($rsx["ne"][0]=="u"){echo "kayit";} else if($rsx["ne"][0]=="s"){echo "sayfa";} else if($rsx["ne"][0]=="s"){echo "sayfa";} else if($rsx["ne"][0]=="h"){echo "haber";} else if($rsx["ne"][0]=="k"){echo "uye";}?>&islem=<?php if($rsx["ne"][0]=="u"){echo "kayitlar";} else if($rsx["ne"][0]=="s"){echo "sayfa";} else if($rsx["ne"][0]=="h"){echo "sayfa";} else if($rsx["ne"][0]=="k"){echo "uyeler";}?>&grupID=<?php echo $rsx["Cat_ID"]?>','_blank');">
				<?php $sqlxt = mysqli_query($conn, "select ne,Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where Cat_ID=".$rsx["c1"].""); $rsxt=mysqli_fetch_assoc($sqlxt);?>
				<div class="w50 fl mw50 mfl"><?php echo ctranslate("Kategori")?> <?php if(mysqli_num_rows($sqlxt)>0){?>> <?php echo $rsxt["Cat_".$_SESSION['lang'].""];?><?php }?></div><div  class="w50 fr tar mw50 mfr mtar">#<?php echo $rsx["Cat_ID"];?></div>
				<div class="w70 fl mw70 mfl"><b title="<?php echo $sdil[12]; //Kategori?> > <?php if(mysqli_num_rows($sqlxt)>0){?> <?php echo $rsxt["Cat_".$_SESSION['lang'].""];?> > <?php }?><?php echo $rsx["Cat_".$_SESSION['lang'].""];?> #<?php echo $rsx["Cat_ID"];?>"><i class="fa fa-list"></i> <?php echo $rsx["Cat_".$_SESSION['lang'].""];?></b></div> <div  class="w30 fr mw30 mfr tar mtar">...</div>
			</li>
			<?php $stanim="";}?>
		<?php }?>
		<?php $sql = mysqli_query($conn, "select id,t1,ne,s2,ts1,ts3 from ".$_SESSION['lang']." where (ne<>'kayit' and ne<>'form' and ne<>'ayarlar') and $sor $luye order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
			<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/pages/page.php?ne=<?php echo $rs["ne"]?>&islem=dsayfa&id=<?php echo $rs["id"]?>" data-title="#<?php echo $rs["id"]?>">
				<div class="w50 fl mw50 mfl">
					<?php if($rs["ne"]=="haber"){echo $t22s[0];} else if($rs["ne"]=="sayfa"){echo $t21s[0];}else if($rs["ne"]=="msayfa"){echo $n8s[0];}else if($rs["ne"]=="kayit"){echo $t24s[0];} else {$sqlxm=mysqli_query($conn, "select * from genel where ne='xmodules' and n2='".$rs["ne"]."'"); $rsxm=mysqli_fetch_assoc($sqlxm); echo $rsxm["n1"];} if(kategori($rs["s2"])[0]<>"#"){echo " > ".kategori($rs["s2"]);};?>
				</div>
				<div  class="w50 fr tar mw50 mfr mtar">#<?php echo $rs["id"]?></div>
				<div class="w70 fl mw70 mfl"><b title="<?php if($rs["ne"]=="haber"){echo $t22;} else if($rs["ne"]=="sayfa"){echo $t21;}else if($rs["ne"]=="msayfa"){echo $n8;}else if($rs["ne"]=="kayit"){echo $t24;}?> > <?php echo $rs["t1"]?> #<?php echo $rs["id"]?>"><i class="fa fa-file"></i> <?php echo kisalt($rs["t1"],50)?></b></div><div  class="w30 fr mw30 mfr tar mtar"><?php if($rs["ts3"]<>"" and $rs["ts3"]<>"0000-00-00 00:00:00"){echo dtarih($rs["ts3"],"gg ka yy");}else{echo dtarih($rs["ts1"],"gg ka yy");}?></div>
			</li>
		<?php }?>
		<?php
		if(($m14==1 and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y0"]<>0)))){
			$sql = mysqli_query($conn, "select * from ".$_SESSION['lang']." where ne='kayit' and $sor $luye order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;
				if($f7==0){
					if($rs["s13"]==1){ $clr="text-success"; $tit=translate("Aktif");}else{ $clr="text-muted"; $tit=translate("Pasif");}
				}else{
					if($rs["s13"]==1 and $rs["s5"]==1){ $clr="text-warning";  $tit=translate("Kritik Stok");}elseif($rs["s13"]==1 and $rs["s5"]<1){ $clr="text-danger";  $tit=translate("Stokta Yok");}elseif($rs["s13"]==1 and $rs["s5"]>1){ $clr="text-success"; $tit=translate("Stokta Var");}elseif($rs["s13"]==0){ $clr="text-muted"; $tit=translate("Pasif");}
				}
				?>
				<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/products/product.php?ne=<?php echo $rs["ne"]?>&islem=d<?php echo $rs["ne"]?>&id=<?php echo $rs["id"]?>" data-title="#<?php echo $rs["id"]?>">
					<div class="w50 fl mw50 mfl"><?php echo $t24s[0]; if(kategori($rs["s9"])[0]<>"#"){echo " > ".kategori($rs["s9"]);}; if(kategori($rs["s10"])[0]<>"#"){echo " > ".kategori($rs["s10"]);}; if(kategori($rs["s11"])[0]<>"#"){echo " > ".kategori($rs["s11"]);};?></div><div  class="w50 fr tar mw50 mfr mtar">#<?php echo $rs["id"]?></div>
					<div class="w70 fl mw70 mfl"><b title="#<?php echo $rs["id"]?> / Stok:<?php echo $rs["s5"]?> / Fiyat:<?php echo price($rs["id"],"pb1")?>"><i class="fa fa-cubes <?php echo $clr?>" title="<?php echo $tit?>"></i> <?php echo kisalt($rs["t1"],50)?></b></div> <div  class="w30 fr mw30 mfr tar mtar"><?php if($e5==1){echo price($rs["id"],"pb1")." ".$ikpb;}?></div>
			<!--
				<div class="w50 fl mw50 mfl">xxx</div><div  class="w50 fr tar mw50 mfr mtar">yyy</div>
				<div class="w70 fl mw70 mfl">zzz</div> <div  class="w30 fr mw30 mfr tar mtar">www</div>
			-->
		</li>
	<?php }}?>
	<?php $sql = mysqli_query($conn, "select id,t1,ne,n17 from t5 where $sor $luye order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$jsi = json_decode($rs["n17"],true); $i++;?>
	<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/clients/client.php?ne=uye&islem=duye&id=<?php echo $rs["id"]?>" data-title="#<?php echo $rs["id"]?>">			
		<div class="w50 fl mw50 mfl"><?php echo $t25s[0];?></div><div  class="w50 fr tar mw50 mfr mtar">#<?php echo $rs["id"]?></div>
		<div class="w70 fl mw70 mfl"><b title="<?php echo $t25;?> > <?php echo $rs["t1"]?> #<?php echo $rs["id"]?>"><i class="fa fa-user"></i> <?php echo $rs["t1"]?></b></div> <div  class="w30 fr mw30 mfr tar mtar"><?php if($jsi["ifirma"]<>""){echo kisalt($jsi["ifirma"],20);}?></div>
	</li>
<?php }?>
<?php if($m16==1 and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y2_siparis"]==1))){?>
	<?php $sql = mysqli_query($conn, "select id,t4,s1,ts1 from eticaret where ne='siparis' and (ne LIKE '%".$_GET["key"]."%' or t4 LIKE '%".$_GET["key"]."%' or n11 LIKE '%".$_GET["key"]."%') order by t4 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
		<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/ecommerce/ecommerce_order.php?ne=eticaret&islem=siparis&id=<?php echo $rs["id"]?>" data-title="#<?php echo $rs["id"]?>">
			<div class="w50 fl mw50 mfl"><?php echo $sdil[5]; //Siparişler?></div><div  class="w50 fr tar mw50 mfr mtar"><b title="<?php echo $sdil[5]; //Siparişler?> > <?php echo $rs["t4"]?> #<?php echo $rs["id"]?>">#<?php echo $rs["t4"]?></b></div>
			<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php if($rs["s1"]>0){foreach($clients as $key=>$value){if($value["id"]==$rs["s1"]){echo $value["t1"];}}}else{echo "Misafir";}?></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($rs["ts1"],"gg ka yy time");?></div>
		</li>
	<?php }?>
<?php }?>
<?php if($s20<>0 and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y13"]<>0))){?>
	<?php $sql = mysqli_query($conn, "select id,t1 from genel where ne='gorev' and (ne LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%') $luye order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
		<li class="v3-bg-warning v3-list-group-item" style="cursor:pointer;" onclick="window.open('?ne=<?php echo $rs["ne"]?>&islem=d<?php echo $rs["ne"]?>&id=<?php echo $rs["id"]?>','_blank');">
			<span><?php echo $task?></span>
			<b title="<?php echo $task?> > <?php echo $rs["t1"]?> #<?php echo $rs["id"]?>"><i class="fa fa-tasks"></i> <?php echo $rs["t1"]?></b>
		</li>
	<?php }?>
<?php }?>
<?php if($module["request"]==1 and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y17"]<>0))){?>
	<?php $sql = mysqli_query($conn, "select ne,id,t1,t2,s1,s3,ts1 from t2 where (ne='fmesaj' or ne='request') and (n2 LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%' or id='".$_GET["key"]."') order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
		<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-toggle="modal" data-target="#myModal" data-url="<?php if(file_exists("../../../request/request".$rs["s1"].".php")){echo "../../../request/request".$rs["s1"].".php";}else{echo "modules/requests/request.php";}?>?islem=<?php echo $rs["ne"];?>&id=<?php echo $rs["id"];?>">
			<div class="w50 fl mw50 mfl"><?php echo telefon($module["requests"]);?></div><div class="w50 fr tar mw50 mfr mtar"><?php if($rs["s3"]>0){foreach($clients as $key=>$value){if($value["id"]==$rs["s3"]){echo $value["t1"];}}}else{echo "Misafir";}?></div>
			<div class="w70 fl mw70 mfl"><b title="<?php if($rs["ne"]=="request"){echo telefon($module["requests"]);}else{echo ctranslate("Form Mesaj");}?> > <?php echo $rs["t1"]?> #<?php echo $rs["id"]?>"><i class="fa fa-tasks"></i> <?php echo $rs["t2"];?> <?php if($rs["t1"]<>""){echo "[".$rs["t1"]."]";};?></b></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($rs["ts1"],"gg ka yy time");?></div>
		</li>
	<?php }?>
<?php }?>
<?php if(($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y1_hizmet"]==1))){?>
	<?php $sql = mysqli_query($conn, "select id,s1,t1,n1 from t4 where ne='hizmet' and (n1 LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%') order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
		<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/clients/client.php?islem=duye&ne=uye&id=<?php echo $rs["s1"]?>&key=&sayfa=#&tab-hizmet" data-title="#<?php echo $rs["id"]?>">
			<span><?php echo $sdil[167]; //Hizmet?></span>
			<b title="<?php echo $sdil[167]; //Hizmet?> > <?php echo $rs["n1"]?>[<?php echo $rs["t1"]?>] #<?php echo $rs["id"]?>"><i class="fa fa-clock-o"></i> <?php echo $rs["n1"]?></b>
		</li>
	<?php }?>
<?php }?>
<?php if($g9<>0 and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y8_teklifler"]<>0))){?>
	<?php
	$sql = mysqli_query($conn, "select id,s1,n2,t9,s13,pb2 from t4 where ne='service' and (n1 LIKE '%".$_GET["key"]."%' or n2 LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%') order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;
		$sqlc = mysqli_query($conn, "select id,t1,ne,n17 from t5 where id=".$rs["s1"]." order by t1 asc"); $rsc=mysqli_fetch_assoc($sqlc);
		?>
		<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-width="93%" data-toggle="modal" data-target="#myModal" data-url="modules/services/service.php?ne=service&islem=dservice&id=<?php echo $rs["id"]?>" data-title="#<?php echo $rs["id"]?>">
			<div class="w50 fl mw50 mfl"><?php echo $t36; //Servis?> > <?php if($rs["s13"]==0){?><i class="fa fa-clock-o text-warning"></i><?php }elseif($rs["s13"]==1){?><i class="fa fa-paper-plane text-warning"></i><?php }elseif($rs["s13"]==2){?><i class="fa fa-envelope-open-o text-info"></i><?php }elseif($rs["s13"]==3){?><i class="fa fa-check text-success"></i><?php }elseif($rs["s13"]==4){?><i class="fa fa-ban text-danger"></i><?php }?> <?php echo $rs["n2"]?></div><div  class="w50 fr tar mw50 mfr mtar"><?php echo wprice($rs["pb2"])?> <?php echo $ikpb?></div>
			<div class="w70 fl mw70 mfl"><b title="<?php echo $t36; //Servis?> > <?php echo $rs["n2"]?> #<?php echo $rs["id"]?>"><i class="fa fa-user"></i> <?php if(mysqli_num_rows($sqlc)>0){echo $rsc["t1"];}else{echo "...";}?></b></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($rs["t9"],"gg ka yy")?></div>
		</li>
	<?php }?>
<?php }?>
<?php if($module["uye_relations"]=="1" and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y16"]<>0))){?>
	<?php $sql = mysqli_query($conn, "select id,t1,s3,ts1 from t1 where ne='relations' and (n1 LIKE '%".$_GET["key"]."%' or n2 LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%' or n17 LIKE '%".$_GET["key"]."%') $luye order by t1 asc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
		<li class="v3-bg-warning v3-list-group-item mfrm" style="cursor:pointer;" data-toggle="modal" data-target="#myModal" data-width="50%" data-url="modules/clients/client_relation_detail.php?islem=relations&id=<?php echo $rs["id"]?>" data-title="<?php echo $t25s[0];?> <?php echo ctranslate("İlişkileri")?>; <?php echo $rsc["t1"]?>">
			<div class="w50 fl mw50 mfl"><?php echo $t25s[0];?> <?php echo ctranslate("İlişkileri")?></div><div  class="w50 fr tar mw50 mfr mtar"><?php if($rs["s3"]>0){foreach($clients as $key=>$value){if($value["id"]==$rs["s3"]){echo $value["t1"];}}}else{echo "Misafir";}?></div>
			<div class="w70 fl mw70 mfl"><b title="<?php echo $t25s[0];?> <?php echo ctranslate("İlişkileri")?> > <?php echo $rs["t1"]?> #<?php echo $rs["id"]?>"><i class="fa fa-handshake-o"></i> <?php echo $rs["t1"]?></b></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($rs["ts1"],"gg ka yy time");?></div>		
		</li>
	<?php }?>
<?php }?>
<li style="background: silver;" class="v3-list-group-item">
	<?php if($i>0){?>
		<a title=""><i class="fa fa-check"></i> <?php echo "".$i." ".translate("Kayıt Bulundu");?></a>
	<?php }else{?>
		<a title=""><i class="fa fa-ban"></i> <?php echo ctranslate("Kayıt Bulunamadı");?></a>
	<?php }?>
</li>
</ul>