<div class="v3-col-md-12 medias">
	<script type="text/javascript">
		var $m = jQuery.noConflict();
		$m(function() {
			$m(".mfrm").click(function () {
				var theModal = $m(this).data("target"),
				frmSRC = $m(this).attr("data-url");
				$m(theModal + ' iframe').attr('src', frmSRC);
				$m(theModal + ' button.close').click(function () {
					$m(theModal + ' iframe').attr('src', 'about:blank');
				});
			});
		});
	</script>
	<?php
	$path="../../";
	include("../../map.php");
	if(!empty($_GET["id"])){
		$sql=mysqli_query($conn, "select * from medya where ne='".$_GET['nedir']."' and t3='".$_GET['ne']."' and s1='".$_GET['id']."' order by s3 asc,id desc");
	}else{
		$sql=mysqli_query($conn, "select * from medya where ne='".$_GET['nedir']."' order by s3 asc,id desc");
	}
	while($rsm=mysqli_fetch_assoc($sql)){
		if($_GET["nedir"]=="resim"){
			$medya="../deppo/image/k_".$rsm["t1"]."";
			$link="../deppo/image/".$rsm["t1"]."";
		}elseif($_GET["nedir"]=="video"){
			if(substr($rsm["n2"],0,4)=="http"){
				$medya=$rsm["n2"];
			}else{
				$medya="../deppo/video/".$rsm["n2"]."";
			}
			$link="fonksiyon.php?islem=izle&id=".$rsm["id"]."";
		}elseif($_GET["nedir"]=="dosya"){
			if($rsm["t5"]==""){
				$medya="assets/img/icons/".$rsm["t4"]."_b.png";
			}else{
				$medya="../deppo/dosya/".$rsm["t5"]."";
			}
			$link="../deppo/dosya/".$rsm["t1"]."";
		}
		$uzanti = explode('.',$rsm["t1"]);
		?>
		<div data-id="<?php echo $rsm["id"];?>" class="v3-col-md-12 mdiv m<?php echo $rsm["ne"];?> img-fluid appear-animation animated fadeIn appear-animation-visible" data-appear-animation="fadeIn" data-appear-animation-delay="0" data-appear-animation-duration="1s" id="<?php echo $rsm["id"]; ?>" style="padding:1px 1px 1px 3px !important">
				<a href="<?php echo $link; ?>" data-fancybox="gallery">
					<i class="fa fa-<?php if($rsm["s19"]==$_SESSION["user_id"]){echo "upload";}else{echo "download";}?>" aria-hidden="true"></i> <?php if($_GET["filename"]<>""){echo $_GET["filename"];}elseif($rsm["t2"]<>""){echo $rsm["t2"];}else{echo $rsm["t1"];}?>
				</a>
				<div style="position:absolute; right: 0px; margin-top: -24px;">
					<a style="cursor:pointer;" class="v3-btn v3-btn-xs btn-danger btn-delete-div" data-href="<?php echo $_GET["path"]; ?>modules/ajax/ajax_files.php?nedir=<?php echo $_GET["nedir"]; ?>&ne=<?php echo $_GET["ne"]; ?>&islem=<?php echo $_GET["islem"]; ?>&durum=msil&id=<?php echo $_GET["id"]; ?>&mid=<?php echo $rsm["id"]; ?>" title="Kayıt Sil"><i class="fa fa-times" aria-hidden="true"></i></a>
				</div>
			</div>
		<?php } ?>
		<div>
			<?php
			if($_GET["durum"] == "msil"){
				$sql=mysqli_query($conn, "select * from medya where ne='".$_GET['nedir']."' and id=".$_GET["mid"].""); $rs=mysqli_fetch_assoc($sql);
				
				if($_GET["nedir"]=="resim"){
					$dosya1="../deppo/image/".$rs["t1"]."";unlink($dosya1);
					$dosya2="../deppo/image/k_".$rs["t1"]."";unlink($dosya2);
				}elseif($_GET["nedir"]=="video"){
					$video1="../deppo/video/".$rsv["t7"].".jpg";unlink($video1);
				}elseif($_GET["nedir"]=="dosya"){
					$dosya1="../deppo/dosya/".$rs["t1"]."";unlink($dosya1);
				}
				$Rs = mysqli_query($conn, "delete from medya where id=".$_GET["mid"]);
			}
			?>