<div class="inner-wrapper">
    <?php
    if($d9==1){ $stip="multiple"; } $skat="id"; $ckat="Cat_ID";
    if($cols["c_kategori"]<>""){
		$scats = json_decode(GetArr("s","categories"), true);
		$hcats = json_decode(GetArr("h","categories"), true);
		$mcats = json_decode(GetArr("m","categories"), true);
		//$ccats = json_decode(GetArr("k","categories"), true);
		$ucats = json_decode(GetArr("u","categories"), true);
		$xcats = json_decode(GetArr("x","xmodules"), true);
        $sitems = json_decode(GetArr("sayfa","","s5=1"), true);
        $mitems = json_decode(GetArr("msayfa","","s5=1"), true);
        $uitems = json_decode(GetArr("kayit"), true);
    }
    if($cols["c_yonetici"]<>""){
		$users = json_decode(GetArr("","users","s9=1"), 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(!empty($_POST["s5"])){$s5=$_POST["s5"];}else{$s5="";}
    $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($_SESSION["key"])){
        $sorgu="and (id LIKE '%".$_SESSION["key"]."%' or t1 LIKE '%".$_SESSION["key"]."%' or t4 LIKE '%".$_SESSION["key"]."%' or n2 LIKE '%".$_SESSION["key"]."%' or n4 LIKE '%".$_SESSION["key"]."%')"; 
        $order="order by s1 asc,id desc";
    }elseif(!empty($_POST["key"])){
        $sorgu="and (id LIKE '%".$_POST["key"]."%' or t1 LIKE '%".$_POST["key"]."%' or t4 LIKE '%".$_POST["key"]."%' or n2 LIKE '%".$_POST["key"]."%' or n4 LIKE '%".$_POST["key"]."%')";   
        $order="order by s1 asc,id desc";
	}elseif($_GET['grupID']<>""){
		$sorgu="and (s2='".$_GET['grupID']."' or s3='".$_GET['grupID']."')";
        $order="order by s1 asc,id desc";
    }else if($_GET["order"]<>""){
        $order="order by ".qa($_GET["order"])."";
    }else{
		if($cols["c_".$_GET["ne"]."_order"]<>""){
			$order=$cols["c_".$_GET["ne"]."_order"];
		}else{
			$order="order by s1 asc,id desc";
		}
    }
    if($_GET["ne"]=="sayfa"){$lyetki=$lsayfa;}elseif($_GET["ne"]=="haber"){$lyetki=$lhaber;}

	function addBadge(&$cats, &$addedBadges, $id, $item, $class) {
		if (!in_array($id, $addedBadges)) {
			$cats .= "<span class=\"badge $class\">$item</span> ";
			$addedBadges[] = $id;
		}
	}
	
	if ($_SESSION["ProjeID"] != "") { $sorgu .= "AND n17 LIKE '%\"iclient_project\":[".$_SESSION["ProjeID"]."]%'";}
    $sql = mysqli_query($conn, "select SQL_CALC_FOUND_ROWS id,t1,t4,s1,s2,s5,s6,s12,s13,s16,s19,s20,n1,n2,n3,n5,n16,n17,n18,ts1,ts3 from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' ".$sorgu." ".$lyetki." ".$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 $nedirs;?></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 ctranslate($nedirs);?></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="row">
            <div class="col">
                <section class="card">
                    <header class="card-header v3-bg-info">
                        <div class="card-actions" id="v-<?php echo $_GET['islem'];?>">
                            <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" id="data-prev" 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" 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"];?>&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" id="data-next" 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>
                            <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=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&durum=ysayfa&s5=<?php echo $_GET["s5"];?>" data-title="<?php echo ctranslate("".$t21s[0]." Ekle")?>" data-ref="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>"><i class="fa fa-plus " aria-hidden="true"></i> <?php echo ctranslate("".$nedir." 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 ctranslate($nedirs);?></h2>
                    </header>
                    <div class="card-body w1600" style="">
                        <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="<?php echo $_GET["ne"]?>">
                                    <th style="text-align:center;" class="w2 mw2" id="th1">
                                        <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="w5 mw5" style="text-align:center;" id="th2">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=ID+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=ID+desc" class="fa fa-sort-desc"></a>
                                        </div>
                                    </th>
                                    <th id="th3"> <span class="column-sort"> <a href="#" title="Sort up" class="sort-up"></a> <a href="#" title="Sort down" class="sort-down"></a> </span> <?php echo ctranslate("Başlık")?> 
                                    <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="w7 mw7 <?php if($cols["c_islem"]==""){echo "dn";}?>" id="th4"><?php echo ctranslate("Durum")?></th>
                                <th class="w13 mw13 <?php if($cols["c_medya"]==""){echo "dn";}?>" id="th5"><?php echo ctranslate("Medya")?></th>
                                <?php
                                foreach($inputs as $key=>$value){
                                    if($value["n4"]<>"switch" and $cols["c_input_".$value["id"].""]<>""){
                                        ?>
                                        <th class="w5 mw5">
                                            <?php echo cevir1($value["n1"])?>
                                        </th>
                                    <?php }}?>
                                    <?php if($_GET["ne"]=="sayfa" and $d10<>"0" or $_GET["ne"]=="haber" and $b1<>"0" or $_GET["ne"]=="msayfa" and $g7<>"0" or (($_GET["ne"]<>"sayfa" or $_GET["ne"]<>"haber" or $_GET["ne"]<>"msayfa") and $d10<>"0")){?>
                                        <th class="w12 <?php if($cols["c_kategori"]==""){echo "dn";}?>" id="th6"> <span class="column-sort"> <a href="#" title="Sort up" class="sort-up"></a> <a href="#" title="Sort down" class="sort-down"></a> </span>
                                            <?php echo ctranslate("Grup")?>
                                        </th>
                                    <?php }?>
                                    <th class="w8 mw8 e <?php if($cols["c_yonetici"]==""){echo "dn";}?>" style="" id="th7">
                                        <?php echo ctranslate("Yönetici(ler)")?>
                                    </th>
                                    <th class="w5 mw5 <?php if($cols["c_sira"]==""){echo "dn";}?>" style="text-align:center;" id="th8"> <span class="column-sort"> <a href="#" title="Sort up" class="sort-up"></a> <a href="#" title="Sort down" class="sort-down"></a> </span> <?php echo ctranslate("Sıra")?> </th>
                                    <th class="w5 mw5" style="text-align:center;" id="th9"><?php echo ctranslate("İşlemler")?></th>
                                </tr>
                            </thead>
                            <form method="post" id="lform">
                                <tbody>
                                    <?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);
                                        $spuan = 0; $scolor = ""; $tpuan = ""; // Seo Puan
										$fields = [ "t1" => ["puan" => 20, "label" => "Title,"], "n2" => ["puan" => 30, "label" => "Desc,"], "n1" => ["puan" => 28, "label" => "Detail,"], "n3" => ["puan" => 20, "label" => "Xtitle,"] ];
										foreach ($fields as $key => $data) {
											if (!empty($rs[$key])){
												$spuan += $data["puan"];
												$tpuan .= $data["label"];
											}
										}
                                        if ($rs["s6"]==1 or $authority==0){ $dauth=0; }else{ $dauth=1; }
										$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_";}
										$publishdate = publish_date_viewer($rs["ts1"],$rs["ts3"]);
									?>
                                        <tr data-id="<?php echo $rs["id"];?>" class="tr<?php echo $rs["id"];?> img-fluid appear-animation animated fadeIn appear-animation-visible" data-appear-animation="fadeIn" data-appear-animation-delay="0" data-appear-animation-duration="1s">
                                            <td style="text-align:center;" class="mw2">
												<div class="cflip" onclick="jQuery(this).toggleClass('active');">
													<div class="shadow flip_card">
														<div class="front ff<?php echo $rs["id"]?>" data-id="<?php echo $rs["id"]?>">
															<img src="<?php if($thumbnail<>""){echo "../deppo/image/".$k.$thumbnail;}else{echo $favicon;}?>" class="" style="">
														</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-target="#myModal"  data-width="90%" data-url="modules/pages/page.php?islem=dsayfa&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>" data-title="<?php echo "#".$rs["id"].""?>" style="<?php if($rs["s13"]==2){echo "text-decoration:line-through;";}?>">
												<?php echo i2a($rs["id"],7);?>
												<p style="margin: 0px; padding: 0px 5px; width: fit-content; font-size: 9px; border-left: 5px solid #69787a;" class="<?php echo $publishdate['class'] ?>"><?php echo $publishdate['formattedDate'] ?></p>
											</th>
                                            <td>
												<div style="position:relative;">
													<input type="text" class="form-control" name="t1[]" value="<?php echo para($rs["t1"])?>" style="color:<?php if($rs["s5"]=="1"){?>#ff3300;<?php }elseif($rs["s13"]==0){?>#cacaca; <?php }else{?>#3399cc;<?php }?> width: 100%; background: transparent; border: 0px" />
													<div style="position: absolute; top: -12px; right:5px;" class="mdn msa">
														<?php if($jsi["idesign"] <> ""){ ?> <i class="fas fa-paint-brush badge-success p3 fs10" style="border-radius: 3px;" title="Özel Tasarım (<?php echo $jsi["idesign"]?>)"></i> <?php }?>
														<?php if($rs["s16"] > 0){ ?> <i class="fa fa-wpforms badge-info p3 fs10" style="border-radius: 3px;" title="Form"></i> <?php } ?>
													</div>
												</div>
                                                <span class="fa fa-<?php echo empty($rs["n5"]) ? 'pencil' : 'external-link'; ?> clnspan" title="<?php echo $rs["n5"] ?>"></span>
                                                <div class="mdn" style="width:<?php echo $spuan;?>%; height:2px; background: linear-gradient(to right, #fff, #95b75d); float:left;"></div>
                                            </td>
                                            <td style="" class="mdn <?php if($cols["c_islem"]==""){echo "dn";}?>">
                                                <div style="margin-top: 10px;">
                                                    <div class="checkbox-custom checkbox-<?php if($rs["s13"]==1){echo "success";}else{echo "info";}?>" 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["s13"]==1){echo "checked";}?> onclick="AjaxGet('?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&s13=<?php echo $rs["s13"] == 1 ? 0 : 1;?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>','?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&sayfa=<?php echo $_GET["sayfa"];?>')">
                                                        <label for="a<?php echo $rs["id"]?>"></label>
                                                    </div>
                                                    <div class="checkbox-custom checkbox-<?php if($rs["s5"]==1){echo "success";}else{echo "info";}?>" alt="<?php echo $sdil[219]; //Ana Menü?>" title="<?php echo $sdil[219]; //Ana Menü?>" style="float:left;<?php if($_GET["ne"]=="haber"){echo "display:none;";}?>">
                                                        <input type="checkbox" id="m<?php echo $rs["id"]?>" <?php if($rs["s5"]==1){?>checked<?php }?> onclick="AjaxGet('?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&s5=<?php echo $rs["s5"] == 1 ? 0 : 1;?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>','?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&sayfa=<?php echo $_GET["sayfa"];?>')">
                                                        <label for="m<?php echo $rs["id"]?>"></label>
                                                    </div>
                                                    <?php if($MSA==1){?>
                                                        <div class="checkbox-custom checkbox-<?php if($rs["s6"]==1){echo "success";}else{echo "danger";}?>" alt="<?php echo ctranslate("Silinemez!")?>" title="<?php echo ctranslate("Silinemez!")?>" style="float:left;">
                                                            <input type="checkbox" id="v<?php echo $rs["id"]?>" <?php if($rs["s6"]==1){?>checked<?php }?> onclick="AjaxGet('?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&s6=<?php echo $rs["s6"] == 1 ? 0 : 1;?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>','?islem=<?php echo $_GET["islem"];?>&ne=<?php echo $_GET["ne"];?>&sayfa=<?php echo $_GET["sayfa"];?>')">
                                                            <label for="v<?php echo $rs["id"]?>"></label>
                                                        </div>
                                                    <?php }?>
                                                    <?php if($rs["t4"]<>""){?>
                                                        <div class="checkbox-custom" alt="<?php echo ctranslate("Etkinlik")?>" title="<?php echo ctranslate("Etkinlik!")?>" style="float:left; margin-top: -10px; margin-left: -18px;">
                                                            <i class="fa fa-calendar text-info" title="<?php echo dtarih($rs["t4"],"gg ka yy")?> <?php echo $rs["t2"]?>" style="font-size: 19px;"></i>
                                                        </div>
                                                    <?php }?>
                                                </div>
                                            </td>
                                            
                                            <?php if($cols["c_medya"]<>""){?>                           
                                                <td class="mdn">
                                                    <?php if($d1==1){?>
                                                        <span class="badge badge-success" alt="<?php echo $i;?> <?php echo $sdil[209]; //Resim?>" title="<?php echo $i;?> <?php echo $sdil[209]; //Resim?>" style="margin-left:1px; cursor:pointer;">
                                                            <a class="mfrm ufile" data-toggle="modal" data-target="#myModal" data-width="50%" data-url="modules/upload/upload_image.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"]; ?>">
                                                                <i id="d0<?php echo $rs["id"]?>"><?php echo $i;?></i>
                                                            </a>
                                                        </span>
                                                    <?php }?>
                                                    <?php if($d2<>0){?>
                                                        <span class="badge badge-success" alt="<?php echo $v;?> <?php echo $sdil[210]; //Video?>" title="<?php echo $v;?> <?php echo $sdil[210]; //Video?>" style="margin-right:1px; cursor:pointer;">
                                                            <a class="mfrm ufile" data-toggle="modal" data-target="#myModal" data-width="50%" data-url="modules/upload/video_add.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"]; ?>">
                                                                <i id="i0<?php echo $rs["id"]?>"><?php echo $v;?></i>
                                                            </a>
                                                        </span>
                                                    <?php }?>
                                                    <?php if($d3==1){?>
                                                        <span class="badge badge-success" alt="<?php echo $f;?> <?php echo $sdil[211]; //Dosya?>" title="<?php echo $f;?> <?php echo $sdil[211]; //Dosya?>" style="margin-right:1px; cursor:pointer;">
                                                            <a class="mfrm ufile" data-toggle="modal" data-target="#myModal" data-width="50%" data-url="modules/upload/upload_file.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"]; ?>">
                                                                <i id="d0<?php echo $rs["id"]?>"><?php echo $f;?></i>
                                                            </a>
                                                        </span>
                                                    <?php }?>
                                                    <span class="badge badge-warning" alt="Hit" title="Hit <?php echo $rs["s20"];?>" style="margin-left:1px; cursor:pointer;"><?php echo nice_number($rs["s20"]);?></span>
                                                    <?php if(($_GET["ne"]=="sayfa" and ($d6=="1" or $d6=="4" or $d6=="5")) or ($_GET["ne"]=="haber" and ($d6=="3" or $d6=="5")) or ($_GET["ne"]=="msayfa" and ($d6=="2" or $d6=="4" or $d6=="5"))){?>
                                                        <?php $rsx = mysqli_query($conn, "select id FROM t1 where ne='extra' and s1=".$rs['id']."");$srsx=mysqli_num_rows($rsx);?>
                                                        <span class="badge badge-warning" alt="<?php echo $sdil[126]?>" title="<?php echo $sdil[126]?>" style="margin-right:1px; cursor:pointer;"><?php echo $srsx;?></span>
                                                    <?php }?>
                                                    <?php if($rs["s17"]=="1"){?>
                                                        <span class="badge badge-warning" alt="Goggle Maps" title="Google Maps" style="margin-right:1px; cursor:pointer;"><i class="fa fa-map-marker"></i></span>
                                                    <?php }?>
                                                    <?php if($rs["s16"]=="1"){?>
                                                        <span class="badge badge-warning" alt="Form Ekli" title="Form Ekli" style="margin-right:1px; cursor:pointer;"><i class="fa fa-list-alt"></i></span>
                                                    <?php }?>
                                                    <?php if(($_GET["ne"]=="sayfa" and ($g1=="1" or $g1=="4" or $g1=="5")) or ($_GET["ne"]=="haber" and ($g1=="3" or $g1=="5")) or ($_GET["ne"]=="msayfa" and ($g1=="2" or $g1=="4" or $g1=="5"))){?>
                                                        <?php $sqlsp = mysqli_query($conn, "select id FROM t1 where ne='isayfa' and t2='".$_SESSION['lang']."' and s1=".$rs["id"]."");$rssp=mysqli_num_rows($sqlsp);?>
                                                        <span class="badge badge-warning" alt="" title="<?php echo $sqlsp;?> <?php echo $sdil[135]; //Alt Sayfa?>" style="margin-right:1px; cursor:pointer;"><?php echo $rssp;?></span>
                                                    <?php }?>
                                                </td>
                                            <?php }?>
                                            <?php
                                            $a=0;foreach($inputs as $key=>$value){$a++;
												if($value["t3"]<>""){$ival=$value["t3"];}else{$ival = "i".$a."";}
                                                if($value["n4"]<>"switch" and $cols["c_input_".$value["id"].""]<>""){
                                                    ?>
                                                    <td>
                                                        <?php if(is_array($jsi[$ival])){?>
                                                            <?php foreach($jsi[$ival] as $k=>$v){$val = "".$val.", ".$v."";}?>
                                                            <?php echo ltrim($val,",");?>
                                                        <?php }else{?>
                                                            <?php echo $jsi[$ival];?>
                                                        <?php }?>
                                                    </td>
                                                <?php }}$val=""; $ival="";?>
                                                <?php if($_GET["ne"]=="sayfa" and $d10<>"0" or $_GET["ne"]=="haber" and $b1<>"0" or $_GET["ne"]=="msayfa" and $g7<>"0" or (($_GET["ne"]<>"sayfa" or $_GET["ne"]<>"haber" or $_GET["ne"]<>"msayfa") and $d10<>"0")){?>
                                                    <td class="mdn <?php if($cols["c_kategori"]==""){echo "dn";}?>">
													<?php
														$cats = "";
														$addedBadges = []; // tüm döngüler için kullanılacak

														if ($d10 <> 0) {
															foreach ($scats as $xvalue) {
																$jscx = json_decode($xvalue["n1"], true);
																if (($xvalue["ne"] == "skategori" || $xvalue["ne"] == $_GET["ne"][0]."kategori") || ($xvalue["t1"] == $_GET["ne"])) {
																	if ($xvalue["id"] == $rs["s2"] || in_array($xvalue["id"], multivalues($rs["s2"]))) {
																		addBadge($cats, $addedBadges, $xvalue["id"], $xvalue["item"], "badge-success");
																	}
																}
															}

															foreach ($sitems as $avalue) {
																if (($avalue["ne"] == "sayfa" || $avalue["ne"] == $_GET["ne"]) && $avalue["s5"] == "1") {
																	if ($avalue["id"] == $rs["s2"] || in_array($avalue["id"], multivalues($rs["s2"]))) {
																		addBadge($cats, $addedBadges, $avalue["id"], $avalue["item"], "badge-warning");
																	}
																}
															}
														}

														if ($b1 <> 0) {
															foreach ($hcats as $xvalue) {
																if ($xvalue["ne"] == "hkategori" || $xvalue["t1"] == "haber") {
																	if ($xvalue["id"] == $rs["s2"] || in_array($xvalue["id"], multivalues($rs["s2"]))) {
																		addBadge($cats, $addedBadges, $xvalue["id"], $xvalue["item"], "badge-success");
																	}
																}
															}
														}

														if ($g7 <> 0) {
															foreach ($mcats as $xvalue) {
																$jscx = json_decode($xvalue["n1"], true);
																if ($xvalue["ne"] == "mkategori" || $xvalue["t1"] == "msayfa") {
																	if ($xvalue["id"] == $rs["s2"] || in_array($xvalue["id"], multivalues($rs["s2"]))) {
																		addBadge($cats, $addedBadges, $xvalue["id"], $xvalue["item"], "badge-success");
																	}
																}
															}
														}

														if (!empty($xcats)) {
															foreach ($xcats as $xvalue) {
																$id = $xvalue["id"];
																if ($id == $rs["s2"] || in_array($id, multivalues($rs["s2"]))) {
																	addBadge($cats, $addedBadges, $id, $xvalue["item"], "badge-success");
																}
															}
														}

														if ($a4 <> 0) {
															foreach ($ucats as $xvalue) {
																if ($xvalue["ne"] == "ukategori" || ($xvalue["t1"] == "kayit" && $xvalue["s1"] == 0)) {
																	if ($xvalue["id"] == $rs["s2"] || in_array($xvalue["id"], multivalues($rs["s2"]))) {
																		addBadge($cats, $addedBadges, $xvalue["id"], $xvalue["item"], "badge-success");
																	}
																	foreach ($ucats as $yvalue) {
																		if (($yvalue["ne"] == "ualt_kategori" && $yvalue["c1"] == $xvalue["id"]) || (($yvalue["t1"] == "kayit" && $yvalue["s1"] == $xvalue["id"]) && $yvalue["s2"] == 0)) {
																			if ($yvalue["id"] == $rs["s2"] || in_array($yvalue["id"], multivalues($rs["s2"]))) {
																				addBadge($cats, $addedBadges, $yvalue["id"], $yvalue["item"], "badge-warning");
																			}
																			foreach ($ucats as $zvalue) {
																				if (($zvalue["ne"] == "ualt2_kategori" && $zvalue["c2"] == $yvalue["id"]) || ($zvalue["t1"] == "kayit" && $zvalue["s2"] == $yvalue["id"] && $zvalue["s3"] == 0)) {
																					if ($zvalue["id"] == $rs["s2"] || in_array($zvalue["id"], multivalues($rs["s2"]))) {
																						addBadge($cats, $addedBadges, $zvalue["id"], $zvalue["item"], "badge-danger");
																					}
																				}
																			}
																		}
																	}
																}
															}
														}

														echo empty(trim($cats)) ? "..." : $cats;
														?>

                                                    </td>
                                                    <?php }?>
                                                    <td class="mdn e <?php if($cols["c_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="mdn tar <?php if($cols["c_sira"]==""){echo "dn";}?>"><input type="text" name="s1[]" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" value="<?php echo $rs["s1"];?>" class="form-control" style="background: transparent; border: 0px"><span class="fa fa-pencil clnspan"></span></td>
                                                    <td class="mw10 tar">
                                                        <div class="input-group-btn" id="btns<?php echo $rs["id"];?>">
                                                            <a class="btn btn-info mr2 mfrm" data-toggle="modal" data-target="#myModal"  data-width="90%" data-url="modules/pages/page.php?islem=dsayfa&ne=<?php echo $_GET["ne"];?>&id=<?php echo $rs["id"];?>&grupID=<?php echo $_GET["grupID"];?>&key=<?php echo $_SESSION["key"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>" data-title="<?php echo "#".$rs["id"].""?>" title="<?php echo $sdil[199]; //Düzenle?>"><i class="fa fa-pencil"></i></a>
                                                            <?php if ($dauth==0){?>
                                                                <a title="<?php echo ctranslate("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"];?>&show=<?php echo $_GET["show"];?>&sayfa=<?php echo $_GET["sayfa"];?>&key=<?php echo $_SESSION["key"];?>&id=<?php echo $rs["id"];?>&durum=ssayfa"><i class="fa fa-times" aria-hidden="true"></i></a>
                                                            <?php } ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                            <?php $publishdate=""; }?>
                                        </tbody>
                                        <button id="isle" style="display:none;" type="submit"></button>
                                    </form>
                                </table>
                                <div class="tar mt10">
                                    <span class="fl fs11">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'];?>&cat=<?php echo $_GET["cat"];?>&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"];?>&cat=<?php echo $_GET["cat"];?>&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"];?>&cat=<?php echo $_GET["cat"];?>&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>
                            </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"]=="sira"){
        for ($l = 1; $l <= $lx; $l++) {$Rs = mysqli_query($conn, "update lang".$l." set s1='".$_POST["s1"]."' where id=".$_GET["id"]."");}
            echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_SESSION["key"]."&sayfa=".$_GET["sayfa"]."&durum=ok",self,0,0);

    }elseif($_GET["s5"]<>"" or $_GET["s6"]<>"" or $_GET["s7"]<>"" or $_GET["s13"]<>""){
        if($_GET["s5"]<>""){for ($l = 1; $l <= $lx; $l++) {$Rs = mysqli_query($conn, "update lang".$l." set s5='".$_GET["s5"]."' where id=".$_GET["id"]."");}}
        if($_GET["s6"]<>""){for ($l = 1; $l <= $lx; $l++) {$Rs = mysqli_query($conn, "update lang".$l." set s6='".$_GET["s6"]."' where id=".$_GET["id"]."");}}
        if($_GET["s7"]<>""){for ($l = 1; $l <= $lx; $l++) {$Rs = mysqli_query($conn, "update lang".$l." set s7='".$_GET["s7"]."' where id=".$_GET["id"]."");}}
        if($_GET["s13"]<>""){for ($l = 1; $l <= $lx; $l++) {$Rs = mysqli_query($conn, "update lang".$l." set s13='".$_GET["s13"]."' where id=".$_GET["id"]."");}}
    //echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&sayfa=".$_GET["sayfa"]."&key=".$_SESSION["key"]."&durum=ok",self,0,0);

    }elseif($_GET["durum"] == "ysayfa" or $_GET["durum"] == "dsayfa"){
        for ($l = 1; $l <= $lx; $l++) {
            if($_POST["t1"]==""){ $st1="".trim($sdil[200])." ".trim($nedir).""; $sislem="dsayfa";}elseif($_GET["durum"] == "dsayfa"){$st1=$_POST["t1"]; $sislem="dsayfa";}else{ $st1=$_POST["t1"]; $sislem="dsayfa";}
            if($_POST["s1"]==""){ $ss1="0"; }else{ $ss1=$_POST["s1"]; }
            if(!empty($_POST["s2"])){$ss2 = implode(',',$_POST["s2"]);}else{$ss2="0";}
            if($_POST["s3"]==""){ $ss3="0"; }else{ $ss3=$_POST["s3"]; }
            if($_POST["s5"]==""){ $ss5="0"; }else{ $ss5=$_POST["s5"]; }
            if($_POST["s7"]==""){ $ss7="0"; }else{ $ss7=$_POST["s7"]; }
            
            if($_GET["ne"]=="haber" or $_GET["ne"]=="msayfa"){
                if($_POST["s13"]==""){ $ss13="0"; }else{ $ss13=$_POST["s13"]; }
                $ss8="0";
            }else{
                if($_POST["s13"]==""){ $ss13="1"; }else{ $ss13=$_POST["s13"]; }
                $ss8="0";
            }
            $sql = $conn->query("insert into lang".$l." (ne, t1, n1, s1, s2, s3, s5, s7, s8, s13, s19, ts1) values ('".$_GET["ne"]."', '".addslashes(stripslashes($st1))."', '', '".$ss1."', ".$ss2.", ".$ss3.", '".$ss5."', '".$ss7."', '".$ss8."', '".$ss13."', '".$_SESSION["user_id"]."', now())");
        }
        $sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' order by id desc"); $rs=mysqli_fetch_assoc($sql);
        echo location("?ne=".$_GET["ne"]."&islem=".$sislem."&id=".$rs["id"]."&key=".$_SESSION["key"]."&sayfa=".$_GET["sayfa"]."&durum=ok",self,500,1);

    }elseif($_GET["durum"] == "s".$_GET["ne"].""){
        $dsql=mysqli_query($conn, "select * from ".$_SESSION["lang"]." where id='".$_GET["id"]."'"); $drs=mysqli_fetch_assoc($dsql); $lt1=$drs["t1"];
        if($module["del"]==0){
            for ($l = 1; $l <= $lx; $l++) {$sql = mysqli_query($conn, "delete from lang".$l." where id=".$_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"]);
                        $sql = mysqli_query($conn, "delete from t1 where (ne='extra' or ne='isayfa') and s1='".$_GET["id"]."'");
                    }
                }
            }else{
                for ($l = 1; $l <= $lx; $l++){ $Rs = mysqli_query($conn, "update ".$_SESSION["lang"]." set s13='2' where id='".$_GET["id"]."'"); }
            }
        echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_SESSION["key"]."&sayfa=".$_GET["sayfa"]."&id=".$_GET["id"]."&durum=ok",self,500,1);

    }elseif($_GET["durum"] == "mupdate"){
        $KID0 = implode(',',$_POST["KID"]); $KIDS = explode(',',$KID0);
        $S10 = implode(',',$_POST["s1"]); $S1s = explode(',',$S10);
        $x=0;foreach($S1s as $S) {$x++;
            $Rs = mysqli_query($conn, "update ".$_SESSION["lang"]." set s1='".$S."' where id=".$KIDS[$x-1]."");
        }
        $T10 = implode(',',virgul($_POST["t1"],"boz")); $T1s = explode(',',$T10);
        $y=0;foreach($T1s as $T) {$y++;
            $Rs = mysqli_query($conn, "update ".$_SESSION["lang"]." set t1='".addslashes(stripslashes(virgul($T,"duz")))."' where id=".$KIDS[$y-1]." and s8=0");
        }

    }elseif($_GET["durum"] == "mdel"){
        if(isset($_POST['SID'])){
            $SID0 = implode(',',$_POST["SID"]); $SIDS = explode(',',$SID0);
            foreach($SIDS as $SID){
                if($module["del"]==0){
                    for ($l = 1; $l <= $lx; $l++) {$sql = mysqli_query($conn, "delete from lang".$l." where id=".$SID."");}
					$sql=mysqli_query($conn, "select * from medya where t3='".$_GET["ne"]."' and s1=".$SID.""); 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);
							$sql = mysqli_query($conn, "delete from medya where id=".$rsi["id"]."");
						}
					}
				}else{
					for ($l = 1; $l <= $lx; $l++){ $Rs = mysqli_query($conn, "update lang".$l." set t13='del' where id='".$SID."'"); }
				}
            }
        }
    }
?>