<div class="inner-wrapper">
	<?php
if($_GET["durum"] == ""){
	$users = json_decode(GetArr("","users","s9=1"), true);
	if(!empty($_POST["s5"])){$s5=$_POST["s5"];}else{$s5="";}
	if($cols["c_request_hesap"]<>""){
		$sqlc=mysqli_query($conn, "select id,t1,n17 from t5 order by t1 asc"); while($rsc=mysqli_fetch_assoc($sqlc)){$users[] = $rsc; }
	}
	if($cols["c_request_cont"]<>"" || $cols["c_request_form"]<>""){
		$sqll=mysqli_query($conn, "select id,t1 from ".$_SESSION["lang"]." order by t1 asc"); while($rsl=mysqli_fetch_assoc($sqll)){$datas[] = $rsl; }
	}
	$sqlx=mysqli_query($conn, "select id,t1 from ".$_SESSION["lang"]." where ne='client_project' and s13=1 $xmod order by t1 asc");
	//Sayfalama
	$slmt = !empty($_GET["show"]) ? $_GET["show"] : (!empty($cols["c_".$_GET["ne"]."_limit"]) ? $cols["c_".$_GET["ne"]."_limit"] : (!empty($module["slmt"]) ? $module["slmt"] : 20));
	$sayfa = isset($_GET['sayfa']) ? (int) $_GET['sayfa'] : 1;
	if ($sayfa < 1) $sayfa = 1; $offset = ($sayfa - 1) * $slmt;
	if($_GET["key"]<>""){
		$sorgu="and (id LIKE '%".$_GET["key"]."%' or t1 LIKE '%".$_GET["key"]."%' or t2 LIKE '%".$_GET["key"]."%' or n2 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";
	}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 id desc";
		}
	}
	if($_GET["t1"]<>""){
		$sorgu .="and t1='".$_GET["t1"]."'";
	}
	if($_GET["s4"]<>""){
		$sorgu .="and s4='".$_GET["s4"]."'";
	}
	if($_GET["fID"]<>""){$sorgu .=" and s1='".$_GET["fID"]."'";}
	if($_GET["islem"]=="request"){
		$nedir=telefon($module["requests"]);
	}else{
		$nedir=translate("Form Mesajlar");
	}
	$sql = mysqli_query($conn, "SELECT SQL_CALC_FOUND_ROWS * FROM t2 WHERE ne='" . $_GET["islem"] . "' $sorgu $lreq $order LIMIT $offset, $slmt");
	//Kayıt Sayısı
	$total_result = mysqli_query($conn, "SELECT FOUND_ROWS()"); $rcount = mysqli_fetch_array($total_result)[0];
	if($_GET["fID"]<>""){$cqry=" and s1='".$_GET["fID"]."'";}

	if ($_SESSION["ProjeID"] != "") { $sorgu .= "AND n2 LIKE '%\"ProjeID\":[".$_SESSION["ProjeID"]."]%'";}
	
	//Kayıtlardan başlık alma
	$cjsli = Array(); while($rsl=mysqli_fetch_assoc($sql)){ $jsli = json_decode($rsl["n2"],true); foreach($jsli as $ckey=>$cval){$cjsli[] = $ckey;} } $cjsli = array_unique($cjsli); mysqli_data_seek($sql, 0);
?>
<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>
	<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'];?>">
						<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>
						<?php include("modules/public/filter.php");?>

						<?php
						$statuses = [];
						for ($i = 0; $i <= 9; $i++) {
							$key = "#".$_GET['islem']."_statu".$i;
							if (hasTranslation($key)) { $statuses[$i] = translate($key); }
						}
						?>
						<select size="1" onChange="self.location.href=this.options[this.selectedIndex].value;" class="sna">
							<option value="?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $_GET['islem'];?>" <?php if($_GET["s4"]==""){echo "Selected";}?>><?php echo translate("#Durum")?></option>
							<?php foreach ($statuses as $key => $label): ?>
								<option value="?ne=request&islem=request&sayfa=&key=&durum=s4&id=<?= $rs['id']; ?>&s4=<?= $key; ?>" <?= ($rs['s4'] == $key) ? "selected" : ""; ?>><?php echo $label?></option>
							<?php endforeach; ?>
						</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'];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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 sna" style="padding:0px; height: 19px;">
								<?php 
									$rsay = ceil($rcount / $slmt); 
									for ($i = 1; $i <= $rsay; $i++) {
								?>
								<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 $i;?>" <?php if(($_GET["sayfa"]=="" and $i==1) or $_GET["sayfa"]==$i){?>selected<?php }?>><?php echo $i;?></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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&key=<?php echo $_GET["key"];?>&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="<?php echo $_GET["ne"]?>">
									<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">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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=id+desc" class="fa fa-sort-desc"></a>
										</div>
									</th>
									<th><?php echo translate("Konu")?>
										<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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=t1+desc" class="fa fa-sort-desc"></a>
										</div>
									</th>
									<?php
									foreach(array_unique($cjsli) as $value=>$key){
									if($cols["c_request_".$key.""]<>""){
									?>
									<th class="w10 mw10 mdn">
										<?php echo ltrim(translate(str_replace("_"," ",$key)),'#');?>
									</th>
									<?php }}?>
										<?php if($cols["c_request_hesap"]<>""){?>
										<th class="w13 mw18 mdn"><?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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=s3+desc" class="fa fa-sort-desc"></a>
											</div>
										</th>
										<?php }?>
										<?php if($cols["c_request_form"]<>""){?>
										<th class="w10 mw10 mdn"><?php echo translate("Form");?></th>
										<?php }?>
										<?php if($cols["c_request_cont"]<>""){?>
										<th class="w10 mw10 mdn"><?php echo translate("İçerik");?></th>
										<?php }?>
										<?php if($cols["c_request_tarih"]<>""){?>
										<th class="w8 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"];?>&s4=<?php echo $_GET["s4"];?>&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"];?>&s4=<?php echo $_GET["s4"];?>&sayfa=<?php echo $_GET["sayfa"];?>&order=ts2+asc,ts1+desc" class="fa fa-sort-desc"></a>
											</div>
										</th>
										<?php }?>
										<th class="w8 mw10"><?php echo translate("Durum")?></th>
										<th class="w7 mw7"><?php echo $sdil[213]; //İşlemler?></th>
									</tr>
								</thead>
								<tbody>
									<?php
									while($rs=mysqli_fetch_assoc($sql)){ $jsi = json_decode($rs["n2"], true); $filename="";$Name="";$cont="";$fName=""; $client="";$clientID="";$editor="";$editorID="";
									if($_GET["fID"]<>""){$fID=$_GET["fID"];}elseif($_GET["fID"]=="" and $rs["s1"]<>"0"){$fID=$rs["s1"];}
									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;";}
									foreach($datas as $key=>$value){if($value["id"]==$rs["s2"]){$cont=$value["t1"];}}
									
									if($rs["s19"]>0){
										foreach($users as $key=>$value){if($value["id"]=="".$rs["s19"].""){$jsui = json_decode($value["n17"],true); $editor=$jsui["ifirma"] <>"" ? kisalt($jsui["ifirma"],2) : $value["t1"]; $editorID=$value["id"];}}
									}else{
										$editor="Admin"; $editorID="0";
									}
									if($rs["s3"]>0){
										foreach($users as $key=>$value){if($value["id"]=="".$rs["s3"].""){$jsui = json_decode($value["n17"],true); $client=$jsui["ifirma"] <>"" ? kisalt($jsui["ifirma"],2) : $value["t1"]; $clientID=$value["id"];}}
									}else{
										$editor="Misafir"; $editorID="0";
									}
									$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;}
									}
									if ($authority==0){ $dauth=0; }else{ $dauth=1; }
								?>
								<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="tr<?php echo $rs["id"];?> <?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?><?php if((mysqli_num_rows($sqlx)>0 and $_SESSION["ProjeID"]=="" and $_SESSION["kim"]=="yonetici") or (mysqli_num_rows($sqlx)>0 and $_SESSION["ProjeID"]<>$jsi["ProjectID"])){echo "display:none"; }?>">
									<td class="tac">
										<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>
									<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 echo !empty($module["request_path"]) ? $module["request_path"] : (file_exists("../request/request{$rs['s1']}.php") ? "../request/request{$rs['s1']}.php" : "modules/requests/request.php"); ?>?islem=<?php echo $_GET['islem'];?>&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["t2"]==""){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>
									<?php
										$i = 0; foreach (array_unique($cjsli) as $value => $key) {
										$ival = (!empty($value["t3"])) ? $value["t3"] : $key;
										if ($value["n4"] !== "switch") { $i++; }
										if ($value["n4"] !== "switch" && !empty($cols["c_request_".$key])) {
										?>
										<td class="<?php echo $value["n13"]; ?>">
											<?php if (is_array($jsi[$ival])) { ?>
												<?php $val = implode(", ", $jsi[$ival]);  echo $val;  ?>
											<?php } else { ?>
												<?php 
												if ($ival == "Ulke") {
													echo (!empty($jsi[$ival])) ? loc($jsi[$ival], 'ulke') : "...";
												} elseif (substr($ival, 0, 6) == "Attach") {
													echo (!empty($jsi[$ival])) ? '<a href="' . $jsi[$ival] . '" data-fancybox="gallery">' . translate("#".uzanti($jsi[$ival], "uzanti") . " Download") . '</a>' : "...";
												} else {
													echo (!empty($jsi[$ival])) ? kisalt($jsi[$ival], 20) : "...";
												}
												?>
											<?php } ?>
										</td>
									<?php }}?>
									<?php if($cols["c_request_hesap"]<>""){?>
									<td class="mdn">
										<a href="?islem=duye&ne=uye&id=<?php echo $clientID?>" target="_blank" style="color: unset;" title="<?php echo $fName?>"><?php echo $client?></a><br>
										<?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, ', ');
										?>
										<?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 }?>
										<?php if($fName<>""){echo "<br>".kisalt($fName,3);}?>
									</td>
									<?php }?>
									<?php if($cols["c_request_form"]<>""){?>
										<td><?php echo $rs["t1"];?> #<?php echo $rs["s1"];?></td>
									<?php }?>
									<?php if($cols["c_request_cont"]<>""){?>
										<td><?php echo $cont;?> #<?php echo $rs["s2"];?></td>
									<?php }?>
									<?php if($cols["c_request_tarih"]<>""){?>
									<td><?php if($rs["t4"]==""){echo dtarih($rs["ts1"],"gg ka yy time");}else{echo dtarih($rs["t4"],"gg ka yy time");}?></td>
									<?php }?>
									<td class="mdn">
										<select size="1" id="s4_<?php echo $rs["id"];?>" name="s4[]" style="<?php if($dauth==0 && $jsy["y17_status"]!==1){echo "display:none;";} ?>" class="form-control" onChange="status(<?php echo $rs["id"];?>);">
											<?php foreach ($statuses as $key => $label): ?>
												<?php if ($label != ""): ?>
													<option value="<?= $key; ?>" <?= ($rs['s4'] == $key) ? "selected" : ""; ?>><?php echo $label?></option>
												<?php endif; ?>
											<?php endforeach; ?>
										</select>
									</td>
									<td class="tar mtar">
										<?php //Print_r($jsi);?>
										<?php if($module["request_path"]<>"" || file_exists("../request/request.php")){?>
											 <a onclick="window.open('<?php echo !empty($module["request_path"]) ? $module["request_path"] : (file_exists("../request/request.php") ? "../request/request.php" : "modules/requests/request.php"); ?>?id=<?php echo $rs["id"]?>')" class="mdn btn btn-warning noprint"><i class="fa fa-eye"></i></a>
										<?php }?>
										<!--<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>-->
										<a style="cursor:pointer;" data-toggle="modal" data-target="#myModal" data-title="<?php echo translate($nedir);?>" data-url="modules/requests/request.php?islem=<?php echo $_GET['islem'];?>&id=<?php echo $rs["id"];?>" class="mfrm btn btn-info btn-ban-row" href="#"><i class="fa fa-pencil" aria-hidden="true"></i></a>
										<?php if ($dauth==0){?>
											<a style="cursor:pointer;" 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 style="cursor:pointer;" 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"];?>&id=<?php echo $rs["id"];?>&fID=<?php echo $fID;?>&durum=smesaj"><i class="fa fa-times" aria-hidden="true" style="padding: 0px;"></i></a>
										<?php } ?>
									</td>
								</tr>
								<?php $sts="";}}?>
							</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 $module["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 ($module["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 ($module["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 ($module["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'];?>&s4=<?php echo $_GET["s4"];?>&key=<?php echo $_SESSION["key"];?>&show=<?php echo $_GET["show"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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 
											$rsay = ceil($rcount / $slmt); 
											for ($i = 1; $i <= $rsay; $i++) {
										?>
										<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 $i;?>" <?php if(($_GET["sayfa"]=="" and $i==1) or $_GET["sayfa"]==$i){?>selected<?php }?>><?php echo $i;?></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"];?>&s4=<?php echo $_GET["s4"];?>&fID=<?php echo $_GET["fID"];?>&s4=<?php echo $_GET["s4"];?>&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>
<script>
	function status(id) {
		var url = jQuery('option:selected', '#s4_'+id+'').val();
		s4 = jQuery('option:selected', '#s4_'+id+'').attr('status');
		jQuery(".tr"+id+"").removeClass('bg-warning');jQuery(".tr"+id+"").removeClass('bg-success');jQuery(".tr"+id+"").removeClass('bg-danger');jQuery(".tr"+id+"").removeClass('bg-info');
		if(s4==0){
			jQuery(".tr"+id+"").toggleClass('bg-warning');
		}else if(s4==1){
			jQuery(".tr"+id+"").toggleClass('bg-success');
		}else if(s4==2){
			jQuery(".tr"+id+"").toggleClass('bg-danger');
		}else if(s4==3){
			jQuery(".tr"+id+"").toggleClass('bg-info');
		}
		AjaxGet(url,'#process','','');
	};
</script>
<?php
	}elseif($_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."");}
		}
		$del = mysqli_query($conn, "delete from t2 where (ne='".$_GET["islem"]."' and id=".$_GET["id"].") or (s1=".$_GET["id"].")");
		echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&key=".$_GET["key"]."&sayfa=".$_GET["sayfa"]."&fID=".$_GET["fID"]."",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."");}
					}
					$del = mysqli_query($conn, "delete from t2 where (id=".$SID." or s1=".$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"]."&fID=".$_GET["fID"]."",self,500,1);
	}elseif($_GET["durum"] == "s4"){
		$Rs = mysqli_query($conn, "update t2 set s4='".$_GET["s4"]."' where id=".$_GET["id"]."");
		$sqlk = mysqli_query($conn, "select * from t2 where id=".$_GET["id"]."");  $rsk=mysqli_fetch_assoc($sqlk); $jski = json_decode($rsk["n2"], true);
		if($rsk["s3"]>0){$s3=$rsk["s3"];}else{$s3=$jski["uid"];}
		$sqlku = mysqli_query($conn, "select * from t5 where id=".$s3."");  $rsku=mysqli_fetch_assoc($sqlku);
		$konu =translate($jski["Konu"]);
		$mesaj="<center>#".$jski["Request_No"]." ".translate("+#request_text_".$_GET["s4"]."")."</center>";
		if($module["user_bildirim_sms"]>0){
			smsgonder($mesaj,telefon($rsku["t4"]));
		}
		if($module["user_bildirim_email"]>0){
			$path		= "../";
			$mesaj	= $design_top.$mesaj.$design_bottom;
			emailgonder(v3d($rsku["t2"]), $konu, '', $mesaj);
		}
		if($module["user_bildirim_notification"]>0){
			sNotification($mesaj, $konu, "Crm");
		}
	}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"]."&fID=".$_GET["fID"]."",self,500,1);
	}
?>
<?php //include("modules/public/log.php");?>