// New Member today, week, month
list($TMPL['member_today'], $TMPL['member_week'], $TMPL['member_month']) = $DB->fetch("SELECT
SUM(CASE WHEN DAY(join_date) = DAY(CURDATE()) AND MONTH(join_date) = MONTH(CURDATE()) AND YEAR(join_date) = YEAR(CURDATE()) THEN 1 ELSE 0 END),
SUM(CASE WHEN WEEK(join_date) = WEEK(CURDATE()) AND YEAR(join_date) = YEAR(CURDATE()) THEN 1 ELSE 0 END),
SUM(CASE WHEN MONTH(join_date) = MONTH(CURDATE()) AND YEAR(join_date) = YEAR(CURDATE()) THEN 1 ELSE 0 END)
FROM {$CONF['sql_prefix']}_sites WHERE active = 1", __FILE__, __LINE__);