Вход в систему

Последние комментарии

Каталоги

Друзья

Хотите дружить? Пишите в обратную связь

Романтическое стихотворение дня

<?php
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", $limit1);
$content = db_fetch_object($result);
}
if (is_object($content) && $content->content_id > 0)
{
$node = node_load($content->content_id);
print node_view($node);
}
?>
AIr Jordan Outdoor Basketball Shoes