This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!

Decode for hackscript@wordpress.org

By: johnburn on Jan 1st, 2012  |  syntax: PHP  |  size: 2.93 KB  |  views: 98  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div class="pic5" onmouseover="this.className='pic5a'" onmouseout="this.className='pic5'">
  2. <div class="producttitle">
  3. <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
  4. <?php
  5. $the_title = $post->post_title;
  6. $getlength = strlen($the_title);
  7. $thelength = 35;
  8. echo substr($the_title, 0, $thelength);
  9. if ($getlength > $thelength);
  10. ?>
  11. </a></h2></div>
  12. <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(); ?>&amp;w=150&amp;h=160&amp;zc=2&amp;q=100" alt="<?php the_title(); ?>"  width="150" height="160" /></a>
  13.  
  14. <div class="views">
  15. price :  <?php echo get_theme_option('amazon_currency');
  16. if (get_post_meta($post->ID, 'list_price', $single = true) != '') {
  17.     $listprice = get_post_meta($post->ID, 'list_price', $single = true);
  18.     $cur = array("$", 'EUR', '&#36;', '&#163;', '&#8355;', '&#128;');
  19.     $listprice = str_replace($cur, '', $listprice);
  20.     echo $listprice;
  21. } else {
  22.     echo get_post_meta($post->ID, 'price', $single = true);
  23. }
  24. ?>
  25. </div>  
  26. <div style="clear: both"></div>
  27.  
  28. <div class="rate">
  29. <?php echo get_theme_option('amazon_currency');
  30. if (get_post_meta($post->ID, 'price', $single = true) != '') {
  31.     $price = get_post_meta($post->ID, 'price', $single = true);
  32.     $cur = array("$", 'EUR', '&#36;', '&#163;', '&#8355;', '&#128;');
  33.     $price = str_replace($cur, '', $price);
  34.     echo $price;
  35. } else {
  36.     echo get_post_meta($post->ID, 'list_price', $single = true);
  37. }
  38. ?>
  39.  </div>
  40. save : <?php echo get_theme_option('amazon_currency');
  41. if (get_post_meta($post->ID, 'list_price', $single = true) != '') {
  42.     $listprice = get_post_meta($post->ID, 'list_price', $single = true);
  43.     $cur = array("$", 'EUR', '&#36;', '&#163;', '&#8355;', '&#128;');
  44.     $listprice = str_replace($cur, '', $listprice);
  45.     settype($listprice, 'double');
  46.     $price = get_post_meta($post->ID, 'price', $single = true);
  47.     $cur = array("$", 'EUR', '&#36;', '&#163;', '&#8355;', '&#128;');
  48.     $price = str_replace($cur, '', $price);
  49.     settype($price, 'double');
  50.     $hasil = $listprice - $price;
  51.     if ($listprice < 1) {
  52.         $save = $hasil / $hasil;
  53.         $persen = $save * 100;
  54.         settype($persen, 'integer');
  55.         echo ('0(0');
  56.         echo ('%');
  57.         echo ')';
  58.     } elseif ($price < 1) {
  59.         $save = $hasil / $hasil;
  60.         $persen = $save * 100;
  61.         settype($persen, 'integer');
  62.         echo ('0(0');
  63.         echo ('%');
  64.         echo ')';
  65.     } else {
  66.         $save = $hasil / $listprice;
  67.         $persen = $save * 100;
  68.         settype($persen, 'integer');
  69.         echo $hasil;
  70.         echo ('(');
  71.         echo $persen;
  72.         echo ('%');
  73.         echo ')';
  74.     }
  75. }
  76. ?>
  77. <div class="clear"></div>
  78. <div class="readmore"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">Details</a>   </div>
  79. <div style="clear: both"></div>
  80. </div>
clone this paste RAW Paste Data