<?php
/* ====================
  [BEGIN_COT_EXT]
  Hooks=header.main
  [END_COT_EXT]
  ==================== */

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

require_once cot_incfile('ads', 'plug');

$out['ads_myitems_cnt'] = 0;
if($usr['id'] > 0 && !empty($db_ads)) {
  $out['ads_myitems_cnt'] = $db->query("SELECT COUNT(*) FROM $db_ads WHERE item_userid=".$usr['id'])->fetchColumn();
}