$QueryResult = dbquery(DBQUERY_READ_RESULTSET, 'DELETE FROM "GeneralThread" USING "GeneralThread" JOIN "Game" ON "GeneralThread"."ThreadID" = "Game"."GameID" WHERE "Game"."GameID" IN :gtd:', 'gtd', $GamesToDelete); $didsomething = true; } for ($i = 0; $i < count($PGRsToHide_Games); $i++) { $QR = dbquery(DBQUERY_WRITE, 'UPDATE "PlayerGameRcd" SET "GameResult" = \'Hide\' WHERE "Game" = :game: AND "User" = :user:'******'game', $PGRsToHide_Games[$i], 'user', $PGRsToHide_Users[$i]); $QR = dbquery(DBQUERY_WRITE, 'DELETE FROM "PGRScore" WHERE "Game" = :game: AND "User" = :user:'******'game', $PGRsToHide_Games[$i], 'user', $PGRsToHide_Users[$i]); $didsomething = true; } if ($didsomething) { $mypage->leaf('p', '<i><b>Specified deletes and/or hides were successfully carried out.</b></i>'); } else { $mypage->leaf('p', '<i><b>You don\'t seem to have entered any data.</b></i>'); } } $mypage->leaf('p', 'Here is a list of all games that have been cancelled during recruitment.'); gamelistdisplayr($mypage, true); $mypage->leaf('p', 'You can click <a href="cancelledgames.php?delete=1">here</a> to delete all of these games that were cancelled more than three days ago.'); $mypage->leaf('p', 'Click <a href="recalculate.php?DoAll=1">here</a> to recalculate all player ratings, player statistics, rankings and site statistics.'); $mypage->leaf('p', 'Click <a href="cancelledgames.php?clearcache=1">here</a> to clear the translation cache.'); $mypage->leaf('p', 'Click <a href="cancelledgames.php?sync=1">here</a> to synchronise translation data.'); if ($Administrator == 2) { $mypage->leaf('h3', 'Delete arbitrary games / hide player game records'); $mypage->leaf('p', 'Enter the numbers of the games you want to delete in the left-hand column. If you only want to hide a single player game record, then enter the user ID in the right-hand column; otherwise, leave the right-hand column blank.'); $mypage->opennode('form', 'action="cancelledgames.php" method="POST"'); $mypage->opennode('table', 'class="table_no_borders"'); for ($i = 0; $i < 10; $i++) { $mypage->opennode('tr'); $mypage->leaf('td', '<input type="text" name="DeletionGame' . $i . '" size="10" maxlength="15">'); $mypage->leaf('td', '<input type="text" name="DeletionUser' . $i . '" size="10" maxlength="15">'); $mypage->closenode(); }
$NumPlayers = dbquery(DBQUERY_READ_INTEGER, 'SELECT "MetadatumValue" FROM "Metadatum" WHERE "MetadatumName" = \'Players\''); $mypage->leaf('h1', 'Brass Online'); $mypage->leaf('p', '<i>Brass</i> created by Martin Wallace. Web implementation by Philip Eve. There are currently ' . $NumPlayers . ' users playing in ' . $NumGamesInProgress . ' games.'); if ($Administrator) { require HIDDEN_FILES_PATH . 'adminfpresource.php'; AdminFP($mypage); } if ($_SESSION['LoggedIn'] and !$Banned) { $create_game_links = '<a href="newgame.php">Create a new game</a>'; if ($Administrator) { $create_game_links .= ' / <a href="newgameb.php">Create a new game for others to play</a>'; } $mypage->leaf('p', $create_game_links); } $mypage->leaf('h3', 'Games that are currently recruiting:'); gamelistdisplayr($mypage, false); $mypage->leaf('h3', 'Games that are currently looking for a replacement player:'); gamelistdisplayx($mypage); $mypage->leaf('h3', 'Games that are currently in progress:'); if ($NumGamesInProgress > 20) { $games_in_progress_notice = 'This list shows only 20 of the ' . $NumGamesInProgress . ' games that are currently in progress. You can '; if ($_SESSION['LoggedIn']) { $games_in_progress_notice .= 'see a full list by clicking <a href="allcurrentgames.php">here</a>.'; } else { $games_in_progress_notice .= 'access a full list if you log in.'; } $mypage->leaf('p', $games_in_progress_notice); } gamelistdisplayp($mypage, false) . $mypage->leaf('p', '<a href="oldgames.php">View a list of games that are finished</a>'); if ($Administrator) { $mypage->leaf('p', '<a href="cancelledgames.php">View a list of all games cancelled during recruitment</a> (Admins only)');