<?php
  /**
   * Product
   *
   * @package Digital Downloads Pro
   * @author wojoscripts.com
   * @copyright 2010
   * @version $Id: item.php, v2.00 2011-07-10 10:12:05 gewa Exp $
   */
  define("_VALID_PHP", true);
  require_once("init.php");
  
  $row = $item->renderItem();
?>
<?php include("header.php");?>
      <!-- Start Product-->
      <?php if(!$row):?>
      <?php $core->msgInfo('<span>!تـوجـه</span>..صفحـه مورد نظـر شمـا يافـت نشـد<br />. لطفـا آدرس وارد شـده را بررسی نمـوده و يا  به صفحـه اصـلـی رفتـه و دوباره سعی نمائيـد',false);?>
      <?php else:?>
      <h2><em><?php echo $row['title'];?></em></h2>
      <div id="single-item">
        <div id="itemshow">
          <div class="leftblock">
            <?php include( BASEPATH . "plugins/cart.php");?>
            <?php include( BASEPATH . "plugins/bestseller.php");?>
            <?php include( BASEPATH . "plugins/popular.php");?>
            <?php include( BASEPATH . "plugins/tags.php");?>
            <?php include( BASEPATH . "plugins/recent.php");?>
          </div>
          <div class="rightblock">
            <?php $thumb = ($row['thumb']) ? PRODIMGURL . 'thumbs/' . $row['thumb'] : UPLOADURL . 'blank.png';?>
            <?php $img = ($row['thumb']) ? PRODIMGURL  . $row['thumb'] : UPLOADURL . 'blank.png';?>
            <?php $curl = ($core->seo) ? $core->site_url . '/category/' . intval($row['cid']) . '/' . sanitize($row['cslug']) . '.html' : $core->site_url . '/category.php?cid=' . intval($row['cid']);?>
            <?php $status = ($row['price'] == 0) ? '<a href="'.SITEURL.'/download.php?fid='.$row['pid'].'" class="download-small">دانـلــود</a>' : '<a href="javascript:void(0);" class="add-to-cart" id="item_'.$row['pid'].'">اضـافـه بـه سبـد خـریـد</a>';?>
            <span class="thumb flright"><a href="<?php echo $img;?>" rel="single" class="pirobox" title="<?php echo $row['title'];?>"><img src="<?php echo $thumb;?>" alt="" align="left"/></a></span>
            <div class="toolbar">
              <ul>
                <li style="float:left"><?php $item->getVoting($row['vote_up'], $row['vote_down']);?></li>
                <li style="float:left"><?php $item->getRating($row['rating']);?></li>
                <li><img src="<?php echo SITEURL; ?>/images/calendar.png" alt="" class="tooltip" title="ایـجـاد شـده"/><?php echo $row['cdate'];?></li>
                <li><img src="<?php echo SITEURL; ?>/images/hits.png" alt="" class="tooltip" title="بـازدیـد شـده"/><?php echo $row['hits'];?></li>
              </ul>
              <br clear="none" />
            </div>
            <div class="none"></div>
            <div class="pricebox shadow"><h4><?php echo $core->formatMoney($row['price']);?></h4>
            <?php echo $status;?></div>
            <?php echo cleanOut($row['body']);?>
            <div class="moreinfo">
			<?php if($row['youtube']):?><span><a href="http://www.youtube-nocookie.com/v/<?php echo $row['youtube'];?>" rel="iframe-640-480"  class="pirobox" title="You tube ">Youtube</a></span><?php endif;?>
            <?php if($row['audio']):?><span>
                 <object type="application/x-shockwave-flash" data="<?php echo SITEURL; ?>/assets/dewplayer-vol.swf?mp3=<?php echo UPLOADURL;?>prod_audio/<?php echo $row['audio'];?>" width="240" height="20" id="dewplayer-vol">                   <param name="wmode" value="transparent" />
                   <param name="movie" value="<?php echo SITEURL; ?>/assets/dewplayer-vol.swf?mp3=<?php echo UPLOADURL;?>prod_audio/<?php echo $row['audio'];?>" />
                </object>
            </span><?php endif;?>
             <a href="<?php echo $curl;?>"><?php echo $row['name'];?></a> &laquo; دسـته بنـدی &nbsp; </div>
            <hr />
            <?php include(BASEPATH . "plugins/gallery.php");?>
            <?php include(BASEPATH . "plugins/comments/main.php");?>
          </div>
        </div>
        <div class="clear"></div>
      </div>
<?php endif;?>
<!-- End Product/-->
<?php include("footer.php");?>