<div id="contact-page-wrapper">
<h1>Reviews</h1>
                
            
<?php
	$query = "Select * from reviews_store where approved ='1'";
	$rt=mysql_query($query);          // query executed 
	//echo mysql_error();                    // if any error is there that will be printed to the screen		
	if (mysql_num_rows($rt) == 0) {
		//not found, do nothing
		echo "<center>We're sorry, there are currently no reviews. Be the first to add a review!</center><br /><br />";
		
	} else {
		
		while($nt=mysql_fetch_array($rt)){
			$counter = 0;
			$stars="";
			while ($counter < $nt['rating']){
				$stars .="<img src='images/Feedback_red_star.png'>";
				$counter++;
			}
			echo "<div id='review-block'><div class='posted-review'><p>$nt[review]</p></div><div class='star-rating'>$stars<div style='font-size:.7em;'>$nt[dateposted]</div></div><hr /></div>";
		}
		echo "Add your own review below. ";
	}
	//include new review form
	
	include("custom/store_review.php");
	
			?>

            

           

</div><!--end contact page wrapper div -->