<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=projects.tags
 * [END_COT_EXT]
 */

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

if($usr['id'] > 0 && $usercansendoffer == 'can') {
  if(!$db->query("SELECT COUNT(*) FROM $db_market WHERE item_userid=".$usr['id'].' AND item_state=0 AND item_cost>0 AND (item_cat="'.$onlythiscat.'" OR item_catattr="'.$onlythiscat.'")')->fetchColumn()) {
    $usercansendoffer = 'emptymarket';
  }
}