<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
if($sID==""){$sID=$id;}
$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 enctype="multipart/form-data" 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.""]?> mt15 mmt15 mb15 mmb15" style="clear:both;">
				<div class="fbaslik"><span class="alert-warning"><?php echo $jstn["t".$i.""]?> <?php if($jssi["s".$i.""]==1){echo "*";}?></span></div>
				<?php if($jssi["i".$i.""]=="0"){?>
					<input type="<?php if($jstn["type".$i.""]<>""){echo $jstn["type".$i.""];}else{echo "text";}?>" <?php if($jssi["id".$i.""]<>""){echo "id=\"".$jssi["id".$i.""]."\"";}?> name="<?php echo cevir4($jstn["t".$i.""])?>" placeholder="<?php echo $jstn["p".$i.""]?>" <?php if($jstn["mask".$i.""]<>""){?>data-input-mask="<?php echo $jstn["mask".$i.""]?>"<?php }?> value="<?php echo $jstn["v".$i.""]?>" class="v3-form-inputs v3-form-control <?php echo $jstn["class".$i.""]?> <?php if($jssi["s".$i.""]==1){echo "icontrol";}?> <?php if($jstn["mask".$i.""]<>""){?>phone<?php }?>" autocomplete="none">
					<?php if(!empty($jstn["n".$i.""])){?>
						<div class="faciklama">* <?php echo $jstn["n".$i.""];?></div>
					<?php }?>
				<?php }elseif($jssi["i".$i.""]=="1"){?>
					<textarea <?php if($jssi["id".$i.""]<>""){echo "id=\"".$jssi["id".$i.""]."\"";}?> name="<?php echo cevir4($jstn["t".$i.""])?>" placeholder="<?php echo $jstn["p".$i.""]?>" <?php if($jstn["mask".$i.""]<>""){?>data-input-mask="<?php echo $jstn["mask".$i.""]?>"<?php }?> value="<?php echo $jstn["v".$i.""]?>" class="v3-form-inputs v3-form-control <?php echo $jstn["class".$i.""]?> <?php if($jssi["s".$i.""]==1){echo "icontrol";}?>" autocomplete="none"></textarea>
					<?php if(!empty($jstn["n".$i.""])){?>
						<div class="faciklama">* <?php echo $jstn["n".$i.""];?></div>
					<?php }?>
				<?php }elseif($jssi["i".$i.""]=="3"){?>
					<?php $parcala=$jstn["n".$i.""]; $n= substr_count($parcala, ','); $s= 0; while ( $s <= $n ) {$baslik=explode(",",$parcala);?>
					<div class="db clr mt10 mmt10">
						<span id="form-baslik"></span>
						<input type="radio" name="<?php echo cevir4($jstn["t".$i.""])?>" value="<?php echo $baslik[$s];?>" class="v3-radio fsecenek" <?php if($baslik[$s]==$jstn["v".$i.""]){echo "checked";}?>>
						<span class="fsecenek"><?php echo $baslik[$s];?>
						<?php
							$a=0; $b=0; $ip=0;
							foreach($jsa as $answers){$b++;
									if($answers["IP"]==getRealIpAddr() and $rsf["t7"]==1){$ip++; }
								foreach($answers as $key=>$value){
									if($value==$baslik[$s]){$a++; }
								}
							}
							if($ip<>0 and $rsf["t6"]<>1){ echo "{".$a."}"; }
						?>
						</span>
					</div>
					<?php $s ++; }?>
					<div style="clear:both; height:10px;"></div>
				<?php }elseif($jssi["i".$i.""]=="4"){?>
					<?php $parcala=$jstn["n".$i.""]; $n= substr_count($parcala, ','); $s= 0; while ( $s <= $n ) {$baslik=explode(",",$parcala);?>
					<div class="db clr mt10 mmt10">
						<span id="form-baslik"></span>
						<input type="checkbox" name="<?php echo cevir4($jstn["t".$i.""])?>[]" value="<?php echo $baslik[$s];?>" class="v3-checkbox fsecenek" <?php if($baslik[$s]==$jstn["v".$i.""]){echo "checked";}?> style="width: 16px; height: 16px;">
						<span class="fsecenek"><?php echo $baslik[$s];?>
						<?php
							$a=0; $b=0; $ip=0;
							foreach($jsa as $answers){$b++;
									if($answers["IP"]==getRealIpAddr() and $rsf["t7"]==1){$ip++; }
								foreach($answers as $key=>$value){
									if($value==$baslik[$s]){$a++; }
								}
							}
							if($ip<>0 and $rsf["t6"]<>1){ echo "{".$a."}"; }
						?>
						</span>
					</div>
					<?php $s ++; }?>
					<div style="clear:both; height:10px;"></div>
				<?php }?>
			</div>
		<?php }?>
	<?php }?>
	<!--/Son/-->
<?php if($rsf["m4"]<>""){?>
<?php for ($x = 1; $x <= 3; $x++) {?>
	<div class="" style="margin-bottom:10px; <?php if($x>1){ echo "display:none;";}?>" id="img<?php echo $x;?>">
		<div class="v3-col-md-10 v3-col-xs-10" style="margin-bottom:10px;">
			<input type="file" name="attach_<?php echo $x;?>" class="v3-form-control" accept="*" style="margin-bottom:5px;">
		</div>
		<div class="v3-col-md-1 v3-col-xs-1" style="margin-bottom:10px;">
			<i class="fa fa-plus <?php if($x==3){ echo "dn";}?> v3-btn v3-btn-warning" style="font-size: 30px;" onclick="toggle('#img<?php echo $x+1;?>');"></i>
		</div>
	</div>
<?php }}?>
	<div class="" style="clear:both;margin-bottom:20px; margin-right:10px; margin-left:10px;">
		<div class="v3-col-md-5" style="padding: 3px;">
		<?php if($ip==0 and $rsf["t6"]<>1){ echo translate("+#Sonuçlar için Ankete Katılmalısınız"); }?>
		</div>
		<div class="v3-col-md-7" style="padding: 3px;">
			<button type="button" class="v3-btn v3-btn-sm v3-btn-warning fr mfr" <?php if($ip<>0){ echo "disabled"; }?> data-url="<?php echo $path?>config/func.php?islem=sfgonder" data-form="#sf<?php echo $rsf["id"];?>" data-msg="<?php echo translate("+#Anketimize Katıldığınız için teşekkürler")?>"><i class="fa fa-paper-plane"></i> <?php echo $sdil[101];?></button>
		</div>					
	</div>
<?php }?>
</form>
</div>