diff -urN TMWeb1.6.5/actions.php TMWeb070210/actions.php --- TMWeb1.6.5/actions.php 2006-03-19 23:07:08.000000000 +0100 +++ TMWeb070210/actions.php 2007-01-07 00:35:00.000000000 +0100 @@ -2,6 +2,8 @@ //Actions function action($action) { global $client, $lang_b; + + $server_type=get_server_type(); switch(StripS($action)) { case $lang_b['ChallengeRestart'][0]: $query = 'ChallengeRestart'; @@ -43,7 +45,7 @@ break; case $lang_b['StartServerLan'][0]: $query = 'StartServerLan'; - break; + break; case $lang_b['RemoveChallenge'][0]: $params_1 = StripS($_POST['ChallengeFileName']); $query = 'RemoveChallenge'; @@ -97,10 +99,16 @@ break; case $lang_b['LoadMatchSettings'][0]: $params_1 = StripS($_POST['MatchSettingsFileName']); + if( $server_type == 'TMU') { + $params_1 = 'MatchSettings/'.$params_1; + } $query = 'LoadMatchSettings'; break; case $lang_b['AppendPlaylistFromMatchSettings'][0]: $params_1 = StripS($_POST['MatchSettingsFileName']); + if( $server_type == 'TMU') { + $params_1 = 'MatchSettings/'.$params_1; + } $query = 'AppendPlaylistFromMatchSettings'; break; @@ -125,20 +133,37 @@ case $lang_b['SetGameInfos'][0]: $NextRoundsUseNewRules = array_key_exists('NextRoundsUseNewRules', $_POST); $NextTeamUseNewRules = array_key_exists('NextTeamUseNewRules', $_POST); - $params_1 = array( 'GameMode' => $_POST['NextGameMode']+0, - 'ChatTime' => $_POST['NextChatTime']+0, - 'RoundsPointsLimit' => $_POST['NextRoundsPointsLimit']+0, - 'RoundsUseNewRules' => $NextRoundsUseNewRules, - 'TimeAttackLimit' => $_POST['NextTimeAttackLimit']+0, - 'TimeAttackSynchStartPeriod' => $_POST['NextTimeAttackSynchStartPeriod']+0, - 'TeamPointsLimit' => $_POST['NextTeamPointsLimit']+0, - 'TeamMaxPoints' => $_POST['NextTeamMaxPoints']+0, - 'TeamUseNewRules' => $NextTeamUseNewRules, - 'LapsNbLaps' => $_POST['NextLapsNbLaps']+0, - 'LapsTimeLimit' => $_POST['NextLapsTimeLimit']+0); + if( $server_type == "TMU" ) { + $params_1 = array( 'GameMode' => $_POST['NextGameMode']+0, + 'ChatTime' => $_POST['NextChatTime']+0, + 'RoundsPointsLimit' => $_POST['NextRoundsPointsLimit']+0, + 'RoundsUseNewRules' => $NextRoundsUseNewRules, + 'RoundsForcedLaps' => $_POST['NextRoundsForcedLaps']+0, + 'TimeAttackLimit' => $_POST['NextTimeAttackLimit']+0, + 'TimeAttackSynchStartPeriod' => $_POST['NextTimeAttackSynchStartPeriod']+0, + 'TeamPointsLimit' => $_POST['NextTeamPointsLimit']+0, + 'TeamMaxPoints' => $_POST['NextTeamMaxPoints']+0, + 'TeamUseNewRules' => $NextTeamUseNewRules, + 'LapsNbLaps' => $_POST['NextLapsNbLaps']+0, + 'LapsTimeLimit' => $_POST['NextLapsTimeLimit']+0, + 'FinishTimeout' => $_POST['FinishTimeout']+0); + } else { + $params_1 = array( 'GameMode' => $_POST['NextGameMode']+0, + 'ChatTime' => $_POST['NextChatTime']+0, + 'RoundsPointsLimit' => $_POST['NextRoundsPointsLimit']+0, + 'RoundsUseNewRules' => $NextRoundsUseNewRules, + 'TimeAttackLimit' => $_POST['NextTimeAttackLimit']+0, + 'TimeAttackSynchStartPeriod' => $_POST['NextTimeAttackSynchStartPeriod']+0, + 'TeamPointsLimit' => $_POST['NextTeamPointsLimit']+0, + 'TeamMaxPoints' => $_POST['NextTeamMaxPoints']+0, + 'TeamUseNewRules' => $NextTeamUseNewRules, + 'LapsNbLaps' => $_POST['NextLapsNbLaps']+0, + 'LapsTimeLimit' => $_POST['NextLapsTimeLimit']+0); + + } $query = 'SetGameInfos'; break; - + case $lang_b['ChangeAuthPassword'][0]: $params_1 = StripS($_POST['newLogin']); $params_2 = StripS($_POST['newPassword']); @@ -236,4 +261,4 @@ } */ } -?> \ Pas de fin de ligne à la fin du fichier. +?> diff -urN TMWeb1.6.5/chat.php TMWeb070210/chat.php --- TMWeb1.6.5/chat.php 2006-07-10 11:58:12.000000000 +0200 +++ TMWeb070210/chat.php 2007-01-01 16:48:06.000000000 +0100 @@ -97,4 +97,4 @@ } } //$client->Terminate(); -?> \ Pas de fin de ligne à la fin du fichier. +?> diff -urN TMWeb1.6.5/config.dist.php TMWeb070210/config.dist.php --- TMWeb1.6.5/config.dist.php 1970-01-01 01:00:00.000000000 +0100 +++ TMWeb070210/config.dist.php 2006-12-31 12:30:52.000000000 +0100 @@ -0,0 +1,64 @@ + \ Pas de fin de ligne à la fin du fichier. diff -urN TMWeb1.6.5/config.php TMWeb070210/config.php --- TMWeb1.6.5/config.php 2006-07-10 20:43:36.000000000 +0200 +++ TMWeb070210/config.php 1970-01-01 01:00:00.000000000 +0100 @@ -1,57 +0,0 @@ - \ Pas de fin de ligne à la fin du fichier. diff -urN TMWeb1.6.5/connection.php TMWeb070210/connection.php --- TMWeb1.6.5/connection.php 2006-07-05 11:00:48.000000000 +0200 +++ TMWeb070210/connection.php 2006-07-05 11:00:48.000000000 +0200 @@ -1,82 +1,82 @@ -'.$Error_Return[$Pos].'
'); - //break; - } - else { - echo(''.$errstr.' (line : '.$errline.')
'); - } - } -/* switch ($errno) { - case E_USER_ERROR: - $message = "[TMWeb Error] $errstr on line $errline\r\n"; - echo $message; - die(); - break; - case E_ERROR: - $message = "[PHP Error] $errstr on line $errline in file $errfile\r\n"; - echo $message; - break; - case E_WARNING: - $message = "[PHP Warning] $errstr on line $errline in file $errfile\r\n"; - echo $message; - break; - case E_USER_WARNING: - $message = "[TMWeb Warning] $errstr\r\n"; - echo $message; - break; - default: - // do nothing... - // only treat known errors ... - }*/ -} -set_error_handler('catchError'); - -// ---------------------------------------------------------------- -// connection -// ---------------------------------------------------------------- -$client = new IXR_Client_Gbx; -if (!$client->InitWithIp(ADRESSE, PORT)) { - trigger_error("[".$client->getErrorCode()."] ".$client->getErrorMessage()); -} - -function StripS($chaine) { - if(!get_magic_quotes_gpc()) return $chaine; - else { - if(is_array($chaine)) { - foreach( $chaine as $key => $value) $chaine[$key] = StripS($value); - } - else $chaine = stripslashes($chaine); - return $chaine; - } -} - -function texte_chat($text_noparse) { -$text_noparse = str_replace("$<","",$text_noparse); -$text_noparse = str_replace("$>","",$text_noparse); -$text_noparse = eregi_replace("\\$(w|n|s|i|z)","",$text_noparse); -$text = eregi_replace("\\$[0-9a-f]{3}","",$text_noparse); - return $text; -} - -function Couleur($text_noparse) { - $text_b = eregi_replace("\\$(w|n|s|i|z|>|<)","",$text_noparse); - - if (preg_match_all('/(\\$[a-f0-9]{3})([^\\$]+)/i',$text_b,$match)) { - $Replace = $match[0]; $Color = $match[1]; $Text = $match[2]; - for ($n = 0; $n < count($Replace); $n++) { - $text_b = str_replace($Replace[$n],''.$Text[$n].'',$text_b); - } - } - return $text_b; -} - +'.$Error_Return[$Pos].''); + //break; + } + else { + echo(''.$errstr.' (line : '.$errline.')
'); + } + } +/* switch ($errno) { + case E_USER_ERROR: + $message = "[TMWeb Error] $errstr on line $errline\r\n"; + echo $message; + die(); + break; + case E_ERROR: + $message = "[PHP Error] $errstr on line $errline in file $errfile\r\n"; + echo $message; + break; + case E_WARNING: + $message = "[PHP Warning] $errstr on line $errline in file $errfile\r\n"; + echo $message; + break; + case E_USER_WARNING: + $message = "[TMWeb Warning] $errstr\r\n"; + echo $message; + break; + default: + // do nothing... + // only treat known errors ... + }*/ +} +set_error_handler('catchError'); + +// ---------------------------------------------------------------- +// connection +// ---------------------------------------------------------------- +$client = new IXR_Client_Gbx; +if (!$client->InitWithIp(ADRESSE, PORT)) { + trigger_error("[".$client->getErrorCode()."] ".$client->getErrorMessage()); +} + +function StripS($chaine) { + if(!get_magic_quotes_gpc()) return $chaine; + else { + if(is_array($chaine)) { + foreach( $chaine as $key => $value) $chaine[$key] = StripS($value); + } + else $chaine = stripslashes($chaine); + return $chaine; + } +} + +function texte_chat($text_noparse) { +$text_noparse = str_replace("$<","",$text_noparse); +$text_noparse = str_replace("$>","",$text_noparse); +$text_noparse = eregi_replace("\\$(w|n|s|i|z)","",$text_noparse); +$text = eregi_replace("\\$[0-9a-f]{3}","",$text_noparse); + return $text; +} + +function Couleur($text_noparse) { + $text_b = eregi_replace("\\$(w|n|s|i|z|>|<)","",$text_noparse); + + if (preg_match_all('/(\\$[a-f0-9]{3})([^\\$]+)/i',$text_b,$match)) { + $Replace = $match[0]; $Color = $match[1]; $Text = $match[2]; + for ($n = 0; $n < count($Replace); $n++) { + $text_b = str_replace($Replace[$n],''.$Text[$n].'',$text_b); + } + } + return $text_b; +} + ?> \ Pas de fin de ligne à la fin du fichier. diff -urN TMWeb1.6.5/functions.php TMWeb070210/functions.php --- TMWeb1.6.5/functions.php 2006-07-10 14:15:44.000000000 +0200 +++ TMWeb070210/functions.php 2007-01-11 21:21:16.000000000 +0100 @@ -296,113 +296,114 @@ } function player($login) { - global $client, $lang; -if (!$client->query('GetPlayerInfo', $login)) { - trigger_error("[".$client->getErrorCode()."] ".$client->getErrorMessage()); - } - else - { - $GetPlayerInfo = $client->getResponse(); - $NickName = Couleur($GetPlayerInfo['NickName'])." - ".$GetPlayerInfo['NickName']; - $IPAddress = $GetPlayerInfo['IPAddress']; - $ConnectionType = $GetPlayerInfo['ConnectionType']; - $PlayerId = $GetPlayerInfo['PlayerId']; - $IsSpectator = ($GetPlayerInfo['IsSpectator']!=0) ? "Spectator" : "Player"; - $IsInOfficialMode = ($GetPlayerInfo['IsInOfficialMode']!=0) ? "Official" : "Not Official"; - $HasJoinMatch = ($GetPlayerInfo['HasJoinMatch']==1) ? "Oui" : "Non"; - $Avatar = $GetPlayerInfo['Avatar']; - $LadderStats = $GetPlayerInfo['LadderStats']; - //eregi_replace("([a-zA-Z0-9]*[\\])*(\.dds)?","",$Avatar['FileName']) - - $avatar_flag = (file_exists("icons/flags/".substr($Avatar['FileName'], -7, -4).".png")) ? True : False; - - - echo "".$lang['Infos_Player']." : $login
-"; - if($avatar_flag) $style = 'background: url(\'icons/flags/'.substr($Avatar['FileName'], -7, -4).'.png\') no-repeat right top;'; - echo "
".$lang['Login']." | -$login | -
".$lang['NickName']." | -$NickName | -
".$lang['IPAddress']." | -$IPAddress | -
".$lang['ConnectionType']." | -$ConnectionType | -
".$lang['PlayerId']." | -$PlayerId | -
".$lang['Spectator']." | -$IsSpectator | -
".$lang['IsInOfficialMode']." | -$IsInOfficialMode | -
".$lang['HasJoinMatch']." | -$HasJoinMatch | -
".$lang['Avatar']." | -".$Avatar['FileName']." | -
".$lang['LadderRanking']." | -{$LadderStats['Ranking']} | -
".$lang['Score']." | -".number_format($LadderStats['Score'], 2)." | -
".$lang['LastMatchScore']." | -".number_format($LadderStats['LastMatchScore'], 5)." | -
".$lang['NbrMatchWins']." | -{$LadderStats['NbrMatchWins']} | -
".$lang['NbrMatchDraws']." | -{$LadderStats['NbrMatchDraws']} | -
".$lang['NbrMatchLosses']." | -{$LadderStats['NbrMatchLosses']} | -
".$lang['NbrTotalPlayers']." | -{$LadderStats['NbrTotalPlayers']} | -
".$lang['TeamName']." | -{$LadderStats['TeamName']} | -
".$lang['TeamRanking']." | -{$LadderStats['TeamRanking']} | -
".$lang['NbrTotalTeams']." | -{$LadderStats['NbrTotalTeams']} | -
".$lang['Infos_Player']." : $login
+"; + if($avatar_flag) $style = 'background: url(\'icons/flags/'.substr($Avatar['FileName'], -7, -4).'.png\') no-repeat right top;'; + echo "
".$lang['Login']." | +$login | +
".$lang['NickName']." | +$NickName | +
".$lang['IPAddress']." | +$IPAddress | +
".$lang['ConnectionType']." | +$ConnectionType | +
".$lang['PlayerId']." | +$PlayerId | +
".$lang['Spectator']." | +$IsSpectator | +
".$lang['IsInOfficialMode']." | +$IsInOfficialMode | +
".$lang['HasJoinMatch']." | +$HasJoinMatch | +
".$lang['Avatar']." | +".$Avatar['FileName']." | +
".$lang['LadderRanking']." | +{$LadderStats['Ranking']} | +
".$lang['Score']." | +".number_format($LadderStats['Score'], 2)." | +
".$lang['LastMatchScore']." | +".number_format($LadderStats['LastMatchScore'], 5)." | +
".$lang['NbrMatchWins']." | +{$LadderStats['NbrMatchWins']} | +
".$lang['NbrMatchDraws']." | +{$LadderStats['NbrMatchDraws']} | +
".$lang['NbrMatchLosses']." | +{$LadderStats['NbrMatchLosses']} | +
".$lang['NbrTotalPlayers']." | +{$LadderStats['NbrTotalPlayers']} | +
".$lang['TeamName']." | +{$LadderStats['TeamName']} | +
".$lang['TeamRanking']." | +{$LadderStats['TeamRanking']} | +
".$lang['NbrTotalTeams']." | +{$LadderStats['NbrTotalTeams']} | +
'.$lang['Answers'].' - '.$warning.'
'; echo '
'.$lang['Login'].' | '.$lang['PlayerId'].' | '.$lang['Result'].' |
'.$lang['ListChallenges'].'