$mypage->opennode('select', 'id="boardselect" onChange="alter_all_links(2)"'); for ($i = 0; $i < count($BoardNamesArray); $i++) { $mypage->leaf('option', $BoardNamesArray[$i], 'value=' . $BoardNumbersArray[$i] . $BoardPreselectedArray[$i]); } $mypage->closenode(); $mypage->text('Score type:'); $mypage->opennode('select', 'id="modeselect" onChange="alter_all_links(2)"'); $mypage->leaf('option', 'Top 50 scores from all categories', 'value=3'); $mypage->leaf('option', 'All scores', 'value=4' . $echo_modeselected[0]); $mypage->leaf('option', 'Non-winning scores', 'value=5' . $echo_modeselected[1]); $mypage->leaf('option', 'Losing scores', 'value=6' . $echo_modeselected[2]); $mypage->leaf('option', 'All scores from competitive games', 'value=7' . $echo_modeselected[3]); $mypage->leaf('option', 'Non-winning scores from competitive games', 'value=8' . $echo_modeselected[4]); $mypage->leaf('option', 'Losing scores from competitive games', 'value=9' . $echo_modeselected[5]); $mypage->closenode(); $mypage->leaf('a', 'Go', 'href="statistics.php?Mode=' . $mode . '&Players=' . $numplayers . '&Board=' . $board . '&UserID=' . $RequestedUserID . '" id="link_' . get_scores_link_number() . '"'); $mypage->closenode(); // p $CountQueryResult = dbquery(DBQUERY_READ_INTEGER, $countquery, 'user', $EscapedUserID, 'numplayers', $numplayers, 'board', $board); if (!$CountQueryResult) { if ($EscapedUserID) { $mypage->leaf('p', 'There aren\'t any scores to display for this user in this category.'); } else { $mypage->leaf('p', 'There aren\'t any scores to display in this category.'); } $mypage->finish(); } require_once HIDDEN_FILES_PATH . 'paginate.php'; $PaginationBar = paginationbar('score', 'scores', SITE_ADDRESS . 'statistics.php', array('Mode' => $mode, 'Players' => $numplayers, 'Board' => $board, 'UserID' => $EscapedUserID), 100, $Page, $CountQueryResult); $QueryResult = dbquery(DBQUERY_READ_RESULTSET, $query, 'user', $EscapedUserID, 'numplayers', $numplayers, 'board', $board, 'me', $_SESSION['MyUserID'], 'startpoint', $StartPoint); $mypage->append($PaginationBar[0]);
die; } while ($row = db_fetch_assoc($QueryResult)) { $mypage->leaf('option', $row['VersionName'], 'value=' . $row['VersionGroupID']); } $mypage->closenode(2); $number_headers = array('', '', 'With two players:', 'With three players:', 'With four players:'); $category_labels = array('Competitive only: ', 'All games: '); for ($i = 4; $i > 1; $i--) { $scores_links = '<b>' . $number_headers[$i] . '</b><br><a href="statistics.php?Mode=3&Players=' . $i . '&Board=1&UserID=' . $EscapedUserID . '" id="link_' . get_scores_link_number() . '">Top 50 in each category</a>'; for ($j = 0; $j < 2; $j++) { $scores_links .= '<br>' . $category_labels[$j] . '<a href="statistics.php?Mode=' . (7 - 3 * $j) . '&Players=' . $i . '&Board=1&UserID=' . $EscapedUserID . '" id="link_' . get_scores_link_number() . '">All results</a>, '; if ($i > 2) { $scores_links .= '<a href="statistics.php?Mode=' . (8 - 3 * $j) . '&Players=' . $i . '&Board=1&UserID=' . $EscapedUserID . '" id="link_' . get_scores_link_number() . '">Excl. wins</a>, '; } $scores_links .= '<a href="statistics.php?Mode=' . (9 - 3 * $j) . '&Players=' . $i . '&Board=1&UserID=' . $EscapedUserID . '" id="link_' . get_scores_link_number() . '">Losses only</a>'; } $mypage->leaf('p', $scores_links, 'class="font_sans_serif"'); } $mypage->closenode(2); // div, div ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// $PStatementHeader = transtext('udPStatement'); if ($_SESSION['MyUserID'] == $EscapedUserID) { $PStatementHeader .= ' <span style="font-weight: normal; font-style: italic;">' . transtext('udMayEditBelow') . '</span>'; } $mymatch = array(); if (is_null($therow['PersonalStatement'])) { $PStatementHeader .= ' ' . transtext('udPSNone');
// p $mypage->opennode('table'); $mypage->opennode('thead'); $mypage->opennode('tr'); $mypage->leaf('td', ''); $mypage->leaf('td', 'All', 'colspan=' . $colgroupsize); $mypage->leaf('td', '"Competitive"', 'colspan=' . $colgroupsize); $mypage->next(); $mypage->leaf('td', '', 'style="min-width: ' . $rankcolwidth . 'px;"'); if ($_SESSION['LoggedIn']) { for ($j = 0; $j < 2; $j++) { $mypage->leaf('td', '<a href="statistics.php?Mode=' . (4 + 3 * $j) . '&Players=' . $numplayers . '&Board=' . $board . '&UserID=' . $RequestedUserID . '" id="link_' . get_scores_link_number() . '">All</a>', 'style="min-width: ' . $colwidth . 'px;"'); if ($numplayers > 2) { $mypage->leaf('td', '<a href="statistics.php?Mode=' . (5 + 3 * $j) . '&Players=' . $numplayers . '&Board=' . $board . '&UserID=' . $RequestedUserID . '" id="link_' . get_scores_link_number() . '">Didn\'t Win</a>', 'style="min-width: ' . $colwidth . 'px;"'); } $mypage->leaf('td', '<a href="statistics.php?Mode=' . (6 + 3 * $j) . '&Players=' . $numplayers . '&Board=' . $board . '&UserID=' . $RequestedUserID . '" id="link_' . get_scores_link_number() . '">Lost</a>', 'style="min-width: ' . $colwidth . 'px;"'); } } else { for ($j = 0; $j < 2; $j++) { $mypage->leaf('td', 'All', 'style="min-width: ' . $colwidth . 'px;"'); if ($numplayers > 2) { $mypage->leaf('td', 'Didn\'t Win', 'style="min-width: ' . $colwidth . 'px;"'); } $mypage->leaf('td', 'Lost', 'style="min-width: ' . $colwidth . 'px;"'); } } $mypage->closenode(2); // tr, thead $mypage->opennode('tbody'); if ($numplayers == 2) { $numcolumns = 4;