<?php
	header('Content-Type: text/html; charset=utf-8');
	error_reporting(0);
	$path="../../";
	include("../../map.php");
	include("../../scripts.php");
	include("../../secure.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo translate("Abonelikten Çıkanlar");?></title>
</head>
<body>
    <div class="qmodal">
        <div class="qmodal-content">
            <!-- Left Tab Menu -->
            <div class="v8-columns">
                <!-- Content Area -->
                <div class="" ts1="<?php echo dtarih($rs["ts1"],"gg ka yy time");?>" ts2="<?php echo dtarih($rs["ts2"],"gg ka yy time");?>" ts3="<?php echo dtarih($rs["ts3"],"gg ka yy time");?>">
<table class="table table-no-more table-bordered table-striped mb-0">
							<thead>
								<tr>
									<th class="w6" style="text-align:center;">ID</th>
									<th><?php echo $sablon[0] //sablon?></th>
									<th class="w15">Tarih &amp; Saat</th>
									<th class="w6"><?php echo $sdil[213]; //Islemler?></th>
								</tr>
							</thead>
							
							<tbody>
								<form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=yunsubscribe">
									<input type="hidden" value="sablon" name="ne">
									<tr class="addtr">
										<td class="th table-check-cell">-</td>
										<td><input type="text" name="t1" title="" class="form-control" placeholder="<?php echo $sdil[200] //Yeni?>&nbsp;<?php echo $sdil[201] //Ekle?>"></td>
										<td>-</td>
										<td class="table-actions">
											<button class="btn btn-warning" type="submit" <?php if ($e10==1 and $_SESSION["user"]<>"Master"){?>disabled<?php }?>><i class="fa fa-plus" aria-hidden="true"></i><span class="ddn"> <?php echo $sdil[201]; //ekle?></span></button>
										</td>
									</tr>
								</form>
								<?php $sql=mysqli_query($conn, "select * from genel where ne='unsubscribe' order by id desc"); while($rs=mysqli_fetch_assoc($sql)){ ?>
									<tr>
										<td class="th table-check-cell"><?php echo i2a($rs["id"],7);?></td>
										<td><?php echo $rs["t1"];?></td>
										<td><?php echo dtarih($rs["ts1"],"gg-aa-yy + time");?></td>
										<td class="table-actions">
											<button type="button" title="<?php echo $sdil[204]; //Kaldir?>" class="btn btn-danger" onclick="location.href='?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"];?>&durum=sunsubscribe'; return confirm('#<?php echo $sdil[215]; //Bu Kayit Silinecektir ! Onayliyor musunuz ??>')"><i class="fa fa-times"></i><span class="ddn"> <?php echo $sdil[204]; //Kaldir?></span></button>
										</td>
									</tr>
								<?php }?>
							</tbody>
							
						</table>
                 </div>
            </div>
</body>
<?php echo $footer?>
<?php
if($_GET["durum"] == "yunsubscribe"){
	$sql = $conn->query("insert into genel (ne,t1,ts1) values ('unsubscribe', '".$_POST["t1"]."', now())");
	$sql=mysqli_query($conn, "select * from genel where ne='sablon' order by id desc"); $rs=mysqli_fetch_assoc($sql);
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok",self,500,1);
}elseif($_GET["durum"] == "sunsubscribe"){
	$aql = mysqli_query($conn, "delete from genel where ne='unsubscribe' and id=".$_GET["id"]."");
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok",self,500,1);
}
?>
</html>