<style>
	.rating { overflow: hidden; display: inline-block; font-size: 0; position: relative; margin-top:5px;}
	.rating label{ margin-right:5px;}
	.rating-input { float: right; width: 16px; height: 16px; padding: 0; margin: 0 0 0 -16px; opacity: 0;}
	.rating:hover .rating-star:hover, .rating:hover .rating-star:hover ~ .rating-star, .rating-input:checked ~ .rating-star { background-position: 0 0;}
	.rating-star, .rating:hover .rating-star {position: relative; float: right; display: block; width: 16px; height: 16px; background: url('<?php echo $path.$cpath?>deppo/tools/img/star.png') 0 -16px;}
</style>
<?php
	$result = mysqli_query($conn, "select * FROM genel where ne='yorum' and s1=".$id." and s4=1"); $total_comment = mysqli_num_rows($result);
	$sqly=mysqli_query($conn, "select * from genel where ne='yorum' and s1=".$id." and s4=1");while($rsy=mysqli_fetch_assoc($sqly)){$cs3=$cs3+$rsy["s3"];}
?>
<div class="v3-row" style="">
	<div id="ffb_result"></div>
	<form enctype="multipart/form-data" name="ffb" id="ffb" autocomplete="false" style="<?php if($fbf==0){echo "display:none;";}?>">
		<input type="file" name="afile[]" id="afile" accept="*" style="display:none;" multiple="multiple">
		<input type="hidden" name="id" value="<?php echo $id?>">
		<input type="hidden" name="t1" value="<?php if ($sayfa[0]=="d" or $sayfa[0]=="s" or $sayfa[0]=="h" or $sayfa[0]=="m"){echo $_SESSION["lang"];}elseif ($sayfa[0]=="u"){echo "t5";}else{echo "medya";}?>">
		<input type="hidden" name="t2" value="<?php if ($sayfa[0]=="d"){echo "kayit";}elseif ($sayfa[0]=="s"){echo "sayfa";}elseif ($sayfa[0]=="h"){echo "haber";}elseif ($sayfa[0]=="u"){echo "uye";}else{echo "video";}?>">
			<input type="hidden" class="v3-form-control" name="t4" value="<?php echo $_SESSION["User_Name"];?>">
			<input type="hidden" class="v3-form-control" name="t5" value="<?php echo $_SESSION["User_Email"];?>">
			<div class="mt5">
				<textarea name="n1" class="v3-form-control" tabindex="1" placeholder="<?php if($_SESSION["User_ID"]==""){echo translate("Değerlendirme Alanı için Giriş Yapmalısınız");}else{echo translate("Aldığınızı Ürün/Hizmet ile ilgili Değerlendirme Yapabilirsiniz");}?>" style="min-height:80px;"></textarea>
			</div>
			<div class="v3-col-md-10 v3-col-xs-7" style="margin-top:5px;">
				<span class="rating">
					<input type="radio" class="rating-input" id="rating-input-1-5" style="display:none;" name="s3" value="5"/>
					<label for="rating-input-1-5" class="rating-star"></label>
					<input type="radio" class="rating-input" id="rating-input-1-4" style="display:none;" name="s3" value="4"/>
					<label for="rating-input-1-4" class="rating-star"></label>
					<input type="radio" class="rating-input" id="rating-input-1-3" style="display:none;" name="s3" value="3"/>
					<label for="rating-input-1-3" class="rating-star"></label>
					<input type="radio" class="rating-input" id="rating-input-1-2" style="display:none;" name="s3" value="2"/>
					<label for="rating-input-1-2" class="rating-star"></label>
					<input type="radio" class="rating-input" id="rating-input-1-1" style="display:none;" name="s3" value="1"/>
					<label for="rating-input-1-1" class="rating-star"></label>
				</span>
			</div>
			<div class="v3-col-md-1 v3-col-xs-2" style="margin-top:5px;">
				<i class="fa fa-camera cp" aria-hidden="true" style="font-size: 30px; margin-top: 3px; position: absolute; margin-left: -5px;"></i>
			</div>
			<div class="v3-col-md-1 v3-col-xs-3" style="margin-top:5px;">
				<button type="button" class="v3-btn v3-btn-warning fsend" style="float:right; margin-left:5px;" data-url="<?php echo $path.$cpath?>config/func.php?islem=yorum" data-form="#ffb" data-msg="" <?php if($_SESSION["User_ID"]==""){echo "disabled";}?>><?php echo $sdil[101]?></button>
			</div>
	</form>
</div>
<div class="alert-success suc" style="font-size: 12px; margin-top: 5px; border-radius: 5px; display:none"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i> Geri Bildiriminiz için Teşekkürler</div>
<div id="feedbacks"></div>
<script>
	jQuery('.fa-camera').click(function(){ jQuery('#afile').trigger('click'); });
	jQuery(".fsend").click(function() {
		//AjaxPResult('config/func.php?islem=yorum','#ffb','#ffb_result','nopl');
		jQuery(".fsend").html("Gönderiliyor");
		setTimeout(function(){
			loadFunction('<?php echo $path.$cpath?>deppo/tools/script/feedbacks.php?id=<?php echo $id?>','#feedbacks');
			jQuery('#ffb')[0].reset();
			jQuery(".fsend").html("Gönder");
			show('.suc');
		 }, 1000);
		setTimeout(function(){
			hide('.suc');
		 }, 3000);
	});
	jQuery(document ).ready(function() {
		setTimeout(function(){
			loadFunction('<?php echo $path.$cpath?>deppo/tools/script/feedbacks.php?id=<?php echo $id?>','#feedbacks');
		}, 3000);
	});
</script>
<div class="">Toplam <span class="v3-badge" style="margin-top: -3px;"><?php echo $total_comment?></span> yorum ile ortalama <span class="v3-badge" style="margin-top: -3px;"><?php echo number_format($cs3/$total_comment,2)?></span> oy aldı.</div>