<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=marketorders.sales.loop
 * [END_COT_EXT]
 */
/**
 * Reviews plugin
 *
 * @package reviews
 * @version 2.1.0
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */
defined('COT_CODE') or die('Wrong URL.');

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

if($db->query("SELECT COUNT(*) FROM $db_reviews WHERE item_area='market' AND item_type='review' AND item_code='".$marketorder['order_id']."' AND item_userid=".$marketorder['order_userid']." AND item_status=0")->fetchColumn() > 0) {
  $msgcount++;
}

?>