<style type="text/css">
	.fbaslik {
		display: block;
		border-radius: 5px 5px 0px 0px;
		font-weight: 600 !important;
		clear: both !important;
	}
	.fbaslik>span {
		padding: 8px;
		border-radius: 10px 10px 0px 0px;
	}
	.faciklama {
		display: block !important;
		font-size: 9px !important;
		clear: both !important;
		margin: 0px !important;
		padding: 0px !important;
	}
	.fsecenek {
		float: left !important;
		margin-right: 5px !important;
		margin-left: 5px !important;
		top:0px !important;
	}
	.fzorunlu {
		border: solid 1px #ff3333 !important;
	}
	.fclear {
		display: block !important;
		clear: both !important;
		height: 5px !important;
	}
	.v3-radio {
		display: initial !important;
	}
	.v3-form-control {
		height:45px !important;
	}
	v3-form-control:hover {
		color: #00ccff;
		background-position: 0px -32px;
	}
	.v3-form-inputs{
		border-radius: 0px 5px 5px 5px;
	}
</style>
<?php
	$sqlf=mysqli_query($conn, "select * from ".$_SESSION['lang']." where id=".$sID.""); $rsf=mysqli_fetch_assoc($sqlf);
	$jstn = json_decode($rsf["n1"], true);
	$jssi = json_decode($rsf["n2"], true);
	$jsa = json_decode($rsf["n3"], true);
	//Print_r($rsf["n3"]);
	if(mysqli_num_rows($sqlf)>0) { $c=0; for ( $i=1 ; $i < 99 ; $i++ ){
		if($jssi["s".$i.""]==1){
			$c++;
		}
	}}
?>
<div class="v3-row v3-form">
	<form id="sf<?php echo $rsf["id"];?>" style="<?php echo $rsf["n4"];?>" class="<?php echo $rsf["t4"];?> <?php if ($c>0){echo "fcontrol";}?>">
		<input type="hidden" name="sID" value="<?php echo $rsf["id"];?>">
		<input type="hidden" name="pID" value="<?php echo $id;?>">
		<?php if(mysqli_num_rows($sqlf)>0) { for ( $i=1 ; $i < 99 ; $i++ ){ $rcolor = ($i %2 ) ? "f9f9f9" : "eae9e9"; ?>
		<?php if(!empty($jstn["t".$i.""])){?>
			<div class="v3-col-md-<?php echo $jstn["c".$i.""]?> mt40 mmt40 mb20 mmb20">
				<div class="fbaslik" style="margin-bottom:10px;"><span class="alert-warning"><?php echo $jstn["t".$i.""]?> <?php if($jssi["s".$i.""]==1){echo "*";}?></span></div>
				<?php if($jssi["i".$i.""]=="3"){?>
					<?php $parcala=$jstn["n".$i.""]; $n= substr_count($parcala, ','); $s= 0; while ( $s <= $n ) {$baslik=explode(",",$parcala);?>
					<?php
						// Json Veri Kontrolü
						$a=0; $b=0; $User_ID=0; $uanswer=""; $qanswer=""; $ssik=""; $result="";
						foreach($jsa as $answers){$b++;
							if($answers["User_ID"]==$_SESSION["User_ID"] and $answers["PageID"]==$id){							
								$uanswer=$answers[cevir4($jstn["t".$i.""])];
								$qanswer=$jstn["v".$i.""];
								$ssik=substr($baslik[$s],0,1);
								if($uanswer==$qanswer and $uanswer==$ssik){
									$t++; $result="<i class=\"fa fa-thumbs-o-up\" aria-hidden=\"true\"></i>";
								}elseif($uanswer<>$qanswer and $uanswer==$ssik){
									$w++; $result="<i class=\"fa fa-thumbs-o-down\" aria-hidden=\"true\"></i>";
								}
								$User_ID++;
							}
						}
						// Json Veri Kontrolü
					?>
					<div class="db clr" style="<?php if($User_ID>0){if($qanswer==$ssik){echo "background: #abccab; height: 25px; color: white;";}elseif($uanswer==$ssik){echo "background: #ccabc3; height: 25px; color: white;";}else{echo "background: #fff; height: 25px; color: black;";}}?>">
						<input type="radio" name="<?php echo cevir4($jstn["t".$i.""])?>" value="<?php echo $baslik[$s];?>" class="v3-radio fsecenek">
						<span class="fsecenek"><?php echo $baslik[$s];?> <?php echo $result?>
						</span>
					</div>
					<?php $s ++; }?>
				<?php }?>
			</div>
		<?php $q++;}?>
	<?php }?>
	<!--/Son/-->
	<div class="v3-col-md-12" style="margin-bottom:20px;">
		<div class="v3-col-md-5" style="">
			<button type="button" class="v3-btn v3-btn-sm v3-btn-info fl mfl mr5 mmr5" title="Toplam Soru Sayısı"><?php echo $q;?></button>
<?php if($t<>"" or $w<>""){?>
			<button type="button" class="v3-btn v3-btn-sm v3-btn-success fl mfl mr5 mmr5" title="Toplam Doğru Cevap Sayısı"><?php if($t<>""){echo $t;}else{echo "0";}?></button>
			<button type="button" class="v3-btn v3-btn-sm v3-btn-danger fl mfl" title="Toplam Yanlış Cevap Sayısı"><?php if($w<>""){echo $w;}else{echo "0";}?></button>
<?php }?>
		</div>
		<div class="v3-col-md-7" style="">
<?php if($User_ID<>0){?>
			<a href="?<?php echo $sayfa?>/<?php echo $sayfa1?>/<?php echo $User_ID;?>" class="v3-btn v3-btn-sm v3-btn-warning fr"><i class="fa fa-refresh"></i> Tekrarla</a>
<?php }else{?>
			<button type="button" class="v3-btn v3-btn-sm v3-btn-warning fr mfr" data-url="<?php echo $path?>config/func.php?islem=sfgonder" data-form="#sf<?php echo $rsf["id"];?>" data-msg="<?php echo translate("+Sınava Katıldığınız için teşekkürler")?>"><i class="fa fa-paper-plane"></i> <?php echo $sdil[101];?></button>
<?php }?>
		</div>
	</div>
<?php }?>
</form>
</div>
<div style="text-align: center; margin-top: 30px; font-size: 26px;">
<?php if($t<>"" or $w<>""){?>
	<?php if($t > ($q/2)){?>
		Tebrikler, Sınavı Geçiniz
	<?php }else{?>
		Üzgünüz, Sınavı Geçemediniz
	<?php }?>
<?php }?>
</div>
<?php
	if($sayfa2<> ""){
		unset($jsa[$sayfa2]);
		$aform = json_encode($jsa, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
		//Print_r($aform);
		$sql2 = mysqli_query($conn, "update ".$_SESSION["lang"]." set n3='".addslashes(stripslashes($aform))."' where id=".$sID."");
		echo location("?".$sayfa."/".$sayfa1."",self,500,1);
	}
?>