Любімая пара года. Восень

RSS Feed
<?php global $draw_sun; unset($content); $time = strtotime("-1 day"); $limit1 = strtotime(date("Y-m-d", $time)); $limit2 = strtotime(date("Y-m-d", time())); $result = db_query("SELECT content_id, sum(value) as votes FROM {votingapi_vote} WHERE timestamp between %d and %d GROUP BY 1 ORDER BY 2 DESC LIMIT 1", $limit1, $limit2); if (!($content = db_fetch_object($result))) { $result = db_query("SELECT content_id, sum(value) as votes FROM {votingapi_vote} WHERE timestamp < %d GROUP BY 1 ORDER BY 2 DESC LIMIT 1", $limit2); $content = db_fetch_object($result); } if (is_object($content) && $content->content_id > 0) { $node = node_load($content->content_id); $draw_sun = 1; print node_view($node); } ?> Popular Off-White