= UNIX_TIMESTAMP(NOW()) - 86400
GROUP BY photo_id
ORDER BY view_count DESC
LIMIT 10;');
foreach ($photos as $pd) {
$photo = DB::query('SELECT * FROM photos WHERE id=:id', array(':id'=>$pd['photo_id']));
foreach ($photo as $p) {
$author = new User($p['user_id']);
echo '
';
}
}
?>
|
' . $p['place'] . '
' . Date::zmdate($p['posted_at']) . '
'; ?>
")'>
';
}
?>
' . $p['place'] . '
' . Date::zmdate($p['posted_at']) . '
'; ?>
")'>
Сейчас на сайте (=DB::query('SELECT COUNT(*) FROM users WHERE online>=:time-300 ORDER BY online DESC', array(':time'=>time()))[0]['COUNT(*)']?>)
=:time-300 ORDER BY online DESC', array(':time'=>time()));
foreach ($online as $o) {
echo ' '.$o['username'].', ';
}
?>
|