umit06umit 24.09.2007, 12:26
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$max_members = 10;
$max_days = 1;
$begin_time = time() - (86400 * $max_days);
$sql = "SELECT count(u.user_id) AS post_rank, p.poster_id, p.post_time, p.post_username, u.user_id, u.username
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_time > $begin_time
AND u.user_id = p.poster_id
GROUP BY p.poster_id, u.username
ORDER BY post_rank DESC
LIMIT $max_members";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain today\'s top poster information', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$post_rank = $row[post_rank];
$topic_author = ( $row['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $row['user_id']) . '">' : '';
$topic_author .= ( $row['user_id'] != ANONYMOUS ) ? $row['username'] : ( ( $row['post_username'] != '' ) ? $row['post_username'] : $lang['Guest'] );
$topic_author .= ( $row['user_id'] != ANONYMOUS ) ? '</a> (' : ' ';
$topic_author .= ( $row['user_id'] != ANONYMOUS ) ? $post_rank : 0;
echo "$topic_author)<br />";
}
$db->sql_freeresult($result);
?>
bu kodları
yazarlar.php
olarak kaydedip cagırdıgımızda oluyor yanlız bunu ezportala nasıl uygularız
yapabilecek var mı?