<?php
/**
 * 每晚10点以后
 * 用于执行竞投房源所需要的等级
 * 竞投结束后的处理执行此脚本 
 */
$conf_basedir = "../../../../"; //相对主目录的位置
define('WEB_ROOT', $conf_basedir);
$conf_where = "admin"; //选择调用相应模块
$directory = basename(dirname(__FILE__)); //定义当前所在的目录，引入模块公用函数
include_once(  "./base.inc.php");
require_once '../function_crontab.php';
$periods = $bidPeriods->currentBidPeriods(2);
if ($periods&&$periods['status']==2) {
    $growthBidStartSetting = new GrowthBidStartSetting();
    $data_info = $growthBidStartSetting->getData();
    $bidHouseBlockLevel = '';
    $bidHouseHotSearchLevel = '';
    if ($data_info) {
        foreach($data_info as $v) {
            if ($v['way_alias'] == 'bidHouseBlockWord') {
                $bidHouseBlockLevel = $v['levelnames'];
            }
            if ($v['way_alias'] == 'bidHouseMarketWord') {
                $bidHouseHotSearchLevel = $v['levelnames'];
            }
        }
        $growthBidHouseLevel = new GrowthBidHouseLevel();
        $updateBlockStatus = $growthBidHouseLevel->updateBlockLevel($bidHouseBlockLevel);
        $updateHotSearchStatus = $growthBidHouseLevel->updateHotSearchLevel($bidHouseHotSearchLevel);
        if($growthBidHouseLevel && $updateHotSearchStatus) {
            echo '竞投房源所需要的等级成功';
        }
    }
}