$free = $t['players'] - get_num($id); // get the game's status if (started($id)) { if (joined($id, $_SESSION['playerID']) && !get_winner($id)) { if ($_SESSION['playerID'] != $t['creator']) { echo "<tr><td colspan=\"{$cspan}\">{$MSG_LANG['tournamentalready']}"; } else { echo "<tr><td colspan=\"{$cspan}\">{$MSG_LANG['tournamentcreated']}"; } echo "<br>"; $gid = joined($id, $_SESSION['playerID']); $g2 = mysql_query("SELECT name FROM tournaments WHERE id = '{$gid}'"); $g = mysql_fetch_array($g2); echo '' . $MSG_LANG[yourareplayingin] . ' <a href="tournaments.php?action=view&id=' . $gid . '">' . $g['name'] . '</a>'; } else { if (!get_winner($id)) { echo "<tr><td colspan=\"{$cspan}\"><b>{$MSG_LANG['tournamentalready2']}</b>"; } } } else { if (joined($id, $_SESSION['playerID'])) { echo "<tr><td colspan=\"{$cspan}\">{$MSG_LANG['tournamentalready']}<br>"; $gid = joined($id, $_SESSION['playerID']); $g2 = mysql_query("SELECT name FROM tournaments WHERE id = '{$gid}'"); $g = mysql_fetch_array($g2); echo '' . $MSG_LANG[yourareplayingin] . ' <a href="tournaments.php?action=view&id=' . $gid . '">' . $g['name'] . '</a>'; } else { echo "<tr>\n <td colspan=\"{$cspan}\">{$MSG_LANG['tournamentinvite1']} <b>" . $free . "</b> {$MSG_LANG['tournamentinvite2']}</td></tr>\n <tr><td colspan=\"{$cspan}\">"; $uh = get_group($me['playerID']); $ug = get_groupdata($uh['group_id']); if ($t['access'] == "" || $t['access'] == "group" && $uh != false || $t['access'] == "group_ag" && $ug['ag'] == "1" || is_numeric($t['access']) && $t['access'] == $uh['group_id']) {
function get_info_attribution($id) { // retourne le code html des informations de l'attribution $retour = ""; $start = "<tr class='mh_tdtitre' align='center'><td class='mh_tdpage'>"; $end = "</td></tr>"; $dom = get_dom(); $attribution = $dom->getElementsByTagName("attrib")->item($id); $retour .= $start . "<h3>" . utf8_decode(stripslashes($attribution->getAttribute("name"))) . " par " . utf8_decode(stripslashes($attribution->getAttribute("pseudo"))) . " le " . $attribution->getAttribute("date") . "</h3>" . $end; $retour .= $start . get_participants($attribution) . $end; $retour .= $start . "<h3>Résutalt du jet : " . $attribution->getAttribute("random") . "</h3>" . $end; $retour .= $start . "<h3>Vainqueur : " . utf8_decode(get_winner($attribution)) . "</h3>" . $end; return $retour; }