<?php

define('InShopNC',true);
defined('InShopNC') or exit('Access Invalid!');

require_once (BASE_DATA_PATH . '/api/taobao/TopSdk.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/TopClient.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/ResultSet.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/RequestCheckUtil.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/TopLogger.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/SpiUtils.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/ApplicationVar.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/HttpdnsGetRequest.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/request/ItemSellerGetRequest.php');
require_once (BASE_DATA_PATH . '/api/taobao/top/request/ItemsOnsaleGetRequest.php');

require_once (BASE_CRONTAB_PATH . '/crawl/fetch_config.php');
require_once (BASE_CRONTAB_PATH . '/crawl/product_importer.php');
require_once (BASE_CRONTAB_PATH . '/crawl/category.php');
require_once (BASE_CRONTAB_PATH . '/crawl/tmrequest.php');
require_once (BASE_CRONTAB_PATH . '/crawl/page_request.php');
require_once (BASE_CRONTAB_PATH . '/crawl/class_tree.php');
require_once (BASE_CRONTAB_PATH . '/crawl/pretreat_tmdata.php');
require_once (BASE_CRONTAB_PATH . '/crawl/spec_attr.php');
require_once (BASE_CRONTAB_PATH . '/crawl/spec_attr_parser.php');
require_once (BASE_CRONTAB_PATH . '/crawl/upload_file.php');
require_once (BASE_CRONTAB_PATH . '/crawl/upload_control.php');
require_once (BASE_CRONTAB_PATH . '/crawl/tm_pagereq.php');
require_once(BASE_CRONTAB_PATH . '/crawl/brand_operator.php');
require_once(BASE_CRONTAB_PATH . '/crawl/importer_check.php');
require_once(BASE_CRONTAB_PATH . '/crawl/body_filter.php');





//require_once (BASE_CORE_PATH . '/framework/libraries/uploadfile.php');
//require_once (BASE_CRONTAB_PATH . '/crawl/skumatcher.php');


date_default_timezone_set('Asia/Shanghai');

function is_excids($cid)
{
    //50023728 赠品
    //50023725 邮费
    //50025832 搭配商品
    static $cids = array(50023725,50023728,50025832,121284001,50011150);
    return in_array($cid,$cids);
}

function not_null($str)
{
    return (empty($str)) ? '' : $str;
}

$tmreq = new tmrequest();
$tmreq->proc();



$cat = new category();
$cat->proc();

$treater = new pretreat_tmdata();
$treater->proc(false);


$spec = new spec_attr_parser();
$spec->proc();

$importer = new product_importer();
$importer->proc_shop();

$brander = new brand_operator();
$brander->create();
$brander->update_brand();

$ichecker = new importer_check();
$ichecker->proc();

//$filter = new body_filder();
//$filter->fillbody();
//$filter->proc();
