<?php
$path="../../../../";
if(file_exists("".$path."config/map.php" )){$path2="config/"; include("".$path."config/map.php");}else{include("".$path."map.php");}
$id=$_GET["id"];
$sql = mysqli_query($conn, "select * from ".$_GET["ne"]." where id=".$_GET["id"].""); $puan=mysqli_fetch_assoc($sql);
if($puan["s14"]=="" or $puan["s14"]==0){
	$Rs = mysqli_query($conn, "update ".$_GET["ne"]." set s14='1', s15='1' where id=".$_GET["id"]."");
}else{
	$Rs = mysqli_query($conn, "update ".$_GET["ne"]." set s14='".$puan["s14"]."', s15='".$puan["s15"]."' where id=".$_GET["id"]."");
}
$ortalama = $puan["s14"]/$puan["s15"];
$genislet = $ortalama * 25;
$ortalama = $ortalama;
$genislet = $genislet;
?>
<link href="css/alt_star_rating.css" rel="stylesheet" type="text/css" media="all">
<script src="js/xmlhttp.js" type="text/javascript"></script>
<script src="js/rating.js" type="text/javascript"></script>
<!-- OYLAMA ALANI -->
<div id="rating" <?php if($_COOKIE[$id]<>""){?>style="display:none"<?php }else{?>style="display:block"<?php }?>>
	<ul class='star-rating'>
		<li class='current-rating' style='width:<?php echo $genislet;?>px;'>Currently 3.5/5 Stars.</li>
		<li><a href="#" onclick="return xmlPost('islem.php?ne=<?php echo $_GET["ne"];?>&id=<?php echo $_GET["id"];?>&oy=1','xmlspan');" class='one-star'>1</a></li>
		<li><a href="#" onclick="return xmlPost('islem.php?ne=<?php echo $_GET["ne"];?>&id=<?php echo $_GET["id"];?>&oy=2','xmlspan');" class='two-stars'>2</a></li>
		<li><a href="#" onclick="return xmlPost('islem.php?ne=<?php echo $_GET["ne"];?>&id=<?php echo $_GET["id"];?>&oy=3','xmlspan');" class='three-stars'>3</a></li>
		<li><a href="#" onclick="return xmlPost('islem.php?ne=<?php echo $_GET["ne"];?>&id=<?php echo $_GET["id"];?>&oy=4','xmlspan');" class='four-stars'>4</a></li>
		<li><a href="#" onclick="return xmlPost('islem.php?ne=<?php echo $_GET["ne"];?>&id=<?php echo $_GET["id"];?>&oy=5','xmlspan');" class='five-stars'>5</a></li>
	</ul>
</div>
<div id="loading" style="display:none; font-size:9px; font-family:arial;"></div>
<!-- OYLAMA BITTI -->
<!-- OYLAMA SONUCU -->
<div id="ratings" <?php if($_COOKIE[$id]==""){?>style="display:none"<?php }else{?>style="display:block"<?php }?>>
	<ul title='<?php echo $puan["s15"];?> Oy! - <?php echo $ortalama;?>/5.0'  class='star-rating'>
		<li class='current-rating' style='width:<?php echo $genislet;?>px;'>Currently 3.5/5 Stars.</li>
		<li><strong class='one-star'></strong></li>
		<li><strong class='two-stars'></strong></li>
		<li><strong class='three-stars'></strong></li>
		<li><strong class='four-stars'></strong></li>
		<li><strong class='five-stars'></strong></li>
		<li></li>
	</ul>
</div>
<span id="xmlspan" style="display:none; font-size:11px; font-family:arial;"></span>