<div class="inner-wrapper">
	<?php
	if(!empty($_POST["s5"])){$s5=$_POST["s5"];}else{$s5="";}
	$slmt=20;
	$sayfa = $_GET['sayfa'];
	if($_GET['sayfa'] == "") {$sayfa = 0; $ss = 1;}else{$sayfa = ($sayfa-1) * $slmt; $ss = $_GET['sayfa'];}
	if($_GET["key"]<>""){
		$sorgu="and (id LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%' or t2 LIKE '%".$_GET["key"]."%')"; 
		$order="order by id desc";
	}elseif($_GET["uID"]<>""){
		$sorgu="and s3='".$_GET["uID"]."'";
		$order="order by id desc";
	}elseif($_GET["fID"]<>""){
		$sorgu="and s1='".$_GET["fID"]."'";
		$order="order by id desc";
	}elseif($_GET["s4"]<>""){
		$sorgu="and s4='".$_GET["s4"]."'";
		$order="order by id desc";
	}else if($_GET["order"]<>""){
		$order="order by ".qa($_GET["order"])."";
	}else{
		$order="order by id desc";
	}
	if($_GET["t1"]<>""){
		$sorgu .="and t1='".$_GET["t1"]."'";
	}
	if($_GET["islem"]=="request"){
		$nedir=telefon($module["requests"]);
	}else{
		$nedir=translate("Form Mesajlar");
	}
	$sql = mysqli_query($conn, "select * from t2 where ne='".$_GET["islem"]."' $sorgu $luye $order limit $sayfa,$slmt");
	$sqls = mysqli_query($conn, "select * FROM t2 where ne='".$_GET["islem"]."' $sorgu $luye"); $rcount = mysqli_num_rows($sqls)
?>
<section role="main" class="content-body">
	<header class="page-header">
		<h2><?php echo $nedir;?></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 $nedir;?></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");?>
						<div class="mb-1 mt-1 mr-1 btn btn-warning" onclick="location.href='?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>'" title="<?php echo translate("#Tümü")?>">
							<i class="fa fa fa-home" aria-hidden="true"></i>
						</div>
						<select size="1"  style="" onChange="self.location.href=this.options[this.selectedIndex].value;">
							<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>" <?php if($_GET["s4"]==""){echo "Selected";}?>><?php echo translate("#Filtre")?></option>
							<?php if(translate("+#request_statu0")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=0"><?php echo translate("#".$_GET['islem']."_statu0")?></option><?php }?>
							<?php if(translate("+#request_statu1")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=1"><?php echo translate("#".$_GET['islem']."_statu1")?></option><?php }?>
							<?php if(translate("+#request_statu2")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=2"><?php echo translate("#".$_GET['islem']."_statu2")?></option><?php }?>
							<?php if(translate("+#request_statu3")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=3"><?php echo translate("#".$_GET['islem']."_statu3")?></option><?php }?>
							<?php if(translate("+#request_statu4")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=4"><?php echo translate("#".$_GET['islem']."_statu4")?></option><?php }?>
							<?php if(translate("+#request_statu5")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=5"><?php echo translate("#".$_GET['islem']."_statu5")?></option><?php }?>
							<?php if(translate("+#request_statu6")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=6"><?php echo translate("#".$_GET['islem']."_statu6")?></option><?php }?>
							<?php if(translate("+#request_statu7")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=7"><?php echo translate("#".$_GET['islem']."_statu7")?></option><?php }?>
							<?php if(translate("+#request_statu8")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=8"><?php echo translate("#".$_GET['islem']."_statu8")?></option><?php }?>
							<?php if(translate("+#request_statu9")<>""){?><option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&s4=9"><?php echo translate("#".$_GET['islem']."_statu9")?></option><?php }?>
						</select>
						<a class="mb-1 mt-1 mr-1 btn btn-success" target="_blank" href="modules/print/print_request.php?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET['islem'];?>&id=<?php echo $_GET["id"]?>&ts1=<?php echo $_GET["ts1"];?>&ts2=<?php echo $_GET["ts2"];?>&key=<?php echo $_GET['key'];?>&op=xls" title="<?php echo translate("#export")?>">
							<i class="fas fa-share-alt"></i>
						</a>
						<?php if($MSA==1){?>
							<a class="mb-1 mt-1 mr-1 btn btn-default" href="?ne=ayarlar&islem=ayarlar&tab=master&module=hproduct" target="_blank" class="with-tip"><strong><i class="fa fa-cog" aria-hidden="true"></i></strong></a>
						<?php }?>
						<a class="mb-1 mt-1 mr-1 btn btn-danger btn-sx" id="alldel" href="#isle" title="<?php echo $sdil[204]; //Kaldir?>" style="display:none;float: left;"><i class="fa fa-trash" aria-hidden="true"></i> <?php echo $sdil[204]; //Kaldir?></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'];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&key=<?php echo $_GET["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/20;
								for ($i = 0; $i <= $rsay; $i++) {
								$x=$i+1;
								?>
								<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&order=<?php echo $_GET["order"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&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 $_GET["key"];?>&order=<?php echo $_GET["order"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&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>
					<script>
						jQuery('.fdate').click(function(){
							var date = $(this).attr('date');
							jQuery('#ts1').val(date);
							jQuery('#ts2').val(date);
							jQuery('#form1').submit();
						});
					</script>						
					<h2 class="card-title"><?php echo $nedir;?></h2>
				</header>
				<div class="card-body" style="">
					<form method="post" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&sayfa=<?php echo $_GET["sayfa"];?>&key=<?php echo $_GET["key"];?>&durum=isle">
						<table class="table" style="">
							<thead>
								<tr class="mdn">
									<th style="text-align:center;" class="w2 mdn">
										<div class="checkbox-custom checkbox-danger">
											<input type="checkbox" id="c0" onclick="Checks(this); toggle('#alldel')">
											<label for="c0"></label>
										</div>
									</th>
									<th class="w6 mw6">ID
										<div class="order">
											<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&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 $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=id+desc" class="fa fa-sort-desc"></a>
										</div>
									</th>
									<th><?php echo translate("Detay")?>
										<div class="order">
											<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&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 $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=t1+desc" class="fa fa-sort-desc"></a>
										</div>
										<th class="w15 mw15"><?php echo telefon($t25);?>
											<div class="order">
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=s3+asc" class="fa fa-sort-asc"></a>
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=s3+desc" class="fa fa-sort-desc"></a>
											</div>
										</th>
										<th class="w10 mw10"><?php echo $sdil[115]; //Tarih?>
											<div class="order">
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=ts2+asc,ts1+asc" class="fa fa-sort-asc"></a>
												<a href="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>&key=<?php echo $_GET["key"];?>&uID=<?php echo $_GET["uID"];?>&fID=<?php echo $_GET["fID"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=ts2+asc,ts1+desc" class="fa fa-sort-desc"></a>
											</div>
										</th>
										<th class="w12 mw12"><?php echo translate("Durum")?></th>
										<th class="w10 mw10"><?php echo $sdil[213]; //İşlemler?></th>
									</tr>
								</thead>
								<tbody>
									<?php
									while($rs=mysqli_fetch_assoc($sql)){
									$jsi = json_decode($rs["n2"], true);
									$filename="";$Name="";
									if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and (date($rs["ts1"],strtotime('-".$module["servicenf"]." days') and date($rs["ts1"],strtotime('-".$module["servicenl"]." days')))>=date("Y-m-d"))<=date("Y-m-d")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($rs["ts1"]>=$_GET["ts1"] and $rs["ts1"]<=$_GET["ts2"])){
									if($_GET["s4"] == "0" and $rs["s4"]=="1"){$sts="display:none;";}
									if($_GET["s4"] == "1" and $rs["s4"]=="0"){$sts="display:none;";}
									$sqlk = mysqli_query($conn, "select * from ".$_SESSION["lang"]." where ne='".$rs["t3"]."' and id=".$rs["s2"]."");  $rsk=mysqli_fetch_assoc($sqlk);
									if($rs["s3"]>0){$uqry="where id='".$rs["s3"]."'";}else{$uqry="t2='".v3e($jsi["Email"])."'";}
									$sqlu = mysqli_query($conn, "select * from t5 $uqry");  $rsu=mysqli_fetch_assoc($sqlu);
									$sqlu2 = mysqli_query($conn, "select * from t5 where id=".$rs["s19"]."");  $rsu2=mysqli_fetch_assoc($sqlu2);
									$jsfm = json_decode($rs["n12"],true);	//bildirim
									$ts1 = explode('-',$rs["ts1"]);
									foreach($jsi as $key=>$value){
										if(substr($key,2)=="Name" or $key=="Name" or $key=="Ad_Soyad"){$Name=$value;}
									}
								?>
								<button type="submit" style="position: absolute; margin-top: -23px; margin-left: 11px; padding: 3px 6px; display:none;" class="btn btn-warning fa fa-trash" id="alldel"></button>
								<tr data-id="<?php echo $rs["id"];?>" class="<?php if($rs["s4"]==0){echo "bg-warning";}elseif($rs["s4"]==1){echo "bg-success";}elseif($rs["s4"]==2){echo "bg-danger";}else{echo "bg-info";}?>" style="<?php echo $sts?>">
									<td class="tac mdn">
										<div class="checkbox-custom checkbox-danger" onclick="show('alldel')">
											<input type="checkbox" id="c<?php echo $rs["id"]?>" class="dchck" name="SID[]" value="<?php echo $rs["id"]?>">
											<label for="c<?php echo $rs["id"]?>"></label>
										</div>
										<input type="hidden" name="KID[]" value="<?php echo $rs["id"]?>"/>
									</td>
									<td class="mdn"><a href="#" class="mfrm v3-text-info" data-toggle="modal" data-target="#myModal" data-title="<?php echo translate($nedir);?>" data-url="<?php if(file_exists("../request/request".$_GET["fID"].".php")){echo "../request/request".$_GET["fID"].".php";}else{echo "modules/requests/request.php";}?>?islem=fmesaj&id=<?php echo $rs["id"];?>" title="fID:<?php echo $rs["s1"];?>"><b><?php echo i2a($rs["id"],7);?></b><br><?php echo $jsi["Request_No"]?></a></td>
									<td title="<?php echo $sdil[207]; //Detay?>"><i class="fas fa-envelope<?php if($jsfm["browser"]==1 or $jsfm["desktop"]==1){echo "-open";}?>"></i> <?php echo $rs["t2"];?> <?php if($rs["t1"]<>""){echo "[".$rs["t1"]."]";};?> 
									<br><?php foreach($jsi as $key=>$value){ if($key[0]=="#"){echo "<button type=\"button\" class=\"v3-btn-xs v3-btn-info\">".$value."</button>";}}?>
									</td>
									<td class="mdn">
										<?php if(mysqli_num_rows($sqlu)>0){echo "<a href=\"?islem=duye&ne=uye&id=".$rsu["id"]."\" style=\"color: unset;\">".$rsu["t1"]."</a>";}elseif($Name<>""){echo $Name;}else{echo ctranslate("Misafir");}?> <?php if(mysqli_num_rows($sqlu2)>0){?><i class="fa fa-angle-double-right" aria-hidden="true"></i> <?php echo "<a href=\"?islem=duye&ne=uye&id=".$rsu2["id"]."\" style=\"color: unset;\">".$rsu2["t1"]."</a>";?><?php }else{?><i class="fa fa-angle-double-right" aria-hidden="true"></i> <?php echo "<a href=\"#\" style=\"color: unset;\">Admin</a>";?><?php }?>
										<?php if($rsmx["t1"]<>"" and $jsi["type"]=="return"){?><div onclick="AjaxGet('<?php echo $weburl?>/notify.php?islem=umr&id=<?php echo $rs["id"]?>&s19=<?php echo $rs["s19"]?>','#umr<?php echo $rs["id"]?>','','OK','')" id="umr<?php echo $rs["id"]?>" title="<?php echo $jsi["type"];?> Sms" style="float:right; cursor:pointer; margin-left:10px;"><i class="fa fa-envelope-o" style="color:#ed9c28;"></i></div><?php }?>
										<?php if($rsmx["t1"]<>""){?><div onclick="AjaxGet('<?php echo $weburl?>/notify.php?islem=um&id=<?php echo $rs["id"]?>&s19=<?php echo $rs["s19"]?>','#um<?php echo $rs["id"]?>','','OK','')" id="um<?php echo $rs["id"]?>" title="Sms" style="float:right; cursor:pointer;"><i class="fa fa-envelope-o" style="color:#ed9c28;"></i></div><?php }?>
									</td>
									<td><?php if($rs["t4"]==""){echo dtarih($rs["ts1"],"gg ka yy time");}else{echo dtarih($rs["t4"],"gg ka yy time");}?></td>
									<td class="mdn">
										<select size="1" name="s4[]" style="" class="form-control" onChange="self.location.href=this.options[this.selectedIndex].value;">
											<?php if(translate("+#request_statu0")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=0" <?php if($rs["s4"]==0){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu0")?></option><?php }?>
											<?php if(translate("+#request_statu1")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=1" <?php if($rs["s4"]==1){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu1")?></option><?php }?>
											<?php if(translate("+#request_statu2")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=2" <?php if($rs["s4"]==2){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu2")?></option><?php }?>
											<?php if(translate("+#request_statu3")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=3" <?php if($rs["s4"]==3){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu3")?></option><?php }?>
											<?php if(translate("+#request_statu4")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=4" <?php if($rs["s4"]==4){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu4")?></option><?php }?>
											<?php if(translate("+#request_statu5")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=4" <?php if($rs["s4"]==5){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu5")?></option><?php }?>
											<?php if(translate("+#request_statu6")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=4" <?php if($rs["s4"]==6){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu6")?></option><?php }?>
											<?php if(translate("+#request_statu7")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=4" <?php if($rs["s4"]==7){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu7")?></option><?php }?>
											<?php if(translate("+#request_statu8")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=4" <?php if($rs["s4"]==8){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu8")?></option><?php }?>
											<?php if(translate("+#request_statu9")<>""){?><option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?php echo $rs["id"];?>&s4=4" <?php if($rs["s4"]==9){echo "Selected";}?>><?php echo translate("#".$_GET['islem']."_statu9")?></option><?php }?>
										</select>
									</td>
									<td class="tar mtar">
										<?php //Print_r($jsi);?>
<!--
											<a class="btn btn-success mbtn mfrm" data-toggle="modal" data-target="#myModal" data-url="fonksiyon.php?islem=fmesaj&id=<?php echo $rs["id"];?>" title="<?php echo $sdil[207]; //Detay?>"><i class="fa fa-pencil" aria-hidden="true"></i><span class="ddn"> <?php echo $sdil[207]; //Detay?></span></a>
										-->
										<?php if(($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y7"]==3)){?>
										<?php if ($rs["s6"]==1 or ($e10==1 and $MSA<>1)) {?>
										<a style="cursor:pointer;" title="<?php echo $sdil[216]; //Yetkili Değilsiniz ??>" class="btn btn-danger btn-ban-row" href="#"><i class="fa fa-ban" aria-hidden="true"></i></a>
										<?php }else{ ?>
										<a style="cursor:pointer;" title="<?php echo $sdil[204]; //Kaldir?>" class="btn btn-danger btn-delete-row" data-href="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"];?>&durum=smesaj"><i class="fa fa-times" aria-hidden="true" style="padding: 0px;"></i></a>
										<?php } ?>
										<?php }else{ ?>
										<a style="cursor:pointer;" title="<?php echo $sdil[216]; //Yetkili Değilsiniz ??>" class="btn btn-danger btn-ban-row" href="#"><i class="fa fa-ban" aria-hidden="true"></i></a>
										<?php } ?>
										<a style="cursor:pointer;" data-toggle="modal" data-target="#myModal" data-title="<?php echo translate($nedir);?>" data-url="<?php if(file_exists("../request/request.php")){echo "../request/request.php";}else{echo "modules/requests/request.php";}?>?islem=fmesaj&id=<?php echo $rs["id"];?>" class="mfrm btn btn-info btn-ban-row" href="#"><i class="fa fa-pencil" aria-hidden="true"></i></a>
										<a tabindex="-1" onclick="vtr('sp<?php echo $rs["id"];?>');toggle('#vtr_1<?php echo $rs["id"];?>');toggle('#vtr_0<?php echo $rs["id"];?>')" id="vtr_1<?php echo $rs["id"];?>" class="btn btn-default" style="margin-left:1px !important"><i class="fa fa-angle-double-down"></i></a>
										<a tabindex="-1" onclick="htr('sp<?php echo $rs["id"];?>');toggle('#vtr_1<?php echo $rs["id"];?>');toggle('#vtr_0<?php echo $rs["id"];?>')" id="vtr_0<?php echo $rs["id"];?>" class="btn btn-default" style="display:none;margin-left:1px !important"><i class="fa fa-angle-double-up"></i></a>
									</td>
								</tr>
								<?php $sts="";}}?>
							</tbody>
						</table>
						<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"] == "smesaj"){
	$sql = mysqli_query($conn, "select * from t2 where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql); $jsi = json_decode($rs["n2"], true);
	foreach($jsi as $key=>$value){
		if(substr($key,0,6)=="Attach"){unlink("../deppo/dosya/".$value."");}
	}
	$aql = mysqli_query($conn, "delete from t2 where ne='".$_GET["islem"]."' and id=".$_GET["id"]."");
	$aql = mysqli_query($conn, "delete from t2 where s1=".$_GET["id"]."");
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_GET["key"]."&sayfa=".$_GET["sayfa"]."&durum=ok",self,500,1);
}elseif($_GET["durum"] == "isle"){
	foreach ($_POST as $key => $val){
	//echo "".$key." : ".$val."";
	}
	if(isset($_POST['SID'])){
		$SID0 = implode(',',$_POST["SID"]); $SIDs = explode(',',$SID0);
		foreach($SIDs as $SID){
			if($module["del"]==0){
				$sql = mysqli_query($conn, "select * from t2 where id=".$SID.""); $rs=mysqli_fetch_assoc($sql); $jsi = json_decode($rs["n2"], true);
				foreach($jsi as $key=>$value){
					if(substr($key,0,6)=="Attach"){unlink("../deppo/dosya/".$value."");}
				}
				$sql = mysqli_query($conn, "delete from t2 where id=".$SID."");
			}else{
				$Rs = mysqli_query($conn, "update t2 set t13='del' where id='".$SID."'");
			}
		}
	}
	$KID0 = implode(',',$_POST["KID"]); $KIDS = explode(',',$KID0);
	$n30 = implode(',',$_POST["n3"]); $n3s = explode(',',$n30);
	$x=0;foreach($n3s as $S) {$x++;
	$Rs = mysqli_query($conn, "update t2 set n3='".$S."' where id=".$KIDS[$x-1]."");
}
echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_GET["key"]."&sayfa=".$_GET["sayfa"]."&durum=ok",self,500,1);
}elseif($_GET["durum"] == "s4"){
	$Rs = mysqli_query($conn, "update t2 set s4='".$_GET["s4"]."' where id=".$_GET["id"]."");
	if(tanim('sms','n1',0)<>""){
		$sqlk = mysqli_query($conn, "select * from t2 where id=".$_GET["id"]."");  $rsk=mysqli_fetch_assoc($sqlk);
		$jski = json_decode($rsk["n2"], true);
		$sqlku = mysqli_query($conn, "select * from t5 where id=".$jski["uid"]."");  $rsku=mysqli_fetch_assoc($sqlku);
		if($S==1){
			$smstxt="".translate("#".$jski["Request No"]." ".translate("Talebiniz İşleme Alındı")."")."";
		}elseif($S==2){
			$smstxt="".translate("#".$jski["Request No"]." ".translate("Talebiniz Tamamlandı")."")."";
		}elseif($S==3){
			$smstxt="".translate("#".$jski["Request No"]." ".translate("Talebiniz İptal Edildi")."")."";
		}
		smsgonder($smstxt,telefon($rsku["t4"]));
	}
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_GET["key"]."&sayfa=".$_GET["sayfa"]."&durum=ok",self,500,1);
}elseif($_GET["durum"] == "s19"){
	$Rs = mysqli_query($conn, "update t2 set s19='".$_GET["s19"]."' where id=".$_GET["id"]."");
	$sqlk = mysqli_query($conn, "select * from t2 where id=".$_GET["id"].""); $rsk=mysqli_fetch_assoc($sqlk);
	$sqlku = mysqli_query($conn, "select * from t5 where id=".$_GET["s19"]."");  $rsku=mysqli_fetch_assoc($sqlku);
	if(tanim('sms','n1',0)<>""){
		$jski = json_decode($rsk["n2"], true);
		smsgonder($smstxt,telefon($rsku["t4"]));
	}
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_GET["key"]."&sayfa=".$_GET["sayfa"]."&durum=ok",self,500,1);
}
include("../public/log.php");
?>