<?php
/* ====================
  [BEGIN_COT_EXT]
  Hooks=market.list.loop
  [END_COT_EXT]
  ==================== */

defined('COT_CODE') or die('Wrong URL.');

if($ads_positions_special['market_bold'] > 0) {
  $ad_bold = array('item_id' => 0);
  if($item['item_id'] > 0) $ad_bold = $db->query("SELECT * FROM $db_ads WHERE item_marketid=".$item['item_id']." AND item_paused=0 AND item_expire>=".(int)$sys['now']." AND item_position=".$ads_positions_special['market_bold'].(!empty($adswhere_boldANDup) ? " AND ".$adswhere_boldANDup : '')." LIMIT 1")->fetch();
  $t->assign("PRD_ROW_ADSBOLD", ($ad_bold['item_id'] > 0 ? 1 : 0));
  if($ad_bold['item_id'] > 0 && $usr['id'] != $item['item_userid']) {
    $t->assign('PRD_ROW_URL', cot_url('plug', 'e=ads&a=click&id='.$ad_bold['item_id'].'&c='.$c));
    ads_tracks($ad_bold['item_id'], 'show');
  }
}