<div class="pic5" onmouseover="this.className='pic5a'" onmouseout="this.className='pic5'">
<div class="producttitle">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php
$the_title = $post->post_title;
$getlength = strlen($the_title);
$thelength = 35;
echo substr($the_title, 0, $thelength);
if ($getlength > $thelength);
?>
</a></h2></div>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_freestyle_image(); ?>&w=150&h=160&zc=2&q=100" alt="<?php the_title(); ?>" width="150" height="160" /></a>
<div class="views">
price : <?php echo get_theme_option('amazon_currency');
if (get_post_meta($post->ID, 'list_price', $single = true) != '') {
$listprice = get_post_meta($post->ID, 'list_price', $single = true);
$cur = array("$", 'EUR', '$', '£', '₣', '€');
$listprice = str_replace($cur, '', $listprice);
echo $listprice;
} else {
echo get_post_meta($post->ID, 'price', $single = true);
}
?>
</div>
<div style="clear: both"></div>
<div class="rate">
<?php echo get_theme_option('amazon_currency');
if (get_post_meta($post->ID, 'price', $single = true) != '') {
$price = get_post_meta($post->ID, 'price', $single = true);
$cur = array("$", 'EUR', '$', '£', '₣', '€');
$price = str_replace($cur, '', $price);
echo $price;
} else {
echo get_post_meta($post->ID, 'list_price', $single = true);
}
?>
</div>
save : <?php echo get_theme_option('amazon_currency');
if (get_post_meta($post->ID, 'list_price', $single = true) != '') {
$listprice = get_post_meta($post->ID, 'list_price', $single = true);
$cur = array("$", 'EUR', '$', '£', '₣', '€');
$listprice = str_replace($cur, '', $listprice);
settype($listprice, 'double');
$price = get_post_meta($post->ID, 'price', $single = true);
$cur = array("$", 'EUR', '$', '£', '₣', '€');
$price = str_replace($cur, '', $price);
settype($price, 'double');
$hasil = $listprice - $price;
if ($listprice < 1) {
$save = $hasil / $hasil;
$persen = $save * 100;
settype($persen, 'integer');
echo ('0(0');
echo ('%');
echo ')';
} elseif ($price < 1) {
$save = $hasil / $hasil;
$persen = $save * 100;
settype($persen, 'integer');
echo ('0(0');
echo ('%');
echo ')';
} else {
$save = $hasil / $listprice;
$persen = $save * 100;
settype($persen, 'integer');
echo $hasil;
echo ('(');
echo $persen;
echo ('%');
echo ')';
}
}
?>
<div class="clear"></div>
<div class="readmore"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">Details</a> </div>
<div style="clear: both"></div>
</div>