<?php
/*
  $Id: reviews.php,v 1.2 2006/07/16 05:09:36 ryu Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
  
  modified for Koshoten.net2
  http://www.koshoten.net/
*/
?>
<!-- reviewsList -->
<?php
  if (($reviews_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
<div class="listLink">
<p class="listCount"><?php echo $reviews_split->display_count($reviews_numrows, MAX_DISPLAY_NEW_REVIEWS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></p>
<p class="listPrevNext"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $reviews_split->display_links($reviews_numrows, MAX_DISPLAY_NEW_REVIEWS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
</div>
<?php
  }
  if (sizeof($reviews_array) < 1) {
?>
<p class="noData"><?php echo TEXT_NO_REVIEWS; ?></p>
<?php
  } else {
    for($i=0, $n=sizeof($reviews_array); $i<$n; $i++) {
?>
<h4><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews_array[$i]['products_id'] . '&reviews_id=' . $reviews_array[$i]['reviews_id']) . '"><span class="pName">' . $reviews_array[$i]['products_name'] . '</span></a>'; ?></h4>
<p class="text"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews_array[$i]['products_id'] . '&reviews_id=' . $reviews_array[$i]['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $reviews_array[$i]['products_image'], $reviews_array[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="image"') . '</a>'; ?>
<?php echo $reviews_array[$i]['review']; ?></p>
<div class="contentBoxFooter">
<p class="left"><?php echo sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews_array[$i]['rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews_array[$i]['rating'])), sprintf(TEXT_OF_5_STARS, $reviews_array[$i]['rating'])); ?></p>
<?php
    if ($reviews_array[$i]['authors_name']) {
?>
<p class="center"><?php echo sprintf(TEXT_REVIEW_BY, $reviews_array[$i]['authors_name']); ?></p>
<?php
    }
?>
<p class="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, $reviews_array[$i]['date_added']); ?></p>
</div>
<?php
    }
  }
  if (($reviews_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
<div class="listLink">
<p class="listCount"><?php echo $reviews_split->display_count($reviews_numrows, MAX_DISPLAY_NEW_REVIEWS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></p>
<p class="listPrevNext"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $reviews_split->display_links($reviews_numrows, MAX_DISPLAY_NEW_REVIEWS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
</div>
<?php
  }
?>
<!-- /reviewsList -->
