<?php
	function show_stars($stars) {
		$float_val = abs(floor($stars) - $stars);
		$stars = floor($stars);
		for ($i=1;$i<=$stars;$i++) {
			echo "<i class='fa fa-star' style='color:#ffc107'></i>";
		}
		$next_start = $stars+1;
		if ($float_val>=0.3&&$float_val<=0.7) {
			echo "<i class='fa fa-star-half-o' style='color:#ffc107'></i>";
			$next_start = $stars+2;
		}
		for ($i=$next_start;$i<=5;$i++) {
			echo "<i class='fa fa-star-o' style='color:#ffc107'></i>";
		}
	}
?>
<?php 
	function show_review($review_row) {
?>
	<div class="product-tabbed" data-animate="fadeInUp" data-delay=".2">
		<div class="">
			<div class="">
				<div class="product__reviews">
				<div class="reviews__comment--area" style="margin-bottom:15px !important;padding-top:8px !important">
					<div class="reviews__comment--list d-flex">
						<div class="reviews__comment--thumbnail">
							<img src="images/by-deafult.png" alt="comment-thumbnail">
						</div>
						<div class="reviews__comment--content">
							<h4 class="reviews__comment--content__title">
								<?php echo ($review_row['review_name']) ?>
							</h4>
							<div class="client-reating">
								<?php echo show_stars($review_row['review_stars']) ?>
							</div>
							<p class="reviews__comment--content__desc reviwe-p">
								<i><?php echo htmlspecialchars($review_row['review_text']) ?></i>
							</p>
							<span class="reviews__comment--content__date">
								<?php echo date("F-d-Y", $review_row['review_time']);?>
							</span>
						</div>
					</div>
				</div>
				</div>
			</div>
		</div>
	</div>
	<hr class="cus-hr">
<?php
	}
?>