<?php

/* ====================
  [BEGIN_COT_EXT]
  Hooks=banlist.admin.update.urrlist,banlist.admin.add.urrlist
  [END_COT_EXT]
  ==================== */

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

if($urr['user_id'] > 0 && cot_import('nblock_market_seller', 'P', 'BOL')) {
  require_once cot_incfile('market', 'module');

  $sqlmrkt = $db->query("SELECT * FROM $db_market WHERE item_state=0 AND item_userid=".$urr['user_id'])->fetchAll();
  foreach($sqlmrkt as $item) {
    $ritem = array();
    $ritem['item_state'] = 1;
    $db->update($db_market, $ritem, 'item_id = ?', $item['item_id']);

    cot_market_sync($item['item_cat']);
  }
  $db->update($db_users, array('user_workstatus' => $sys['now']), 'user_id='.$urr['user_id']);
}