Pop Up window help!!

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Pop Up window help!!
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
<?php

/***************************************************************************
*                                proarcade.php
*                            -------------------
*   Released                    : June 3, 2004
*   
*   Original Mod Author's Site  : http://www.gf-phpbb.com
*
***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
//include($phpbb_root_path . 'extension.inc');

include('includes/config.php');
include('db/db.php');
include('includes/functions.php');
include('includes/constants.php');
include('includes/sessions.php');
include('common_arcade.php');


while( list($var, $param) = @each($HTTP_POST_VARS) )
{
   $$var = $param ;
}

while( list($var, $param) = @each($HTTP_GET_VARS) )
{
   $$var = $param ;
}

$gid = intval($gid);

$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";

//
// Start session management
//

$userdata = session_pagestart($user_ip, PAGE_GAME, $nukeuser);
//init_userprefs($userdata);

//
// End session management
//
// Start auth check
//

$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";

$sql = "SELECT * FROM " . GAMES_TABLE . " WHERE game_id = '$gid'";
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Impossible d'acceder à la table des jeux", '', __LINE__, __FILE__, $sql);
}
if ( !( $row = $db->sql_fetchrow($result) ) )
{// Si l'utilisateur n'a encore aucun score pour ce jeu'
   message_die(GENERAL_ERROR, "Aucun jeu ne correspond.") ;
}

if ( $row['game_type'] == 0 )
{
   $deb = 32 - $hashoffset ;
   $gamehash_id = substr( $newhash , $deb , $hashoffset ) . substr( $newhash , 0 , $deb ) ;
}

if ( $row['game_type'] == 1 )
{
$gamehash_id = $gamehash ;
}

if ( $row['game_type'] == 2 )
{
if ( $vpaver == "100B" )
{
$gamehash_id = $gamehash ;
$vpaver = "100B2" ;
}
}

if ( $row['game_type'] == 3 )
{
   $gamehash_id = substr( $newhash , $hashoffset , 32 ) . substr( $newhash , 0 , $hashoffset ) ;
   $vpaver = ( $gpaver == "GFARV2") ? '100B2' : '' ;
}


$vscore = $row['game_scorevar'] ;
$score = $$vscore ;

if (  !$userdata['session_logged_in']  && !isset($valid) )
{
   header($header_location . "http://" . $board_config['server_name']."/modules/Forums/proarcade.php?$vscore=$score&gid=$gid&valid=X&newhash=$newhash&gamehash_id=$gamehash_id&gamehash=$gamehash&hashoffset=$hashoffset&settime=$settime&sid=$sid&vpaver=$vpaver", true);
   exit;
}

if ( !$userdata['session_logged_in'] )
{
   header($header_location . "http://" . $board_config['server_name']."/modules/Forums/login.php?redirect=arcade.php", true);
   exit;
}

$sql = "SELECT * FROM " . GAMEHASH_TABLE . " WHERE gamehash_id = '$gamehash_id' and game_id = '$gid' and user_id = '" . $userdata['user_id'] . "'";

if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Impossible d'acceder à la tables des hash game", '', __LINE__, __FILE__, $sql);
}

// Tentative de hack ?
if ( !( $row = $db->sql_fetchrow($result) ) or ($vpaver != "100B2") or (!isset($$vscore)) )
{
   $sql = "INSERT INTO " . HACKGAME_TABLE . " ( user_id , game_id , date_hack ) VALUES ( '" . $userdata['user_id'] . "' , '$gid' , '" . time() . "')" ;
   $db->sql_query($sql) ;
   header($header_location . "http://" . $board_config['server_name']."/modules.php?name=Forums&file=arcade", true);
   exit;
}

$sql = "DELETE FROM " . GAMEHASH_TABLE . " WHERE gamehash_id = '$gamehash_id' and game_id = $gid and user_id = " . $userdata['user_id'] ;

$db->sql_query($sql) ;



//
// End of auth check
//



$sql = "SELECT * FROM " . SCORES_TABLE . " WHERE game_id = $gid and user_id = " . $userdata['user_id'] ;

if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Impossible d'acceder à la tables des scores", '', __LINE__, __FILE__, $sql);
}

$datenow = time();
$ecart = $datenow - $settime ;

if ( !( $row = $db->sql_fetchrow($result) ) )
{// Si l'utilisateur n'a encore aucun score pour ce jeu'
   $sql = "INSERT INTO " . SCORES_TABLE . " (game_id , user_id , score_game , score_date , score_time , score_set )
   VALUES ( $gid , " . $userdata['user_id'] . " , $score , $datenow , $ecart , 1 ) ";
   $result = $db->sql_query($sql) ;
}
else
{
  if ( $row['score_game'] < $score )
  {
  $sql = "UPDATE " . SCORES_TABLE . " set score_game = $score , score_set = score_set + 1 , score_date = $datenow , score_time = score_time + $ecart 
   WHERE game_id = $gid and user_id = " . $userdata['user_id'] ;
  $result = $db->sql_query($sql) ;
  }   
  else
  {
    $sql = "UPDATE " . SCORES_TABLE . " set score_set = score_set + 1  , score_time = score_time + $ecart
   WHERE game_id = $gid and user_id = " . $userdata['user_id'] ;
    $result = $db->sql_query($sql) ;
  }
}


$sql = "SELECT * FROM " . GAMES_TABLE . " WHERE game_id = " . $gid ;
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Impossible d'acceder à la tables des jeux", '', __LINE__, __FILE__, $sql);
}

if ( ( $row = $db->sql_fetchrow($result) ) && ( $row['game_highscore']< $score) )
{// Si l'utilisateur a battu le record du jeu
   $sql = "UPDATE " . GAMES_TABLE . " SET game_highscore = $score , game_highuser = "
   . $userdata['user_id'] . " , game_highdate = " . time() . ", game_set = game_set+1 WHERE game_id = $gid" ;
   $result = $db->sql_query($sql) ;

   
}
else
{
   $sql = "UPDATE " . GAMES_TABLE . " SET game_set = game_set+1 WHERE game_id = $gid" ;
   $result = $db->sql_query($sql) ;
}
   header($header_location . "http://" . $board_config['server_name']."/modules.php?name=Forums&file=games&gid=$gid", true);
   exit;

?>


Does anyone know how to get a pop up window to appear when this page loads? It doesn't include the header or footer, or have a body section. The only thing the file does is table values passed to it and insert them in the database.


Back to top Reply with quote
#2   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
The only way I could get a pop window to happen is if I comment out
header($header_location . "http://" . $board_config['server_name']."/modules.php?name=Forums&file=games&gid=$gid", true);
at the end of the file. The problem is that that line refreshes back to the arcade when the sql update is done and is needed.


Back to top Reply with quote
#3   re: Pop Up window help!!
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
did you try using Telli's pop-up j's in the download section?



Back to top Reply with quote
#4   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I actually got it working. For some reason I could use it in that file. I placed it somewhere else and got it working. Thanks. icon_biggrin.gif



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

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