PHP-Nuke Titanium HQ
     
Design Wicked Inc.
PHP-Nuke Titanium v4.0.4 / PHP v8.2.17
Sponsor Tron for PHP-Nuke Titanium
::: There is so much more here to see, it takes 30 seconds to register an account and we don't even verify with e-mail! Just register we promise you won't be sorry... ::: Login or Register
IPHub is an IP lookup website featuring Proxy/VPN detection. A free API is available, so you can perform fraud checks on online stores, detect malicious players on online games and much more! Look at this! Click here Look at this! to sign up for FREE today at ipHub ::: Country Music: The Soul Circus Cowboys ::: Sponsor: Brandon Maintenance Management, LLC Phone: 813-846-2865 ::: Sponsor: Big Country Radio - The EJ Morning Show :::

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 276

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 276

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 268

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/includes/auth.php on line 328

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/modules/Forums/viewtopic.php on line 406

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/modules/Forums/viewtopic.php on line 536

Warning: Undefined array key "session_logged_in" in /home/dev4/public_html/modules/Forums/viewtopic.php on line 788

Warning: Undefined array key "session_id" in /home/dev4/public_html/includes/functions.php on line 1015

 
Recent Topics   Next 5 >>  
Forum Replies Last Post
Oh yes ! Now here is some Northern fried wierd shit! 💩
Started by RECTOR
PHP-Nuke Titanium - Modules (Root) 13 Thu Oct 26, 2023 5:33 pm
by Technocrat
What year is it!?
Started by Technocrat
PHP-Nuke Titanium - Community 0 Thu Oct 26, 2023 5:05 pm
by Technocrat
Dragonfly
Started by Critical
PHP-Nuke Titanium - Community 2 Thu Apr 20, 2023 6:50 am
by Critical
Can you PM me the private link to the PHP 9 Repo
Started by YuckFou
PHP-Nuke Titanium - PHP 1 Tue Apr 18, 2023 11:08 am
by CodeBuzzard
Your_Account Module question?
Started by CyBorg
PHP-Nuke Titanium - Modules (Root) 1 Thu Apr 06, 2023 7:39 am
by Negan

modules/Forums/arcade.php (Patched) 8.x
Post new topic Reply to topic printer-friendly view List users that have viewed this topic Thank Post   Forum Index phpBB Titanium - General
View previous topic View next topic
RECTOR Reply with quote
Developer
Joined Dec 12, 2022
Reputation: 8.9
votes: 2
online
modules/Forums/arcade.php (Patched) 8.x
by RECTOR Thu Dec 29, 2022 1:17 pm

Still seems to have a random bug on how much time a person has played games!

PHP:  [ Select all ]

if (!defined('MODULE_FILE')) {
    die(
'You can\'t access this file directly...');
}

if (!isset(
$popup)) :
  
$module_name basenamedirname__FILE__ ) );
  require( 
"modules/".$module_name."/nukebb.php" );
else :
  
$phpbb_root_path NUKE_FORUMS_DIR;
endif;

define('IN_PHPBB',true);

global 
$br$userinfo$currentlang;

$phpbb_root_path NUKE_FORUMS_DIR;

include(
$phpbb_root_path.'extension.inc');
include(
$phpbb_root_path.'common.'$phpEx );
require(
$phpbb_root_path.'gf_funcs/gen_funcs.'.$phpEx);

include(
'includes/constants.'.$phpEx);

$lang_path NUKE_MODULES_DIR $module_name '/language/';

if (
file_exists($lang_path 'lang-' $currentlang '.php'))
    include_once(
$lang_path 'lang-' $currentlang '.php');
elseif (
file_exists($lang_path 'lang-' $board_config['default_lang'] . '.php'))
    include_once(
$lang_path 'lang-' $board_config['default_lang'] . '.php');
else
    
DisplayError(_NO_ADMIN_MODULE_LANGUAGE_FOUND $module_name);
    
# Start session management
$userdata session_pagestart($user_ip,PAGE_ARCADES);
init_userprefs($userdata);
# End session management

include('includes/functions_arcade.'.$phpEx);

# Start auth check
if(!$userdata['session_logged_in']):
   
$header_location = (preg_match("#Microsoft|WebSTAR|Xitami#"getenv"SERVER_SOFTWARE" ))) ? "Refresh: 0; URL=" "Location: ";
   
header($header_location."modules.php?name=Your_Account");
   exit;
 endif;
# End of auth check

$arcade_catid get_var_gf(array('name' => 'cid','intval' => true));
$start get_var_gf(array('name' => 'start','intval' => true ));

$arcade_config = array();
$arcade_config read_arcade_config();

$liste_cat_auth get_arcade_categories($userinfo['user_id'], $userinfo['user_level'],'view');

if (empty(
$liste_cat_auth)) {
    
$liste_cat_auth "''";
}

$order_by '';

switch(
$arcade_config['game_order']):
  case 
'Alpha':
    
$order_by ' game_name ASC ';
    break;
  case 
'Popular':
    
$order_by ' game_set DESC ';
    break;
  case 
'Fixed':
    
$order_by ' game_order ASC ';
    break;
  case 
'Random':
    
$order_by ' RAND() ';
    break;
  case 
'News':
    
$order_by ' game_id DESC ';
    break;
  default:
    
$order_by ' game_order ASC ';
    break;
endswitch;

if(isset(
$_GET['favori'])):
    
    
$favori = (int) $_GET['favori'];

    
$sql "SELECT COUNT(*) AS `nbfav` FROM `".ARCADE_FAV_TABLE."` WHERE user_id =".$userinfo['user_id']." AND game_id=".$favori;
    
$result $db->sql_query($sql);
    
$row $db->sql_fetchrow($result);
    
$nbfav $row['nbfav'];

    if(!
$nbfav && $favori):
      
$sql "REPLACE INTO ".ARCADE_FAV_TABLE." VALUES (0,'".$userinfo['user_id']."','$favori')"# changed to REPLACE INTO 10/22/2022 TheGhost
    
endif;
  
    if(!(
$result $db->sql_query($sql))): 
      
message_dieGENERAL_ERROR"Could not read the favorites game table"''__LINE____FILE__$sql );
    endif;
      
header("Location: modules.php?name=Forums&file=arcade"); # dont echo the file number you are deleting from favorites!
    
exit();

endif;

if(isset(
$_GET['delfavori'])):
    
    
$delfavori = (int) $_GET['delfavori'];

    
$sql "DELETE FROM ".ARCADE_FAV_TABLE." WHERE user_id=".$userinfo'user_id' ]." AND game_id=".$delfavori;
    
    if(!(
$result $db->sql_query($sql))): 
      
message_dieGENERAL_ERROR"Could not read the favorites game table"''__LINE____FILE__$sql );
    endif;
      
header("Location: modules.php?name=Forums&file=arcade"); # dont echo the file number you are adding to favorites!
    
exit();

endif;

$games_par_categorie $arcade_config['category_preview_games'];

if((
$arcade_catid == ) && ($arcade_config['use_category_mod'])):
  
  
$template->set_filenames(array(
    
'body' => 'arcade_cat_body.tpl' ));

  if(!isset(
$gid))
  
$gid 0;
  
  
$template->assign_vars(array(
    
    
'URL_ARCADE' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( ">' $lang'lib_arcade' ] . '</a></nobr> ',
    
'URL_BESTSCORES' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( ">' $lang'best_scores' ] . '</a></nobr> ',
    
'MANAGE_COMMENTS' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( ">' $lang'comments' ] . '</a></nobr> ',
    
'ARCADE_COL' => ( $arcade_config'use_fav_category' ] ) ? 5,
    
'ARCADE_COL1' => ( $arcade_config'use_fav_category' ] ) ? 1,
    
'FAV' => $lang'fav' ],
    
'L_GAME' => $lang'games' ],
    
'L_HIGHSCORE' => $lang'highscore' ],
    
'L_YOURSCORE' => $lang'yourbestscore' ],
    
'L_DESC' => $lang'desc_game' ],
    
'L_ARCADE' => $lang'lib_arcade' ] ) );

  if(
$arcade_config['use_fav_category' ]):
    
    
$sql "SELECT g.*, u.username, u.user_id, s.score_game, s.score_date, f.* FROM "
    
    
GAMES_TABLE " g LEFT JOIN "
    
USERS_TABLE " u ON g.game_highuser = u.user_id LEFT JOIN "
    
SCORES_TABLE " s ON s.game_id = g.game_id and s.user_id = " $userinfo'user_id' ] . " LEFT JOIN "
    
ARCADE_FAV_TABLE " f ON f.game_id = g.game_id WHERE f.user_id=" $userinfo'user_id' ];

    if(!(
$result $db->sql_query($sql))): 
      
message_dieGENERAL_ERROR"Could not read the favorites game table"''__LINE____FILE__$sql );
    endif;

    if(
$db->sql_numrows($result)):
      
      
# FAVORITES ARCADE TABLE
      
$template->assign_block_vars('favrow',array());
      
       while(
$frow $db->sql_fetchrow($result)) :
        
        
$template->assign_block_vars('favrow.fav_row',array(
        
          
'GAMENAMEF' => $frow['game_name'],
          
          
'DELFAVORI' => '<a class="arcadeTitleLink" href="&#039;.append_sid(" delfavori=".$frow&#91;&#039;game_id&#039;&#93;).&#039;"><i class="bi bi-x-square"></i></br>Del Favorite</a>'
          
          
'GAMELINKF' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( " gid=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;">' $frow'game_name' ] . '</a></nobr> ',
          
          
'GAMEPOPUPLINKF' => "<a class='popup' href='javascript&#058;Arcade_Popup(\"" append_sid("gamespopup.$phpEx?gid=".$frow&#91; '>New Window</a>",
          
          # Game Pic
          
'GAMEPICF' => ( $frow'game_pic' ] != '' ) ? "<a class="rounded-corners-arcade\" width="70\" href='" append_sid"games.$phpEx?gid=" $frow&#91; '><img class="rounded-corners-arcade\" width="60\" src='" . "modules/Forums/games/pics/" . $frow&#91; ' align='absmiddle' border='0' vspace='2' hspace='2' alt='" . $frow&#91; '></a>" : '',

                  
'GAMESETF' => ( $frow'game_set' ] != ) ? '<span>'.$lang'game_actual_nbset' ].'</span>'.'<span><strong>'$frow'game_set' ].'</strong></span>' '',
        
          
'HIGHSCOREF' => '<span><strong>'.number_format($frow['game_highscore']).'</strong></span>',
        
          
'CLICKPLAY' => '<a class="clicktoplay" href="&#039; . append_sid( " gid=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;">Click to Play!</a>',
          
          
'YOURHIGHSCOREF' => '<span><strong>'.number_format($frow'score_game' ]).'</strong></span>',
          
          
'NORECORDF' => ( $frow'game_highscore' ] == ) ? $lang'no_record' ] : '',
          
          
'HIGHUSERF' => ($frow['game_highuser'] != 0) ? '<span>'.UsernameColor($frow['username']).'</span>' ''
          
          
'URL_SCOREBOARDF' => '<nobr><a class="cattitle" href="&#039; . append_sid( " gid=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;">' "<img src='modules/Forums/templates/" $theme&#91; ' align='absmiddle' border='0' alt='" . $lang&#91; '>" . '</a></nobr> ',

                  
'GAMEIDF' => $frow'game_id' ],
          
          
# Favorites date for high score!
          
'DATEHIGHF' => "<nobr><span>" create_date$board_config'default_dateformat' ], $frow'game_highdate' ], $board_config'board_timezone' ] ) . "</span></nobr>",
          
          
'YOURDATEHIGHF' => "<nobr><span>" create_date$board_config'default_dateformat' ], $frow'score_date' ], $board_config'board_timezone' ] ) . "</span></nobr>",
          
          
# Favorites curren winner - if your the high scorer this shows up!
          
'IMGFIRSTF' => ($frow['game_highuser'] == $userinfo['user_id']) ? "<span>You are in 1st Place</span><img src='".$phpbb_root_path."templates/".$theme&#91;' align='absmiddle'>" : "",
          
          
'GAMEDESCF' => '<span>'.$frow'game_desc' ].'</span>'
        
) );

        
           if(
$frow['game_highscore'] != ): 
             
$template->assign_block_vars'favrow.fav_row.recordrow', array() );
           endif;

           if(
$frow['score_game'] != ):
             
$template->assign_block_vars'favrow.fav_row.yourrecordrow', array() );
           else: 
           
$template->assign_block_vars'favrow.fav_row.playrecordrow', array() );
           endif;
      
           endwhile;
    
      endif;
  
    endif;

  
$liste_jeux = array();

  
$sql "SELECT g.*, u.username, u.user_id, s.score_game, s.score_date 
        FROM " 
GAMES_TABLE " g 
        LEFT JOIN " 
USERS_TABLE " u 
        ON g.game_highuser = u.user_id 
        LEFT JOIN " 
SCORES_TABLE " s 
        ON s.game_id = g.game_id and s.user_id = " 
$userinfo'user_id' ] . 
        WHERE  g.arcade_catid IN (
$liste_cat_auth
        ORDER BY g.arcade_catid, 
$order_by";

  if(!( 
$result $db->sql_query($sql))):
    
message_dieGENERAL_ERROR"Could not read arcade categories"''__LINE____FILE__$sql );
  endif;

  while(
$row $db->sql_fetchrow($result)):
  
    
$liste_jeux$row'arcade_catid' ] ][] = $row;
  
  endwhile;


  
$sql "SELECT arcade_catid, arcade_cattitle, arcade_nbelmt, arcade_catauth FROM " ARCADE_CATEGORIES_TABLE " WHERE  arcade_catid IN ($liste_cat_auth) ORDER BY arcade_catorder";

  if(!( 
$result $db->sql_query($sql))): 
    
message_dieGENERAL_ERROR"Could not read arcade categories"''__LINE____FILE__$sql );
  endif;

  while(
$row $db->sql_fetchrow($result)):
    
    if(!isset(
$nbjeux))
    
$nbjeux 0;
    
    if(!isset(
$liste_jeux$row'arcade_catid' ] ]))
    
$liste_jeux$row'arcade_catid' ] ] = '';

    
$nbjeux is_countable($liste_jeux$row'arcade_catid' ] ]) ? count$liste_jeux$row'arcade_catid' ] ] ) : '';
    
    if(
$nbjeux ):
      global 
$board_config;
      if(!isset(
$liste_jeux[$row['arcade_catid' ]][$i]['game_highscore']))
      
$liste_jeux[$row['arcade_catid' ]][$i]['game_highscore'] = 0;

      if(!isset(
$liste_jeux[$row['arcade_catid' ]][$i]['score_game'])): # Never Played The Game
        
$liste_jeux[$row['arcade_catid']][$i]['score_game'] = 0;
      endif;
      
      
$template->assign_block_vars'cat_row', array(
    
        
'U_ARCADE' => append_sid"arcade.$phpEx?cid=" $row'arcade_catid' ] ),
        
'LINKCAT_ALIGN' => ( $arcade_config'linkcat_align' ] == '0' ) ? 'left' : ( ( $arcade_config'linkcat_align' ] == '1' ) ? 'center' 'right' ),
        
'L_ARCADE' => sprintf$lang'Other_games' ], $row'arcade_nbelmt' ] ),
        
'CATTITLE' => $row'arcade_cattitle' ] ) );

      
$nbjeux = ( $nbjeux $games_par_categorie ) ? $nbjeux $games_par_categorie;

      for(
$i 0$i </span>assign_block_vars'cat_row.game_row', array(
          
          
'GAMENAME' => $liste_jeux$row'arcade_catid' ] ][ $i ][ 'game_name' ],
          
          
'GAMELINK' => '<nobr><a class="arcadeTitleLink" href="&#039;.append_sid(" gid=".$liste_jeux&#91; $row&#91;&#039;arcade_catid&#039;&#93;&#93;&#91;$i&#93;&#91;&#039;game_id&#039;&#93;).&#039;">'.$liste_jeux[$row['arcade_catid']][$i]['game_name'].'</a></nobr> ',
          
          
'GAMEPOPUPLINK' => "<a class='popup' href='javascript&#058;Arcade_Popup(\"" append_sid"gamespopup.$phpEx?gid=" $liste_jeux&#91; $row&#91; '>New Window</a>",
          
          
'GAMEPIC' => ( $liste_jeux$row'arcade_catid' ] ][ $i ][ 'game_pic' ] != '' ) ? "<a class='rounded-corners-arcade' width='60' href=" append_sid"><img class='rounded-corners-arcade' width='60' src=" $phpbb_root_path " align='absmiddle' border='0' vspace='2' hspace='2' alt='" $liste_jeux&#91; $row&#91; '></a>" : '',
          
          
'GAMESET' => ( $liste_jeux$row'arcade_catid' ] ][ $i ][ 'game_set' ] != ) ? '<span>'.$lang'game_actual_nbset' ].'</span>' 
          
.'<span><strong>'.$liste_jeux$row['arcade_catid']][$i]['game_set'].'</strong></span>' '',
          
          
'HIGHSCORE' => '<img src="&#039;.$phpbb_root_path.&#039;templates/&#039;.$theme&#91; &#039;template_name&#039; &#93;.&#039;/images/couronne.gif" src="&#039;.$phpbb_root_path.&#039;templates/&#039;.$theme&#91; &#039;template_name&#039; &#93;.&#039;/images/couronne.gif" align="absmiddle">
          1st </br><span>'
.number_format($liste_jeux[$row['arcade_catid' ]][$i]['game_highscore']).'</span>' ,
          
          
'YOURHIGHSCORE' => '<span>'.number_format($liste_jeux[$row['arcade_catid']][$i]['score_game']).'</span>' ,
          
          
'CLICKPLAY' => '<a class="clicktoplay" href="&#039; . append_sid( " gid=" . $liste_jeux&#91; $row&#91; &#039;arcade_catid&#039; &#93; &#93;&#91; $i &#93;&#91; &#039;game_id&#039; &#93; ) . &#039;">CLICK TO PLAY</a>',
          
          
'NORECORD' => ( $liste_jeux$row'arcade_catid' ] ][ $i ][ 'game_highscore' ] == ) ? $lang'no_record' ] : '',
          
          
'HIGHUSER' => ($liste_jeux[$row['arcade_catid']][$i]['game_highuser'] != 0) ? '' .'<span>'.$liste_jeux[$row['arcade_catid']][$i]['username'].'</span>'.'' '',
          
          
'URL_SCOREBOARD' => '<nobr><a class="cattitle" href="&#039; . append_sid( " gid=" . $liste_jeux&#91; $row&#91; &#039;arcade_catid&#039; &#93; &#93;&#91; $i &#93;&#91; &#039;game_id&#039; &#93; ) . &#039;">' "<img src='" $phpbb_root_path "templates/" $theme&#91; ' align='absmiddle' border='0' alt='" . $lang&#91; '>" . '</a></nobr> ',
          
          
'GAMEID' => $liste_jeux$row'arcade_catid' ] ][ $i ][ 'game_id' ],
          
          
'DATEHIGH' => "<nobr><span>".create_date($board_config['default_dateformat'],$liste_jeux[$row['arcade_catid']][$i]['game_highdate'],$board_config['board_timezone'])."</span></nobr>",
          
          
'YOURDATEHIGH' => "<nobr><span>".create_date($board_config['default_dateformat'], $liste_jeux$row['arcade_catid']][$i]['score_date'],$board_config['board_timezone'])."</span></nobr>",
          
          
'IMGFIRST' => ( $liste_jeux$row'arcade_catid' ] ][ $i ][ 'game_highuser' ] == $userinfo'user_id' ] ) ? "<span>1st Place</span>".$br."<img src='" $phpbb_root_path "templates/" $theme&#91; ' align='absmiddle'>" : "",
          
          
'ADD_FAV' => ( $arcade_config'use_fav_category' ] ) ? '<td><a class="arcadeTitleLink" href="&#039; . append_sid( "><i class="bi bi-plus-square"></i></br><font>Add Favorite</font></a></td>' '',
          
          
'GAMEDESC' => '<span>'.$liste_jeux[$row['arcade_catid']][$i]['game_desc'].'</span>' ) );

        if(
$liste_jeux[$row['arcade_catid']][$i]['game_highscore'] != 0): 
          
$template->assign_block_vars'cat_row.game_row.recordrow', array() );
        endif;

        if(
$liste_jeux[$row['arcade_catid']][$i]['score_game'] != 0):
          
$template->assign_block_vars'cat_row.game_row.yourrecordrow', array() );
        else: 
          
$template->assign_block_vars'cat_row.game_row.playrecordrow', array() );
        endif;
      endfor;
    endif;
  endwhile;


  include(
$phpbb_root_path.'whoisplaying.'.$phpEx);

  
# Output page header
  
include($phpbb_root_path.'headingarcade.'.$phpEx);
  
$page_title $lang['arcade'];
  include(
'includes/page_header.'.$phpEx);
  
$template->pparse('body');
  include(
'includes/page_tail.'.$phpEx);
  exit;

endif;

$games_par_page $arcade_config['games_par_page'];
$sql_where '';
$limit " LIMIT $start,$games_par_page ";

$total_games 0;

if(
$arcade_config['use_category_mod']):

  
$sql_where " WHERE  arcade_catid = $arcade_catid AND arcade_catid IN ($liste_cat_auth)";
  
$sql "SELECT arcade_cattitle, arcade_nbelmt AS nbgames FROM " ARCADE_CATEGORIES_TABLE $sql_where";

  if(!(
$result $db->sql_query($sql))):
    
message_dieGENERAL_ERROR"Could not read the arcade categories table"''__LINE____FILE__$sql );
  endif;
  
  
$row $db->sql_fetchrow($result);

  if(
$row):
    
$total_games $row'nbgames' ];
  else:
    
message_dieGENERAL_MESSAGE$lang['no_arcade_cat'] );
  endif;

  
$template->assign_block_vars('use_category_mod',array() );

else:

  
$sql "SELECT COUNT(*) AS nbgames FROM " GAMES_TABLE;

  
$result $db->sql_query($sql);
  
  if(!(
$result)):
    
message_dieGENERAL_ERROR"Could not read games table"''__LINE____FILE__$sql );
  endif;

  
$row $db->sql_fetchrow($result);
  
  if(
$row):
    
$total_games $row'nbgames' ];
  endif;

endif;

# load the template
$template->set_filenames( array(
  
'body' => 'arcade_body.tpl' ) );

if(!isset(
$gid))
$gid '';

$template->assign_vars( array(
  
  
'URL_ARCADE' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( ">' $lang'lib_arcade' ] . '</a></nobr> ',
  
  
'URL_BESTSCORES' => '<nobr><a class="cattitle" href="&#039; . append_sid( ">' $lang'best_scores' ] . '</a></nobr> ',
  
  
'URL_SCOREBOARD' => '<nobr><a class="cattitle" href="&#039; . append_sid( ">' $lang'scoreboard' ] . '</a></nobr> ',
  
  
'MANAGE_COMMENTS' => '<nobr><a class="cattitle" href="&#039; . append_sid( ">' $lang'comments' ] . '</a></nobr> ',
  
  
'CATTITLE' => $row'arcade_cattitle' ],
  
  
'NAV_DESC' => '<a class="nav" href="&#039; . append_sid( ">' $lang'arcade' ] . '</a> ',
  
  
'L_GAME' => $lang'games' ],
  
  
'PAGINATION' => generate_paginationappend_sid"arcade.$phpEx?cid=$arcade_catid), $total_games$games_par_page$start ),
  
  
'PAGE_NUMBER' => sprintf$lang'Page_of' ], ( floor$start $games_par_page ) + ), ceil$total_games $games_par_page ) ),
  
  
'ARCADE_COL' => ( $arcade_config'use_fav_category' ] ) ? 5,
  
  
'ARCADE_COL1' => ( $arcade_config'use_fav_category' ] ) ? 1,
  
  
'FAV' => $lang'fav' ],
  
  
'L_HIGHSCORE' => $lang'highscore' ],
  
  
'L_YOURSCORE' => $lang'yourbestscore' ],
  
  
'L_DESC' => $lang'desc_game' ],
  
  
'L_ARCADE' => $lang'lib_arcade' ] ) );

if((
$arcade_config['use_fav_category']) && (!$arcade_config['use_category_mod'])):
  
  
$sql "SELECT g.*, u.username, u.user_id, s.score_game, s.score_date, f.* FROM "
  
GAMES_TABLE " g LEFT JOIN "
  
USERS_TABLE " u ON g.game_highuser = u.user_id LEFT JOIN "
  
SCORES_TABLE " s ON s.game_id = g.game_id and s.user_id = " $userinfo'user_id' ] . " LEFT JOIN "
  
ARCADE_FAV_TABLE " f ON f.game_id = g.game_id WHERE  f.user_id=" $userinfo'user_id' ];

  if(!(
$result $db->sql_query($sql))):
    
message_dieGENERAL_ERROR"Could not read games table"''__LINE____FILE__$sql );
  endif;
  
  if(
$db->sql_numrows($result)):
  
    
$frow['username'] = UsernameColor($frow['username']);
    
$template->assign_block_vars('favrow',array());

    while(
$frow $db->sql_fetchrow($result)):
          
      
$template->assign_block_vars('favrow.fav_row',array(

        
'GAMENAMEF' => $frowgame_name ],

        
'DELFAVORI' => '<a href="&#039; . append_sid( " delfavori=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;"><img src="modules/Forums/templates/subSilver/images/delfavs.gif" alt="&#039; . $lang&#91; &#039;del_fav&#039; &#93; . &#039;"></a>',

        
'GAMELINKF' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( " gid=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;">' $frow'game_name' ] . '</a></nobr> ',
        
        
'GAMEPOPUPLINKF' => "<a class='popup' href='javascript&#058;Arcade_Popup(\"" append_sid"gamespopup.$phpEx?gid=" $frow&#91; '>New Window</a>",
        
        
'GAMEPICF' => ( $frow'game_pic' ] != '' ) ? "<a href='" append_sid"games.$phpEx?gid=" $frow&#91; '><img src=" . " align='absmiddle' border='0' width='30' height='30' vspace='2' hspace='2' alt='" . $frow&#91; '></a>" : '',
        
        
'GAMESETF' => ( $frow'game_set' ] != ) ? '<span>'.$lang'game_actual_nbset' ].'</span>'.'<span><strong>'.$frow'game_set' ].'</strong></span>' '',
        
        
'HIGHSCOREF' => '<span>'.number_format($frow['game_highscore'].'</span>'),
        
        
'CLICKPLAY' => '<a class="clicktoplay" href="&#039; . append_sid( " gid=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;">Click to Play!</a>',
        
        
'YOURHIGHSCOREF' => '<span>'.number_format$frow'score_game' ].'</span>' ),
        
        
'NORECORDF' => ( $frow'game_highscore' ] == ) ? $lang'no_record' ] : '',
        
        
'HIGHUSERF' => ($frow['game_highuser'] != 0) ? '<span>'.$frow['username'].'</span>' '',
        
        
'URL_SCOREBOARDF' => '<nobr><a class="cattitle" href="&#039; . append_sid( " gid=" . $frow&#91; &#039;game_id&#039; &#93; ) . &#039;">' "<img align='absmiddle' border='0' alt='" $lang&#91; '>" . '</a></nobr> ',
        
        
'GAMEIDF' => $frow'game_id' ],
        
        
'DATEHIGHF' => "<nobr>" create_date$board_config'default_dateformat' ], $frow'game_highdate' ], $board_config'board_timezone' ] ) . "</nobr>",
        
        
'YOURDATEHIGHF' => "<nobr><span>" create_date$board_config'default_dateformat' ], $frow'score_date' ], $board_config'board_timezone' ] ) . "</span></nobr>",
        
          
# Favorites curren winner - if your the high scorer this shows up!
          
'IMGFIRSTF' => ($frow['game_highuser'] == $userinfo['user_id']) ? "<span>1st Place</span>".$br."<img src='".$phpbb_root_path."templates/".$theme&#91;' align='absmiddle'>" : "",
        
        
'GAMEDESCF' => '<span>'.$frow'game_desc' ].'</span>'
      
) );

      if(
$frow['game_highscore' ] != 0):
        
$template->assign_block_vars'favrow.fav_row.recordrow', array() );
      endif;
      
      if(
$frow['score_game' ] != 0):
        
$template->assign_block_vars'favrow.fav_row.yourrecordrow', array() );
      else:
        
$template->assign_block_vars'favrow.fav_row.playrecordrow', array() );
      endif;
    endwhile;
  endif;
endif;

$sql "SELECT g.*, u.username, u.user_id, s.score_game, s.score_date 
FROM " 
GAMES_TABLE " g 
LEFT JOIN " 
USERS_TABLE " u 
ON g.game_highuser = u.user_id 
LEFT JOIN " 
SCORES_TABLE " s 
ON s.game_id = g.game_id and s.user_id = " 
$userinfo'user_id' ] . $sql_where 
ORDER BY 
$order_by $limit";

if(!(
$result $db->sql_query($sql))):
  
message_dieGENERAL_ERROR"Could not read games table"''__LINE____FILE__$sql );
endif;

      if(isset(
$frow['game_highscore'])):
      
$decimal '.';
      
$broken_number explode($decimal,$frow['game_highscore']);
      
$frow['game_highscore'] = number_format($broken_number[0]).$decimal.$broken_number[1];
      else:
      
$frow['game_highscore'] = 0;
      endif;
      
      if(isset(
$frow'score_game' ])):
      
$decimal '.';
      
$broken_number explode($decimal,$frow'score_game' ]);
      
$frow'score_game' ] = number_format($broken_number[0]).$decimal.$broken_number[1];
      else:
      
$frow'score_game' ] = 0;
      endif;

while(
$row $db->sql_fetchrow($result)):
  
  if(empty(
$row['game_desc']))
  
$row['game_desc'] = '<span>No Description</span>';

  
# Sorted Category - Click On Category Link to show only games in that category!
  
$template->assign_block_vars('gamerow',array(

    
'GAMENAME' => $row['game_name'],
    
    
'GAMEPIC' => ( $row'game_pic' ] != '' ) ? "<a class='rounded-corners-arcade' width='60' href='" append_sid"games.$phpEx?gid=" $row&#91; '><img class='rounded-corners-arcade' width='60' src='" . $phpbb_root_path . "games/pics/" . $row&#91; ' align='absmiddle' border='0' alt='" . $row&#91; '></a>" : '',
    
    
'GAMESET' => ( $row'game_set' ] != ) ? '<span>'.$lang'game_actual_nbset' ].'</span>'.'<span><strong>'.$row['game_set'].'</strong></span>' '',
    
    
'GAMEDESC' => '<span>'.$row'game_desc' ].'</span>',
    
    
'HIGHSCORE' => '<span>'.$row['game_highscore'].'<span',
    
    
'YOURHIGHSCORE' => '<span>'.$row'score_game' ].'</span>' ,
    
    
'CLICKPLAY' => '<a class="clicktoplay" href="&#039; . append_sid( " gid=" . $row&#91; &#039;game_id&#039; &#93; ) . &#039;">Click to Play!</a>',

    
'NORECORD' => ( $row'game_highscore' ] == ) ? $lang'no_record' ] : '',

    
'HIGHUSER' => ($row['game_highuser'] != 0) ? '<span>'.$row'username' ].'</span>' '',
    
    
'URL_SCOREBOARD' => '<nobr><a class="cattitle" href="&#039; . append_sid( " gid=" . $row&#91; &#039;game_id&#039; &#93; ) . &#039;">' "<img src='" $phpbb_root_path "templates/" $theme&#91; ' align='absmiddle' border='0' alt='" . $lang&#91; '>" . '</a></nobr> ',
    
    
'GAMEID' => $row'game_id' ],

    
'DATEHIGH' => "<nobr>" create_date$board_config'default_dateformat' ], $row'game_highdate' ], $board_config'board_timezone' ] ) . "</nobr>",
    
    
'YOURDATEHIGH' => "<nobr><span>" create_date$board_config'default_dateformat' ], $row'score_date' ], $board_config'board_timezone' ] ) . "</span></nobr>",
    
    
# Not Favorites Ref Cat curren winner - if your the high scorer this shows up!
    
'IMGFIRST' => ($row['game_highuser'] == $userinfo['user_id']) ? "<span>1st Place</span>".$br."<img src='".$phpbb_root_path."templates/".$theme&#91;' align='absmiddle'>" : "",
    
    
'ADD_FAV' => ( $arcade_config'use_fav_category' ] ) ? '<td><a href="&#039; . append_sid( " favori=" . $row&#91; &#039;game_id&#039; &#93; ) . &#039;"><img src="modules/Forums/templates/subSilver/images/favs.gif" alt="&#039; . $lang&#91; &#039;add_fav&#039; &#93; . &#039;"></a></td>' '',
    
    
'GAMELINK' => '<nobr><a class="arcadeTitleLink" href="&#039; . append_sid( " gid=" . $row&#91; &#039;game_id&#039; &#93; ) . &#039;">' $row'game_name' ] . '</a></nobr> ',
    
    
'GAMEPOPUPLINK' => "<a class='popup' href='javascript&#058;Arcade_Popup(\"" append_sid"gamespopup.$phpEx?gid=" $row&#91; '>New Window</a>" ) );

  
if($row['game_highscore'] != 0):
    
$template->assign_block_vars'gamerow.recordrow', array() );
  endif;

  if(
$row['score_game' ] != 0):
    
$template->assign_block_vars'gamerow.yourrecordrow', array() );
  else:
    
$template->assign_block_vars'gamerow.playrecordrow', array() );
  endif;
  
endwhile;

include(
$phpbb_root_path.'whoisplaying.'.$phpEx);

# Output page header
include( $phpbb_root_path 'headingarcade.' $phpEx );
$page_title $lang'arcade' ];
include( 
'includes/page_header.' $phpEx );
$template->pparse'body' );
include( 
'includes/page_tail.' $phpEx ); 



Back to top
View user's profile Send RECTOR a private message
Thankful People
1 user(s) is/are thankful for this post.
Display posts from previous:

Post new topic Reply to topic printer-friendly view List users that have viewed this topic Thank Post   Forum Index phpBB Titanium - General All times are UTC - 5 Hours

Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts New Ideas for the Forums Area 💡 1 CodeBuzzard 943 Wed Jan 11, 2023 7:07 pm
TheGhost View latest post
No new posts [ Poll ] New View Cookies Update 🥇 0 NukeSheriff 894 Tue Jan 10, 2023 3:30 pm
NukeSheriff View latest post
No new posts modules/Forums/games.php (Patched) 8.x 0 RECTOR 722 Thu Dec 29, 2022 9:55 am
RECTOR View latest post
No new posts modules/Forums/common.php (Patched) 8.x 0 RECTOR 807 Wed Dec 28, 2022 9:51 pm
RECTOR View latest post
No new posts root/includes/iphub.novpn.php line 35 2 GazJ 1227 Sun Nov 06, 2022 9:08 pm
GazJ View latest post