<?php
  /**
   * Recently Viewd Items
   *
   * @package Digital Downloads Pro
   * @author wojoscripts.com
   * @copyright 2010
   * @version $Id: recent.php, v2.00 2011-07-10 10:12:05 gewa Exp $
   */
  if (!defined("_VALID_PHP"))
      die('. دسترسی مستقیم به این محل مجاز نمی باشد');
	  
  $recentrow = $item->renderRecentViews();
?>
<?php if($recentrow):?>
<!-- Start Most Recent-->
  <div class="sidebar">
    <div class="inner">
      <h4><img src="<?php echo SITEURL; ?>/images/recent-icon.png" alt=""  />محصـولات بازدیـد شـده اخیـر</h4>
      <div class="content">
      <ul class="alt-li">
      <?php foreach ($recentrow as $rsrow):?>
      <?php $url = ($core->seo) ? $core->site_url . '/view-item/' . intval($rsrow['pid']) . '/' . sanitize($rsrow['slug']) . '.html' : $core->site_url . '/item.php?pid=' . intval($rsrow['pid']);?>
      <li><a href="<?php echo $url;?>"><?php echo $rsrow['title'];?></a></li>
      <?php endforeach;?>
      </ul>
      </div>
    </div>
  </div>
<?php endif;?>
<!-- End Most Recent/-->