<?php

/*
	[Discuz!] (C)2001-2006 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$RCSfile: todayposts_daily.inc.php,v $
	$Revision: 1.3.10.1 $
	$Date: 2007/03/07 13:58:07 $
*/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
$query = $db->query("SELECT sum(todayposts) FROM {$tablepre}forums");
$yesterdayposts = $_DCACHE['settings']['yesterdayposts'] = intval($db->result($query, 0));
$db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('yesterdayposts', $yesterdayposts)");
$db->query("UPDATE {$tablepre}forums SET todayposts='0'");

?>