Location: PHPKode > scripts > Rating Star > rating-star/star_class.php
<?php 
/*******************************************************************************************************
* Devloper Name : Akhilesh Singh 																							
* Organization  : Seagal
* Email         : hide@address.com
* Class 		: For displaying rating star
********************************************************************************************************/

class star_class
{
	function show_star($star)
	{
	$star;
	list($int, $parse) = split('[.]', $star);
	$int;
	$parse;
	for ($i = 1; $i <= $int; $i++) 
	{
		$star_view .= "<IMG src=\"images/star.gif\">";
	}
	if($parse==5)
		{
		$star_view .= "<IMG src=\"images/halfstar.gif\">";
		$dim_star = 4-$int;
		}
	else{
		$star_view .= "";
		$dim_star = 5-$int;}
	$dim_star;
	if($dim_star!="")
	{
	for ($i = 1; $i <= $dim_star; $i++) 
	{
		$star_view .= "<IMG src=\"images/dimstar.gif\">";
	}
	}
	return $star_view;
	}
	
}
?>
Return current item: Rating Star