// undocumented rich snippit, may user in future.. http://www.cigarinfo.com //?>
(=$reviewCount?> user review if ($reviewCount != 1) { print "s"; } ?>)
" . "\n";
// This is what prints if there are no reviews
if (!$reviews) {
print " There are no reviews for this cigar.";
// This is what prints if the user is loggedin
if($_SESSION['is_logged'] == true) {
print " Be the first one to write a review.";
?>
}
else {
// This is what prints if the user is not logged in
?>
If you would like to be the first one to review this cigar, please register and log in.
}
}
// This is what prints when there are reviews
else {
$reviewAlreadyCreated= false;
foreach($reviews as $id => $review) {
?>
";
}
// If the user is logged in and there are reviews
if($_SESSION['is_logged'] == true && !$reviewAlreadyCreated) {
?>
}
// If the user is not logged in, ask them to Register or login, regardless if there are reviews or not
elseif($_SESSION['is_logged'] == false){
?>
If you would like to review this cigar, please register or log in above if you have an existing membership.