<?php echo $error_msg; ?> </td> </tr> </table> <?php die; } if ($SubscribeFor != "") { //we will try subscribe for this team. They will need to accept us to be able to actually join it $list_sql = "select is_pending_to_join_team from tournament_players where team_id='{$SubscribeFor}' and player_guid='{$s_user_guid}' and tournament_id='{$s_user_tournament}'"; $result1 = mysql_query($list_sql, $dbi) or die("200901261641"); list($is_pending_to_join_team) = mysql_fetch_row($result1); if ($is_pending_to_join_team == "") { $result = mysql_query("Insert into tournament_players (team_id,player_guid,tournament_id,is_pending_to_join_team,is_pending_to_accept_team_invite,strength_points) values('{$SubscribeFor}','{$s_user_guid}','{$s_user_tournament}','1','0','" . Get_player_strength($s_user_guid) . "')", $dbi) or die("Q 200501180949" . mysql_error($dbi)); } } if ($UnSubscribeFor != "") { $result = mysql_query("delete from tournament_players where player_guid='{$s_user_guid}' and team_id='{$UnSubscribeFor}' and tournament_id='{$s_user_tournament}'", $dbi) or die("Q 200501180949" . mysql_error($dbi)); } if ($FullJoin != "") { //check if this team can have more players $list_sql = "select count(*) from tournament_players where team_id='{$SubscribeFor}' and tournament_id='{$s_user_tournament}' and is_pending_to_join_team=0 and is_pending_to_join_team=0"; $result1 = mysql_query($list_sql, $dbi) or die("200901261641"); list($team_member_count) = mysql_fetch_row($result1); //see the limit for this tournament if ($s_user_max_team_members <= $team_member_count) { Alert("This team is full atm. Try to negotaite ingame with them for an open spot"); } else { //leave other joined teams if there is any
<table width="970" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <?php //direct acces of a skin is not allowed if (!$dbi) { die("Can't acces page directly"); } $result = mysql_query("update tournament_players set strength_points='" . Get_player_strength($s_user_guid) . "' where player_guid='{$s_user_guid}' and tournament_id='{$s_user_tournament}'", $dbi) or die("Q 200501180949" . mysql_error($dbi)); die("Player Strength factor recalculated and updated"); ?> </td> </tr> </table>