<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<?php if ($product['image_url'] != '' && file_exists(ROOT_PATH . 'images/products/thumbnails/' . $product['image_url'])) { ?>
<?php } ?>
<td rowspan="5" valign="top" width="20%"><p><a href="/images/products/<?php echo $product['image_url']; ?>" target="_blank"><img src="/images/products/thumbnails/<?php echo $product['image_url']; ?>" border="0" alt="<?php echo $product['product_name']; ?>" title="<?php echo $product['product_name']; ?>" /><br />
Click to enlarge</a></p>
</td>
<?php } ?>
<td width="60%"><h1><?php echo $product['product_name']; ?></h1></td>
<td rowspan="5" valign="top" width="20%"><div class="main_box">
<h2>Rate Product</h2>
<form method="post" action="<?php echo get_url('/products/', $product['category_id'], $product['product_id'], $product['product_name']); ?>?action=rate">
<input type="hidden" name="info_id" value="<?php echo $product['product_id']; ?>" />
<select name="rating">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<input type="submit" name="submit" value="Go!" />
</form>
</div></td>
</tr>
<tr>
<td width="70%">Price: <?php echo get_price($product['price']); ?></td>
</tr>
<tr>
<td width="70%">Availability: <span class="important"><?php echo $product['stock'] > 0 ? 'Available' : 'Not Available'; ?></span></td>
</tr>
<tr>
<td width="70%">Rating: <?php echo $product['num_votes'] != 0 ? rating($product['rating'], $product['num_votes']) . ' (no. of votes: ' . $product['num_votes'] . ')' : 'Not Rated'; ?></td>
</tr>
<tr>
<td width="70%">Date Added: <?php echo gmdate($user_data['date_format'], $product['date_created'] + ($user_data['time_offset'] * 3600) + ($config['add_time'] * 3600)) . ' at ' . gmdate($user_data['time_format'], $product['date_created'] + ($user_data['time_offset'] * 3600) + ($config['add_time'] * 3600)); ?></td>
</tr>
<tr>
<td colspan="3"><?php echo check_output($product['content'], true, false, false); ?></td>
</tr>
</table>
<p align="center"><a href="/cart/index.htm?action=add_product&product_id=<?php echo $product['product_id']; ?>"><img src="<?php echo '/' . $config['image_path']; ?>button_cart_add.gif" border="0" alt="Add to Shopping Basket" title="Add to Shopping Basket" /></a></p>
<div>
<h2>Reviews</h2>
<?php $counter = 0; ?>
<?php foreach (get_reviews($product['product_id'], $page) as $review) { ?>
<?php echo $counter != 0 ? '<hr />' : ''; ?>
<?php echo $review['username']; ?> - <?php echo gmdate($user_data['date_format'], $review['date_created'] + ($user_data['time_offset'] * 3600) + ($config['add_time'] * 3600)) . ' at ' . gmdate($user_data['time_format'], $review['date_created'] + ($user_data['time_offset'] * 3600) + ($config['add_time'] * 3600)); ?><br />
<?php echo $review['review']; ?>
<?php $counter++; ?>
<?php } ?>
</div>
<?php echo multipage(get_num_reviews($product['product_id']), 15, $page, get_url('/products/', $product['category_id'], $product['product_id'], $product['product_name']) . '?page='); ?>
<br />
<br />
<form method="post" action="<?php echo get_url('/products/', $product['category_id'], $product['product_id'], $product['product_name']); ?>?action=review">
<input type="hidden" name="info_id" value="<?php echo $product['product_id']; ?>" />
<div class="main_box">
<h2>Review Product</h2>
<table border="0" cellpadding="3" cellspacing="1">
<tr>
<td valign="top">Review

/td>
<td><textarea name="review" cols="30" rows="5"></textarea></td>
</tr>
</table>
</div>
<p align="center"><input type="submit" name="submit" value="Submit Review" /></p>
</form>
Bookmarks