<?php
/**
 * 发布时间超过90天自动失效
 * 每天运行，可保证没有出现负数
 */
require('path.inc.php');

$now = time();
//自动下架7天以上未刷新的房源
$query->execute('update fke_housesell set status = 2,house_downtime='.$now.' where updated<'.($cfg['time']-604800).' and status = 1');
$query->execute('update fke_houserent set status = 2,house_downtime='.$now.' where updated<'.($cfg['time']-604800).' and status = 1 and broker_id <>0 ');

//删除90 天以上的房源
$query->execute('update fke_housesell set status = 3 where created<'.($cfg['time']-15552000));
$query->execute('update fke_houserent set status = 3 where created<'.($cfg['time']-15552000));

echo "180天房源失效更新完成";



?>