<div class="inner-wrapper">
	<?php
	$users = json_decode(GetArr("","users","(s9=1 or s1=1)"), true);
	$ccats = json_decode(GetArr("k","categories"), true);
	$sqli=mysqli_query($conn, "select id,t3,n1,n4,n13,n14 from genel where ne='inputs' and n3='".$_GET["ne"]."' and s1=0 order by s10,id asc");$a=0; while($rsi=mysqli_fetch_assoc($sqli)){$a++; $inputs[] = $rsi; }
	if($cols["c_medya"]<>""){
		$sqlm=mysqli_query($conn, "select id,ne,t1,s1,s2 from medya where t3='".$_GET["ne"]."'"); while($rsm=mysqli_fetch_assoc($sqlm)){$medias[] = $rsm;}
	}
	if($cols["c_uye_bakiye"]<>""){
		$sch=mysqli_query($conn, "select s1,pb1,pb2,pb3,pb4 from t4 where ne='cari' order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){$currents[] = $hcari;}
	}
	$slmt = !empty($_GET["show"]) ? $_GET["show"] : (!empty($cols["c_".$_GET["ne"]."_limit"]) ? $cols["c_".$_GET["ne"]."_limit"] : (!empty($module["slmt"]) ? $module["slmt"] : 20));
	$sayfa = $_GET['sayfa'];
	if($_GET['sayfa'] == "") {$sayfa = 0; $ss = 1;}else{$sayfa = ($sayfa-1) * $slmt; $ss = $_GET['sayfa'];}
	if(!empty($_GET["key"])){
		$sorgu .= "and (id LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%' or t4 LIKE '%".$_GET["key"]."%' or n2 LIKE '%".$_GET["key"]."%' or n4 LIKE '%".$_GET["key"]."%' or n17 LIKE '%".$_GET["key"]."%')"; 
	}
	if($_GET["grupID"]<>""){
		$sorgu .= "and (s2='".$_GET["grupID"]."' or s3='".$_GET["grupID"]."')";
	}
	$order = !empty($_GET["order"]) ? "order by " . qa($_GET["order"]) : (!empty($cols["c_{$_GET["ne"]}_order"]) ? $cols["c_{$_GET["ne"]}_order"] : "order by t1 asc");
	$sql = mysqli_query($conn, "select SQL_CALC_FOUND_ROWS id,t1,t2,t3,t4,t5,s1,s2,s4,s7,s9,s13,s19,n8,n16,n17,n18,ts1 from t5 where ne<>'' $sorgu $luye $order limit $sayfa,$slmt");
	$total_result = mysqli_query($conn, "SELECT FOUND_ROWS()"); $rcount = mysqli_fetch_array($total_result)[0];//Kayıt Sayısı
	?>
	<section role="main" class="content-body">
		<header class="page-header">
			<h2><?php echo $t25;?></h2>
			<div class="right-wrapper text-right">
				<ol class="breadcrumbs">
					<li>
						<a href=".">
							<i class="fa fa-home"></i>
						</a>
					</li>
					<li><span>Crm +Plus</span></li>
					<li><span><?php echo $t25;?></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" id="v-<?php echo $_GET['islem'];?>">
							<?php include("modules/public/filter.php");?>
                            <a class="mb-1 mt-1 mr-1 btn btn-success savebtn" style="display:none;" onclick="AjaxPost('?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=mupdate','#lform','?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>','')"><i class="fa fa-refresh" aria-hidden="true"></i> <?php echo ctranslate("Güncelle")?></a>
                            <a class="mb-1 mt-1 mr-1 btn btn-danger delbtn" style="display:none;" onclick="AjaxPost('?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=mdel','#lform','?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>','')"><i class="fa fa-times" aria-hidden="true"></i> <?php echo ctranslate("Sil")?></a>
							<a class="mb-1 mt-1 mr-1 btn btn-default" href="<?php if($_GET["sayfa"]=="" or $_GET["sayfa"]==1){?>#<?php }else{?>?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&sayfa=<?php echo $ss-1;?><?php }?>" title="<?php echo $sdil[146]; //Önceki?>"><i class="fa fa-chevron-circle-left" aria-hidden="true"></i></a>
							<div class="mb-1 mt-1 mr-1 btn btn-default">
								<select onChange="self.location.href=this.options[this.selectedIndex].value;" class="form-control v3-input-xs" style="padding:0px; height: 19px;">
									<?php
										$rsay=$rcount/$slmt;
										for ($i = 0; $i <= $rsay; $i++){
										$x=$i+1;
									?>
										<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&sayfa=<?php echo $x;?>" <?php if(($_GET["sayfa"]=="" and $x==1) or $_GET["sayfa"]==$x){?>selected<?php }?>><?php echo $x;?></option>
									<?php }?>
								</select>
							</div>
							<a class="mb-1 mt-1 mr-1 btn btn-default" href="<?php if($x >= $ss+1){?>?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&sayfa=<?php echo $ss+1;?><?php }else{?>#<?php }?>"  title="<?php echo $sdil[147]; //Sonraki?>"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a>
							<div class="mb-1 mt-1 mr-1 btn btn-default mdn">
								<select onChange="self.location.href=this.options[this.selectedIndex].value;" class="form-control v3-input-xs" style="padding:0px; height: 19px;">
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>">Sırala</option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&durum=order&order=t1+asc" <?php if($_GET["order"]=="t1+asc"){echo "selected";}?>>A-Z'ye</option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&durum=order&order=t1+desc" <?php if($_GET["order"]=="t1+desc"){echo "selected";}?>>Z-A'ya</option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&durum=order&order=id+asc" <?php if($_GET["order"]=="id+asc"){echo "selected";}?>>Eski->Yeni</option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&durum=order&order=id+desc" <?php if($_GET["order"]=="id+desc"){echo "selected";}?>>Yeni->Eski</option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&durum=order&order=s4+asc" <?php if($_GET["order"]=="s4+asc"){echo "selected";}?>>Pasif</option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_REQUEST["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&durum=order&order=s4+desc" <?php if($_GET["order"]=="s4+desc"){echo "selected";}?>>Aktif</option>
								</select>
							</div>
								<a class="mb-1 mt-1 mr-1 btn btn-warning mfrm" data-toggle="modal" data-width="50%" data-target="#myModal" data-url="modules/public/add.php?ne=uye&islem=uyeler" data-title="<?php echo ctranslate("".$t25s[0]." Ekle");?>" data-ref="?ne=uye&islem=uyeler"><i class="fa fa-plus" aria-hidden="true"></i> <?php echo ctranslate("".$t25s[0]." Ekle");?></a>
								<div class="mb-1 mt-1 mr-1 btn btn-default" onclick="toggle('.ddd')" style="position: relative;"><i class="fa fa-ellipsis-v" aria-hidden="true"></i>
									<div class="dropdown-menu ddd" role="menu" style="right: 0px;">
										<a class="dropdown-item text-1" href="#">...</a>
										<a class="dropdown-item text-1" href="#">...</a>
										<a class="dropdown-item text-1" href="#">...</a>
									</div>
								</div>
						</div>
						<h2 class="card-title mdn"><?php echo $t25;?></h2>
						<p class="card-subtitle">...</p>
					</header>
					<div class="card-body " style="">
						<form method="post" id="lform" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&sayfa=<?php echo $_GET["sayfa"];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&durum=isle" class="w1600">
							<table class="v3-table resizable" id="t<?php echo $_GET['ne'];?>">
								<thead>
									<tr class="mdn <?php if($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y15"]<>0)){echo "cols";}?>" data-ne="uye">
										<th style="text-align:center;" class="w2 mw2">
										<div class="checkbox-custom" style="display: inline;">
											<input type="checkbox" id="c0" onclick="Checks(this); toggle('#alldel')" <?php if($_SESSION["kim"]=="yonetici" and $_SESSION["y15"]==0){echo "disabled";}?>>
											<label for="c0"></label>
										</div>
										</th>
										<th class="w6 mw6" style="text-align:center;">ID 
											<div class="order">
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=t5+asc" class="fa fa-sort-asc"></a>
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=t5+desc" class="fa fa-sort-desc"></a>
											</div>
										</th>
										<th scope="col">
											<?php echo $t25;?>
											<div class="order">
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=t1+asc" class="fa fa-sort-asc"></a>
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=t1+desc" class="fa fa-sort-desc"></a>
											</div>
										</th>
										<th class="w6 mw10 <?php if($cols["c_uye_islem"]<>"" or $cols["c_uye_medya"]<>""){}else{echo "dn";}?>" ><?php echo $sdil[213]; //İşlemler?></th>
										<?php
										$i=0;foreach($inputs as $key=>$value){;
										if($value["n4"]<>"switch"){$i++;}
										if($value["n4"]<>"switch" and $cols["c_uye_input_".$value["id"].""]<>""){
										?>
										<th class="w5 mw5">
											<?php echo $value["n1"]?>
											<i class="fa-regular fa-square-caret-down" onclick="toggle('#<?php echo cevir1($value["n1"])?>')"></i>
											<ul class="col_filter" id="<?php echo cevir1($value["n1"])?>">
											<?php
												$arr = array();
												foreach($fcol as $ckey=>$cvalue){ $jsi = json_decode($cvalue["n17"], true);
												if($jsi["i".$i.""]<>""){ $arr[] = $jsi["i".$i.""];}}
											?>
											<?php foreach (array_unique($arr) as $ar){?>
												<li><label for="cf<?php echo $i;?>"><input type="checkbox" id="cf<?php echo $i;?>" name="<?php echo $value["n1"]?>[]" value="<?php echo $ar?>"> <?php echo $ar?></label></li>
											<?php }?>
											</ul>
										</th>
										<?php }}?>
										<th class="w8 mw8 <?php if($cols["c_uye_gsm"]==""){echo "dn";}?>"><?php echo $sdil[95]; //Gsm No?></th>
										<th class="w11 mw11 <?php if($cols["c_uye_email"]==""){echo "dn";}?>">E-Mail</th>
										<th class="w8 mw8 <?php if($cols["c_uye_kategori"]==""){echo "dn";}?>"><?php echo $sdil[73]; //Grup?></th>
										<?php if($h10<>0){?>
											<th onclick="sortTable('t<?php echo $_GET['ne'];?>',cellIndex)" class="w10 mw12 <?php if($cols["c_uye_konum"]==""){echo "dn";}?>"><?php echo $sdil[98]; //Konum?></th>
										<?php }?>
										<?php if($e8<>0){?>
											<th class="w8 mw8 tac <?php if($cols["c_uye_bakiye"]==""){echo "dn";}?>">
												<?php echo $sdil[159]; //Bakiye?> (<?php echo $ikpb;?>)
												<div class="order">
													<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=pb1+asc" class="fa fa-sort-asc"></a>
													<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=pb1+desc" class="fa fa-sort-desc"></a>
												</div>
											</th>
										<?php }?>
											<th class="w5 mw8 tar <?php if($cols["c_uye_puan"]==""){echo "dn";}?>" style="">
												<?php echo translate("Puan")?> <a class="mfrm fa fa-external-link" data-toggle="modal" data-target="#myModal" data-url="modules/clients/clients_point.php" href="#" title="<?php echo translate("Puan")?>"></a>
											</th>
											<th class="w2 mw2 tac <?php if($cols["c_uye_app"]==""){echo "dn";}?>" style="">
												App
											</th>
											<th class="w12 mw12 e <?php if($cols["c_uye_yonetici"]==""){echo "dn";}?>" style="" onclick="sortTable('t<?php echo $_GET['ne'];?>')">
												<?php echo ctranslate("Yönetici(ler)")?>
											</th>
										<th class="w6 mw10" style="text-align:center;"><?php echo $sdil[213]; //İşlemler?></th>
									</tr>
								</thead>
								<tbody class="filterable">
									<?php
									while($rs=mysqli_fetch_assoc($sql)){ $jsm = json_decode($rs["n18"], true); $jsi = json_decode($rs["n17"], true); $jsl = json_decode($rs["n16"], true); $jsa = json_decode($rs["n8"], true);
										if ($jsi["is6"]==1 or $authority==0){$dauth=0;}else{ $dauth=1;}
										//-- Bakiye Hesapla -->
										if($e8<>0){
											foreach($currents as $key=>$value){ if($value["s1"]==$rs["id"]){include("modules/clients/client_current_vcalc.php");}}
											$bakiye=($cpb1-$cpb2)-($cpb3-$cpb4);
											$usql = mysqli_query($conn, "update t5 set pb1='".$bakiye."' where id=".$rs["id"]."");
										}
										//-- Bakiye Hesapla -->
										$i=0; $f=0; $v=0; $thumbnail=""; $k="";
										foreach($medias as $key=>$value){
											if($value["ne"]=="resim" and $value["s1"]==$rs["id"] and $value["s2"]==1){$thumbnail=$value["t1"];}
											if($value["ne"]=="resim" and $value["s1"]==$rs["id"]){$i++;}
											if($value["ne"]=="dosya" and $value["s1"]==$rs["id"]){$f++;}
											if($value["ne"]=="video" and $value["s1"]==$rs["id"]){$v++;}
										}
										if(substr($thumbnail,-4)<>"webp" and substr($thumbnail,-3)<>"svg"){$k="k_";}
										?>
										<tr data-id="<?php echo $rs["id"];?>" class="<?php if($rsc["n3"]<>""){?>alert alert-<?php echo $rsc["n3"];?><?php }?>">
											<td style="text-align:center;" class="">
												<div class="cflip" onclick="jQuery(this).toggleClass('active'); var chk = jQuery(this).find('.dchck'); chk.prop('checked', !chk.prop('checked'));">
													<div class="shadow flip_card">
														<div class="front ff<?php echo $rs["id"]?>" data-id="<?php echo $rs["id"]?>">
														<?php if($thumbnail<>""){echo "<img src=\"../deppo/image/".$k.$thumbnail."\">";}else{echo names($rs["t1"],"sname");}?>
														</div>
														<div class="back fb<?php echo $rs["id"]?>" data-id="<?php echo $rs["id"]?>"><i class="fas fa-check mfs20"></i></div>
													</div>
													<input type="checkbox" style="display:none;" id="c<?php echo $rs["id"]?>" class="dchck" name="SID[]" value="<?php echo $rs["id"]?>" <?php if($dauth==0){echo "Disabled";}?>>
												</div>
												<input type="hidden" name="KID[]" value="<?php echo $rs["id"]?>"/>
											</td>
											<th class="mdn cp v3-text-info mfrm" data-toggle="modal" data-width="90%" data-target="#myModal" data-url="modules/clients/client.php?islem=duye&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&sayfa=<?php echo $_GET["sayfa"];?>" style="cursor:pointer;"><?php if($rs["t5"]=="" or $rs["t5"]=="0"){echo i2a($rs["id"],7);}else{echo $rs["t5"];}?></th>
											<td class="" style"">
												<span class="dn"><?php echo $rs["t1"]?></span>
												<?php if($rs["s1"]=="1"){echo "<i class='fas fa-user-edit' style='position: absolute; top: 2px; color: burlywood; font-size: 13px; left: 12px;' title='İşlem Sorumlusu'></i>";}?>
												<div class="fl w50"><input type="text" name="t1[]" class="form-control mpl0" value="<?php echo $rs["t1"];?>" style="background: transparent;" /></div>
												<div class="mdn fr w50"><div class="<?php if($jsi["ictip"]=="kurumsal"){echo "dn";}?>"><?php echo $jsi["iunvan"];?></div><input  class="<?php if($jsi["ictip"]<>"kurumsal"){echo "dn";}?> form-control mpl0" title="ifirma" type="text" value="<?php echo $jsi["ifirma"];?>" style="background: transparent; border: 0px" placeholder="<?php echo translate("Firma Adı")?>" readonly/></div>
											</td>
											<td style="" class="mdn <?php if($cols["c_uye_islem"]<>"" or $cols["c_uye_medya"]<>""){}else{echo "dn";}?>">
											<div style="margin-top: 12px; float:left;">
											<div class="checkbox-custom checkbox-<?php if($rs["s4"]==1){echo "success";}else{echo "danger";}?>  <?php if($cols["c_uye_islem"]==""){echo "dn";}?>" alt="<?php echo $sdil[220]; //Açık/Kapalı?>" title="<?php echo $sdil[220]; //Açık/Kapalı?>" style="float:left;">
												<input type="checkbox" id="a<?php echo $rs["id"]?>" <?php if($rs["s4"]==1){?>checked<?php }?> onclick="if(!confirm('<?php echo $sdil[220]; //Açık/Kapalı?> durumunu değiştirmek istediğinize eminmisiniz?')) return false; AjaxGet('?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&durum=s4&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&s4=<?php if($rs["s4"]=="1"){?>0<?php }else{?>1<?php }?>&sayfa=<?php echo $_GET["sayfa"];?>','?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&sayfa=<?php echo $_GET["sayfa"];?>&grupID=<?php echo $_GET["grupID"];?>')">
												<label for="a<?php echo $rs["id"]?>"></label>
											</div>
											<div class="checkbox-custom checkbox-<?php if($rs["s7"]==1){echo "success";}else{echo "danger";}?> dn <?php if($cols["c_uye_islem"]==""){echo "dn";}?>" alt="<?php echo $sdil[218]; //Vitrin?>" title="<?php echo $sdil[218]; //Vitrin?>" style="float:left;">
												<input type="checkbox" id="v<?php echo $rs["id"]?>" <?php if($rs["s7"]==1){?>checked<?php }?> onclick="if(!confirm('<?php echo $sdil[218]; //Vitrin?> durumunu değiştirmek istediğinize eminmisiniz?')) return false; AjaxGet('?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&durum=s7&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&s7=<?php if($rs["s7"]=="1"){?>0<?php }else{?>1<?php }?>&sayfa=<?php echo $_GET["sayfa"];?>','?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&sayfa=<?php echo $_GET["sayfa"];?>&grupID=<?php echo $_GET["grupID"];?>')">
												<label for="v<?php echo $rs["id"]?>"></label>
											</div>
												<?php
												$m=0; foreach($inputs as $key=>$value){
												if($value["n4"]=="switch"){$m++;}
												if($value["t3"]<>""){$ival=$value["t3"];}else{$ival = "ms".$m."";}
												if($value["n4"]=="switch" and $cols["c_kayit_input_".$value["id"].""]<>""){
												?>
												<div class="checkbox-custom p0 mp0 cp <?php if($jsm[$ival]=="1"){echo "v3-bg-success";}else{echo "v3-bg-danger";}?>" title="<?php echo $value["n1"]?>" style="float: left; margin-top: -9px; width: 20px; height: 20px; border-radius:3px; margin-right:2px;" onclick="if(!confirm('<?php echo $value["n1"]?> durumunu değiştirmek istediğinize eminmisiniz?')) return false; AjaxGet('?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&durum=ms&id=<?php echo $rs["id"];?>&k=ms<?php echo $m?>&v=<?php if($jsm[$ival]=="1"){?>0<?php }else{?>1<?php }?>&sayfa=<?php echo $_GET["sayfa"];?>','#'); jQuery(this).toggleClass('v3-bg-danger v3-bg-success'); jQuery('.c<?php echo $rs["id"]?>').toggleClass('fa-check')">
													<?php if($value["n14"]<>""){?><i class="checkbox-custom <?php echo $value["n14"]?>" style="padding:0px 3px;"></i><?php }else{?><i class="fa <?php if($jsm[$ival]=="1"){echo "fa-check";}?> c<?php echo $rs["id"]?>" style="padding:0px 3px;"></i><?php }?>
												</div>
												<?php }}?>
												</div>
												<?php if($h6<>0){?>
													<span class="badge badge-success <?php if($cols["c_uye_medya"]==""){echo "dn";}?>" title="<?php echo $f;?> <?php echo $sdil[211]; //Dosya?>" style="margin-right:1px; cursor:pointer;"><?php echo $f;?></span>
												<?php }?>
												<?php if($h7<>0){?>
													<span class="badge badge-success <?php if($cols["c_uye_medya"]==""){echo "dn";}?>" title="<?php echo $v;?> <?php echo $sdil[210]; //Video?>" style="margin-right:1px; cursor:pointer;"><?php echo $v;?></span>
												<?php }?>
												<?php if($h1<>0){?>
													<span class="badge badge-success <?php if($cols["c_uye_medya"]==""){echo "dn";}?>" title="<?php echo $i;?> <?php echo $sdil[209]; //Resim?>" style="margin-left:1px; cursor:pointer;"><?php echo $i;?></span>
												<?php }?>
												<?php 
													if($g5<>0){
														$cserv=0;$caserv=0;
														$sqlh=mysqli_query($conn, "select * from t4 where ne='hizmet' and s1=".$rs["id"]." order by t4 asc"); while($rsh=mysqli_fetch_assoc($sqlh)){
															$cserv++;
															$gun=tfark2(date('Y-m-d'),$rsh["t4"]); $ndate = strtotime("".$rsh["t4"]."  00:00:00");
															if(($gun >= $module["servicenf"] and $gun<=$module["servicenl"] and $rsh["s3"]==0) or (date('d', strtotime("-2 day", $ndate)) <= date('d') and date('d') <= date('d', strtotime("+1 day", $ndate))  and $rsh["s3"]==1) or (date('d', strtotime("-2 day", $ndate)) <= date('d') and date('d') <= date('d', strtotime("+1 day", $ndate))  and  date("m")==date('m', strtotime($ndate)) and $rsh["s3"]==2)){ $caserv++; }
														}
														if($cserv>0){
													?>
														<span class="cp badge badge-<?php if($caserv>0){echo "warning";}else{echo "success";}?> mfrm" data-toggle="modal" data-width="90%" data-target="#myModal" data-url="modules/clients/client.php?islem=duye&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&sayfa=<?php echo $_GET["sayfa"];?>#&tab-hizmet" title=""><i class="fas fa-calendar-alt"></i></span>
													<?php
													}}
												?>
											</td>
											<?php
											$i=0;foreach($inputs as $key=>$value){
											if($value["t3"]<>""){$ival=$value["t3"];}else{$ival = "i".$i."";}
											if($value["n4"]<>"switch"){$i++;}
											if($value["n4"]<>"switch" and $cols["c_uye_input_".$value["id"].""]<>""){
											?>
											<td class="mdn <?php echo $value["n13"]?>">
												<?php if(is_array($jsi[$ival])){?>
													<?php foreach($jsi[$ival] as $k=>$v){$val = "".$val.", ".$v."";}?>
													<?php echo ltrim($val,",");?>
												<?php }else{?>
													<?php if($jsi[$ival]<>""){echo $jsi[$ival];}else{echo "...";}?>
												<?php }?>
											</td>
											<?php }}$val="";?>
											<td class="mw30 <?php if($cols["c_uye_gsm"]==""){echo "dn";}?>" ><a href="tel:0<?php echo telefon($rs["t4"]);?>"><?php echo $rs["t4"];?></a></td>
											<td class=" mdn <?php if($cols["c_uye_email"]==""){echo "dn";}?>" ><a href=""><?php echo v3d($rs["t2"]);?></a></td>
											<td class="mdn <?php if($cols["c_uye_kategori"]==""){echo "dn";}?>">
												<?php
												$cats="";
												foreach($ccats as $xkey=>$xvalue){
													if(($xvalue["ne"]=="kkategori") or ($xvalue["t1"]=="".$_GET["ne"]."")){
														$cats.=($xvalue["id"] == $rs["s2"] || in_array($xvalue["id"], multivalues($rs["s2"]))) ? "<span class=\"badge badge-danger\">".$xvalue["item"]."</span>" : '';
													}
												}
												foreach($users as $xkey=>$xvalue){
													$cats.=($xvalue["id"] == $rs["s2"] || in_array($xvalue["id"], multivalues($rs["s2"]))) ? "<span class=\"badge badge-danger\">".$xvalue["item"]."</span>" : '';
												}
												echo empty(rtrim($cats, ', ')) ? "..." : rtrim($cats, ', ');
												?>
											</td>
											<td class="mdn <?php if($cols["c_uye_konum"]==""){echo "dn";}?>"><?php if($h10<>0){?><?php if($jsl["ilce"]<>""){echo loc($jsl["ilce"],'ilce').", ";} if($jsl["sehir"]<>""){echo loc($jsl["sehir"],'il')."";}  if($jsl["ulke"]<>""){echo " ".loc($jsl["ulke"])."";}?><?php }?></td>
											<td class=" tar <?php if($cols["c_uye_bakiye"]==""){echo "dn";}?>" onclick="window.open('?ne=<?php echo $_GET["ne"];?>&islem=duye&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&sayfa=<?php echo $_GET["sayfa"];?>#tab-cari')" style="cursor:pointer;"><?php if($e8<>0){?><span class="digi fs18 mfs13"><?php echo wprice($bakiye)?></span><?php }?></td>
											<td class="mdn tar <?php if($cols["c_uye_puan"]==""){echo "dn";}?>" style="cursor:pointer;"><?php if($module["point"]=="1"){?><span class="digi fs18 mfs13"><?php echo wcount(getpoint($rs["id"],"","../../../"));?></span><?php }?></td>
											<td class="mdn tac <?php if($cols["c_uye_app"]==""){echo "dn";}?>" style="cursor:pointer;"><i class="fa-brands fa-<?php if($jsa["Device"]=="ios"){echo "apple";}elseif($jsa["Device"]=="android"){echo "android";}?>"></i></td>
											<td class="mdn e <?php if($cols["c_uye_yonetici"]==""){echo "dn";}?>" style="">
											<?php
												$s19s=""; $s19s .= ($rs["s19"] == '0' || in_array('0', multivalues($rs["s19"]))) ? '<span class="badge badge-warning">Admin</span>' : '';
												foreach($users as $key=>$value){
													$s19s .= ($value["id"] == $rs["s19"] || in_array($value["id"], multivalues($rs["s19"]))) ? "<span class='badge badge-info'>".$value["item"]."</span>" : '';
												}
												echo empty(rtrim($s19s, ', ')) ? "..." : rtrim($s19s, ', ');
											?>
											</td>
											<td class=" tar">
												<div class="input-group-btn" id="btns<?php echo $rs["id"];?>" style="text-align:right;">
													<?php
														if(is_dir("../account") or $module["client_panel_url"]<>""){
														if($rs["t2"]<>""){$luser=$rs["t2"];}elseif($rs["t4"]<>""){$luser=v3e($rs["t4"]);}else{$luser=v3e($rs["t14"]);}
														if($module["client_panel_url"]<>""){$upanel=$module["client_panel_url"]."/account";}else{$upanel="".$weburl."/account";}
													?>
														<a class="btn btn-warning mr2 mmr2 mdn" href="<?php echo $upanel;?>/ajax.php?login=<?php echo $luser.",".$rs["t3"];?>" target="_blank" title="Login"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
													<?php }?>
													<?php
														if($g3>0){
														if($rs["t2"]<>""){$luser=$rs["t2"];}elseif($rs["t4"]<>""){$luser=v3e($rs["t4"]);}else{$luser=v3e($rs["t14"]);}
														$upanel=$module["payment_url"]."/account";
													?>
														<a type="button" class="btn btn-warning mr2 mmr2 mdn" href="<?php echo $upanel;?>/ajax.php?login=<?php echo $luser.",".$rs["t3"];?>" target="_blank" title="Ödeme Yap"><i class="far fa-credit-card"></i></a>
													<?php }?>
														<a  class="btn btn-info mr2 mmr2 mfrm" data-toggle="modal" data-width="90%" data-target="#myModal" data-url="modules/clients/client.php?islem=duye&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&sayfa=<?php echo $_GET["sayfa"];?>" title="<?php echo $sdil[199]; //Düzenle?>"><i class="fa fa-pencil"></i></a>
													<?php if ($dauth==0){?>
														<a title="<?php echo $sdil[216]; //Yetkili Değilsiniz ??>" class="btn btn-danger btn-ban-row mdn" href="#"><i class="fa fa-lock" aria-hidden="true"></i></a>
													<?php }else{ ?>
														<a title="<?php echo $sdil[204]; //Kaldir?>" class="btn btn-danger btn-delete-row mdn" data-href="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&grupID=<?php echo $_GET["grupID"];?>&id=<?php echo $rs["id"];?>&durum=suye"><i class="fa fa-times" aria-hidden="true"></i></a>
													<?php } ?>
												</div>
											</td>
										</tr>
										<?php $cpb1=0; $cpb2=0; $cpb3=0; $cpb4=0; $thumbnail="";?>
									<?php }?>
								</tbody>
							</table>
						<div class="tar mt10">
						<span class="fl fs11" id="sub">Toplam : <?php echo $rcount?> Kayıt</span>
							<div class="" id="">
								<select onChange="self.location.href=this.options[this.selectedIndex].value;" class="mb-1 mt-1 mr-1 btn btn-default sna">
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&show=<?php echo $slmt;?>" <?php if($_GET["show"]=="" or $_GET["show"]==$slmt){echo "selected";}?>><?php echo $slmt;?></option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&show=<?php echo ($slmt*2);?>" <?php if($_GET["show"]==($slmt*2)){echo "selected";}?>><?php echo $slmt*2;?></option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&show=<?php echo ($slmt*4);?>" <?php if($_GET["show"]==($slmt*4)){echo "selected";}?>><?php echo $slmt*4;?></option>
									<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&show=<?php echo ($slmt*10);?>" <?php if($_GET["show"]==($slmt*10)){echo "selected";}?>><?php echo $slmt*10;?></option>
								</select>
								<a class="mb-1 mt-1 mr-1 btn btn-default" href="<?php if($_GET["sayfa"]=="" or $_GET["sayfa"]==1){?>#<?php }else{?>?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $ss-1;?><?php }?>" title="<?php echo $sdil[146]; //Önceki?>"><i class="fa fa-chevron-circle-left" aria-hidden="true"></i></a>
								<div class="mb-1 mt-1 mr-1 btn btn-default">
									<select onChange="self.location.href=this.options[this.selectedIndex].value;" class="form-control v3-input-xs sna" style="padding:0px; height: 21px;">
										<?php for ($i = 0; $i <= $rsay; $i++) { $x=$i+1; ?>
											<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $x;?>" <?php if(($_GET["sayfa"]=="" and $x==1) or $_GET["sayfa"]==$x){?>selected<?php }?>><?php echo $x;?></option>
										<?php }?>
									</select>
								</div>
								<a class="mb-1 mt-1 mr-1 btn btn-default" href="<?php if($x >= $ss+1){?>?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_SESSION["key"];?>&order=<?php echo $_GET["order"];?>&grupID=<?php echo $_GET["grupID"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $ss+1;?><?php }else{?>#<?php }?>"  title="<?php echo $sdil[147]; //Sonraki?>"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a>
							</div>
						</div>
						<button id="isle" style="display:none;" type="submit"></button>
						</form>
					</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>
<?php
if($_GET["durum"] == "onay"){
	$sql=mysqli_query($conn, "select * from t5 where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);
//#Onay Maili
	if($m15==2 and $rsu["s4"]<>1 and $_POST["s4"]==1){
		$mesaj	= "
		<h3>".translate("Kullanıcı Aktivasyonu")."</h3>
		<b>".translate("Sayın")." ".translate("Kullanıcı").";</b><br>".translate("uye_monay_ok")."
		";
		$malici		= base64_decode($rsu["t2"]);
		$konu		= translate("Kullanıcı Aktivasyonu");
		$path="../";
		$mesaj	= $design_top.$mesaj.$design_bottom;
		emailgonder($malici,$konu,$cc,$mesaj);
	}
//#Onay Maili
	$Rs = mysqli_query($conn, "update t5 set s4='".$_GET["s4"]."' where id=".$_GET["id"]."");
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&s2=".$_GET["s2"]."",self,0,0);

}elseif($_GET["durum"] == "yuye"){
	$ut1="".trim($sdil[200])." ".trim($nedir)."";
	$sql = $conn->query("insert into t5 (ne, t1, t3, s2, s3, s4, s7, s19, ts1) values ('uye', '".$_POST["t1"]."', '".base64_encode(generatePassword(6))."', '".$_POST["s2"]."', '".$_POST["s3"]."', '0', '0', '".$_SESSION["user_id"]."', now())");
	$sql=mysqli_query($conn, "select * from t5 order by id desc"); $rs=mysqli_fetch_assoc($sql);
	echo location("?ne=".$_GET["ne"]."&islem=duye&id=".$rs["id"]."&s2=".$_GET["s2"]."&durum=ok",self,500,1);

}elseif($_GET["durum"] == "suye"){
	$dsql=mysqli_query($conn, "select * from t5 where id='".$_GET["id"]."'"); $drs=mysqli_fetch_assoc($dsql); $lt1=$drs["t1"];
	$Rs = mysqli_query($conn, "delete from t5 where id=".$_GET["id"]);
	$Rs = mysqli_query($conn, "delete from t4 where s1=".$_GET["id"]);
	$Rs = mysqli_query($conn, "delete from t1 where s1=".$_GET["id"]);
	$Rs = mysqli_query($conn, "delete from genel where s1=".$_GET["id"]." or s19=".$_GET["id"]."");
	$sql=mysqli_query($conn, "select * from medya where t3='".$_GET["ne"]."' and s1=".$_GET["id"].""); while($rsi=mysqli_fetch_assoc($sql)){
		if($_SESSION["V3Server"]==""){
			$dosya1="../deppo/image/".$rsi["t1"].""; unlink($dosya1);
			$dosya2="../deppo/image/k_".$rsi["t1"].""; unlink($dosya2);
			$dosya3="../deppo/video/".$rsi["t7"].".jpg";unlink($dosya3);
			$dosya4="../deppo/dosya/".$rsi["t1"]."";unlink($dosya4);
			$Rs = mysqli_query($conn, "delete from medya where id=".$rsi["id"]);
		}
	}
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&s2=".$_GET["s2"]."&durum=ok",self,500,1);

}elseif($_GET["durum"]=="s4"){
	$Rs = mysqli_query($conn, "update t5 set s4='".$_GET["s4"]."' where id=".$_GET["id"]."");

}elseif($_GET["durum"]=="s7"){
	$Rs = mysqli_query($conn, "update t5 set s7='".$_GET["s7"]."' where id=".$_GET["id"]."");
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&s2=".$_GET["s2"]."&durum=ok",self,0,0);

}elseif($_GET["durum"]=="ms"){
	$marr = uparr($jsm, $_GET["k"], $_GET["v"]);
	$rjsm = json_encode($marr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	$Rs = mysqli_query($conn, "update t5 set n18='".addslashes(stripslashes($rjsm))."' where id=".$_GET["id"]."");
}

if($_GET["durum"] == "mupdate"){
	$KID0 = implode(',',$_POST["KID"]); $KIDS = explode(',',$KID0);
	$T10 = implode(',',$_POST["t1"]); $T1s = explode(',',$T10);
	$y=0;foreach($T1s as $t) {$y++;
		$Rs = mysqli_query($conn, "update t5 set t1='".addslashes(stripslashes($t))."' where id=".$KIDS[$y-1]."");
	}
	$s190 = implode(',',$_POST["s19"]); $s19S = explode(',',$s190);
	$i=0;foreach($s19S as $s19) {$i++;
		//for ($l = 1; $l <= $lx; $l++) {$Rs = mysqli_query($conn, "update t5 set s19='".$s19."' where id=".$KIDS[$i-1]."");}
	}
}elseif($_GET["durum"] == "mdel"){
	if(isset($_POST['SID'])){
		$SID0 = implode(',',$_POST["SID"]); $SIDS = explode(',',$SID0);
		foreach($SIDS as $SID){
			$sql = mysqli_query($conn, "delete from t5 where id=".$SID."");
			$sql=mysqli_query($conn, "select * from medya where t3='".$_GET["ne"]."' and s1=".$SID.""); while($rsi=mysqli_fetch_assoc($sql)){
				$dosya1="../deppo/image/".$rsi["t1"].""; unlink($dosya1);
				$dosya2="../deppo/image/k_".$rsi["t1"].""; unlink($dosya2);
				$dosya3="../deppo/video/".$rsi["t7"].".jpg";unlink($dosya3);
				$dosya4="../deppo/dosya/".$rsi["t1"]."";unlink($dosya4);
				$sql = mysqli_query($conn, "delete from medya where s1=".$SID."");
			}
		}
	}
}
?>