Tutaj jest skrypt, który chyba odpowiada za wyświetlanie tych informacji w tym module i nie wiem, co zrobić aby uzyskać porządany efekt. Dzięki z góry jeśli ktoś ma pomysł.
<?php /* paFileDB 3.0 Š2001/2002 PHP Arena Written by Todd todd@phparena.net Keep all copyright links on the script visible Please read the license included with this script for more information. */ { } $locbar = '<span class="nav"><a href="' . append_sid("index.$phpEx") . '" class="nav">' . $board_config['sitename'] . '</a> -> <a href="' . append_sid("dload.php") . '" class="nav">Download</a> -> <a href="' . append_sid("dload.php?action=stats") . '" class="nav">' . $lang['Statistics'] . '</a></span>'; $sql = "SELECT COUNT(*) as files FROM " . PA_FILES_TABLE; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $num['files'] = $row['files']; [color="#ff0000"]Tutaj się chyba zaczyna skrypt akurat odpowiedzialny za wyświetlanie ostatnio dodane
go pliku.[/color] $sql = "SELECT * FROM " . PA_FILES_TABLE . " ORDER BY file_time DESC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $newest = $db->sql_fetchrow($result); $sql = "SELECT * FROM " . PA_FILES_TABLE . " ORDER BY file_time ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $oldest = $db->sql_fetchrow($result); $sql = "SELECT * FROM " . PA_FILES_TABLE . " WHERE file_totalvotes > 1 ORDER BY (file_rating/(file_totalvotes-1)) DESC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $popular = $db->sql_fetchrow($result); $sql = "SELECT * FROM " . PA_FILES_TABLE . " ORDER BY (file_rating/file_totalvotes) ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $lpopular = $db->sql_fetchrow($result); $sql = "SELECT * FROM " . PA_FILES_TABLE . " ORDER BY file_dls DESC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $mostdl = $db->sql_fetchrow($result); $sql = "SELECT * FROM " . PA_FILES_TABLE . " ORDER BY file_dls ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } $leastdl = $db->sql_fetchrow($result); $sql = "SELECT file_dls, file_rating, file_totalvotes FROM " . PA_FILES_TABLE; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Couldnt Query stat info', '', __LINE__, __FILE__, $sql); } while($row = $db->sql_fetchrow($result)) { $totaldls += $row['file_dls']; $total_rating += $row['file_rating']; $total_votes += $row['file_totalvotes']; } require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_pafiledb.' . $phpEx); $lang['Stats_portal'] = str_replace("{u_newest_file}", append_sid("dload.php?action=file&id=" . $newest['file_id']), $lang['Stats_portal']); $lang['Stats_portal'] = str_replace("{u_oldest_file}", append_sid("dload.php?action=file&id=" . $oldest['file_id']), $lang['Stats_portal']); $lang['Stats_portal'] = str_replace("{u_popular}", append_sid("dload.php?action=file&id=" . $popular['file_id']), $lang['Stats_portal']); $lang['Stats_portal'] = str_replace("{u_lpopular}", append_sid("dload.php?action=file&id=" . $lpopular['file_id']), $lang['Stats_portal']); $lang['Stats_portal'] = str_replace("{u_most_dl}", append_sid("dload.php?action=file&id=" . $mostdl['file_id']), $lang['Stats_portal']); $lang['Stats_portal'] = str_replace("{u_least_dl}", append_sid("dload.php?action=file&id=" . $leastdl['file_id']), $lang['Stats_portal']); "L_STATISTICS" => $lang['Statistics'], "Stats_portal" => $lang['Stats_portal'], // "LOCBAR" => locbar($locbar) ) ); ?>