"; } else { $content = "\n"; } $sql = "SELECT game_id FROM ".$prefix."_bbgames"; $total_games = $db->sql_numrows($db->sql_query($sql)); $recent_scores = ($total_games > $highscore_limit) ? $highscore_limit : $total_games; if ($top) { $sql = "SELECT arcade_catid FROM ".$prefix."_bbarcade_categories"; $total_cats = $db->sql_numrows($db->sql_query($sql)); $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; //Random Game $sql = "SELECT g.* , u.username FROM ".$prefix."_bbgames g, ".$prefix."_users u WHERE g.game_highuser = u.user_id ORDER BY rand() LIMIT 1"; $row = $db->sql_fetchrow($db->sql_query($sql)); $randomUser = $row['username']; $row['game_highscore'] = number_format($row['game_highscore']); $content .= "\n"; $content .= "\n"; $content .= "
"._TOPGAMERS.""._ARCRAND.""._ARCNEW."
\n"; $sql = "SELECT COUNT(*) AS nbvictoires, g.game_highuser, u.user_id, u.username, u.user_level FROM ".$prefix."_bbgames g, ".$prefix."_users u WHERE g.game_highuser = u.user_id AND g.game_highuser <> 0 GROUP BY g.game_highuser ORDER BY nbvictoires DESC"; $result = $db->sql_query($sql); $place = 0; $nbvictprec = 0; while ($row = $db->sql_fetchrow($result)) { if ($nbvictprec <> $row['nbvictoires']) { $nbvictprec = $row['nbvictoires']; } $place++; $lastUser = $row['username']; $row['username'] = '' . $row['username'] . ''; $content .= "$place - \n"; $content .= "\""._ARCJMP." \n"; $content .= "".$row['username']." \n"; $content .= "
"._VICTOIRES." $nbvictprec

\n"; $count = $count + 1; } $content .= "
".$row['game_name']."
\"".$row['game_name']."\"
"._ARCLATEST."
\""._ARCJMP." $randomUser
"._ARCWITH." ".$row['game_highscore']."

"._ARCTOT." $total_games
"._ARCIN." $total_cats "._ARCCAT.".
\n"; $content .= "
\n"; $sql = "SELECT game_name, game_id, game_pic FROM ".$prefix."_bbgames ORDER BY game_order DESC LIMIT 0,$recent_scores"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $lastGame = $row['game_name']; $lastgameid = $row['game_id']; $lastgamepic = $row['game_pic']; $content .= "\"$lastGame\"
$lastGame


\n"; } $content .= "
\n"; } if ($last_five) { $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $place = 0; $sql = "SELECT g.* , u.username FROM ".$prefix."_bbgames g, ".$prefix."_users u WHERE g.game_highuser = u.user_id ORDER BY game_highdate DESC LIMIT 0,$recent_scores"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $lastUser = $row['username']; $row['game_highscore'] = number_format($row['game_highscore']); $lasthighdate = date("D M d, Y g:i a" , $row['game_highdate']); $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; } $content .= "
"._ARCLATEST2."
"._ARCUSER.""._ARCSCORE.""._ARCGAME.""._ARCDATE."
\"Jump$lastUser ".$row['game_highscore']."  \"".$row['game_name']."\" - ".$row['game_name']."$lasthighdate
\n"; } if ($arcade_stats) { $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; //Most Played Game $sql = "SELECT game_set, game_name, game_id FROM ".$prefix."_bbgames ORDER BY game_set DESC LIMIT 1"; $row = $db->sql_fetchrow($db->sql_query($sql)); $content .= "\n"; $content .= "\n"; //Least Played Game $sql = "SELECT game_set, game_name, game_id FROM ".$prefix."_bbgames ORDER BY game_set ASC LIMIT 1"; $row = $db->sql_fetchrow($db->sql_query($sql)); $content .= "\n"; $content .= "\n"; //Category Stats $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "
"._ARCSTATS."
"._ARCMOST.": ".$row['game_name']." "._ARCWITH." ".$row['game_set']." "._ARCPLAYS."."._ARCLEAST.": ".$row['game_name']." "._ARCWITH." ".$row['game_set']." "._ARCPLAYS.".
\n"; $sql = "SELECT arcade_cattitle, arcade_nbelmt, arcade_catid FROM ".$prefix."_bbarcade_categories ORDER BY arcade_cattitle"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $content .="\n"; $content .="".$row['arcade_cattitle']." (".$row['arcade_nbelmt']." "._ARCGAMES.")\n"; $content .="   \n"; } $content .= "
\n"; } if ($whos_playing) { $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; $sql = "SELECT u.username, u.user_id, u.user_level, user_allow_viewonline, g.game_name, g.game_id FROM ".$prefix."_bbgamehash gh LEFT JOIN ".$prefix."_bbsessions s ON gh.user_id = s.session_user_id LEFT JOIN ".$prefix."_users u ON gh.user_id = u.user_id LEFT JOIN ".$prefix."_bbgames g ON gh.game_id = g.game_id WHERE gh.hash_date >= s.session_time AND (" . time() . "- gh.hash_date <= 300) ORDER BY gh.hash_date DESC"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $players[] = $row; } $nbplayers = count($players); $listeid = array(); $games_players = array(); $games_names = array(); if ($nbplayers != 0) { $content .="\n"; $content .="\n"; $content .="\n"; for ($i=0 ; $i<$nbplayers ; $i++) { if (!isset($listeid[ $players[$i]['user_id'] ])) { $listeid[ $players[$i]['user_id'] ] = true ; if ($players[$i]['user_allow_viewonline']) { $player_link = '' . $players[$i]['username'] . ''; } else { $player_link = '' . $players[$i]['username'] . ''; } if ($players[$i]['user_allow_viewonline'] || $userdata['user_level'] == 2) { if(!isset($games_names[ $players[$i]['game_id'] ])) { $games_names[ $players[$i]['game_id'] ] = $players[$i]['game_name'] ; $games_players[ $players[$i]['game_id'] ] = $player_link ; } else { $games_players[ $players[$i]['game_id'] ] .= ', ' . $player_link ; } } } } foreach($games_names AS $key => $val) { //@RJR-Pwmg@Rncvkpwo@-@Eqratkijv@(e)@VgejIHZ.eqo if ($games_players[$key]!='') { $content .= "\n"; $content .= "\n"; $content .= "\n"; $content .= "\n"; } } $content .= "
"._ARCWHO."
"._ARCGAME.""._ARCUSERS."
$val" .$games_players[$key]. "
"; } else { $content .=""._ARCNOCURR."\n"; $content .= "\n"; } } ?>