<?php
/*
		[FuShow.cn] (C) 2013-2014 HXWY Inc.
		FuShow Friend V3.0				Id: cleanfeed.php
		Email <service@fushow.cn>		http://fushow.cn/
*/

if(!defined('IN_FUSHOW')) {
	exit('Access Denied');
}

//清理feed
if($_SCONFIG['feedday'] < 3) $_SCONFIG['feedday'] = 3;
$deltime = $_SGLOBAL['timestamp'] - $_SCONFIG['feedday']*3600*24;
$f_deltime = $_SGLOBAL['timestamp'] - 3*3600*24;//应用动态

//执行
$_SGLOBAL['db']->query("DELETE FROM ".tname('feed')." WHERE (dateline < '$deltime' AND hot=0) OR (dateline < '$f_deltime' AND appid=0)");
$_SGLOBAL['db']->query("OPTIMIZE TABLE ".tname('feed'), 'SILENT');//优化表


?>