function gamelistdisplayf(tagtree &$tt, $StartPoint, $Pagenum) { if ($_SESSION['LoggedIn']) { $Query = 'SELECT "Game"."GameID", "Game"."Friendly", "Game"."GameName", "Game"."GTitleDeletedByAdmin", "Game"."LastMove", "Game"."GameCreator", "Game"."OriginalPlayers", "Game"."CurrentPlayers", "Game"."RailPhase", "Game"."Round", "Game"."NumRounds", "Game"."GameStatus", "GameVersion"."ShortVersionName", "GameVersionGroup"."VersionName", "GameVersion"."VersionNameSuffix", "GameVersion"."Creators", "User"."Name" AS "GameCreatorName", "PlayerGameRcd"."User" FROM "Game" JOIN "GameVersion" ON "Game"."GVersion" = "GameVersion"."VersionID" JOIN "GameVersionGroup" ON "GameVersion"."VersionGroup" = "GameVersionGroup"."VersionGroupID" JOIN "User" ON "Game"."GameCreator" = "User"."UserID" LEFT JOIN "PlayerGameRcd" ON "PlayerGameRcd"."User" = :me: AND "Game"."GameID" = "PlayerGameRcd"."Game" WHERE "Game"."GameIsFinished" = 1 ORDER BY "Game"."LastMove" DESC LIMIT :startpoint:, 100'; $me = $_SESSION['MyUserID']; } else { $Query = 'SELECT "Game"."GameID", "Game"."Friendly", "Game"."GameName", "Game"."GTitleDeletedByAdmin", "Game"."LastMove", "Game"."GameCreator", "Game"."OriginalPlayers", "Game"."CurrentPlayers", "Game"."RailPhase", "Game"."Round", "Game"."NumRounds", "Game"."GameStatus", "GameVersion"."ShortVersionName", "GameVersionGroup"."VersionName", "GameVersion"."VersionNameSuffix", "GameVersion"."Creators", "User"."Name" AS "GameCreatorName" FROM "Game" JOIN "GameVersion" ON "Game"."GVersion" = "GameVersion"."VersionID" JOIN "GameVersionGroup" ON "GameVersion"."VersionGroup" = "GameVersionGroup"."VersionGroupID" JOIN "User" ON "Game"."GameCreator" = "User"."UserID" WHERE "Game"."GameIsFinished" = 1 ORDER BY "Game"."LastMove" DESC LIMIT :startpoint:, 100'; $me = 0; } $QueryResult = dbquery(DBQUERY_READ_RESULTSET, $Query, 'me', $me, 'startpoint', $StartPoint); $CountQueryResult = dbquery(DBQUERY_READ_INTEGER_TOLERANT_ZERO, 'SELECT "MetadatumValue" FROM "Metadatum" WHERE "MetadatumName" = \'Games-Finished\''); if (!$CountQueryResult) { return false; } require_once HIDDEN_FILES_PATH . 'paginate.php'; $PaginationBar = paginationbar('game', 'games', SITE_ADDRESS . 'oldgames.php', null, 100, $Pagenum, $CountQueryResult); $tt->append($PaginationBar[0]); if ($QueryResult === 'NONE') { return; } $tt->opennode('table', 'class="table_extra_horizontal_padding"'); $tt->opennode('thead'); $tt->opennode('tr'); $tt->leaf('th', 'Name', 'colspan=2 style="width: 270px;"'); $tt->leaf('th', 'Creator'); $tt->leaf('th', 'Friendly?'); $tt->leaf('th', 'Original', 'title="The number of players the game had when it started."'); $tt->leaf('th', 'Final', 'title="The number of players the game had when it finished."'); $tt->leaf('th', 'Status'); $tt->leaf('th', 'Round'); $tt->leaf('th', 'Last Move <span style="font-weight: normal;">(GMT)</span>'); $tt->closenode(2); // tr, thead $tt->opennode('tbody'); $RoundColumnStyles = array('gamelist_roundcol_c', 'gamelist_roundcol_r'); while ($row = db_fetch_assoc($QueryResult)) { if ($row['GTitleDeletedByAdmin']) { $row['GameName'] = 'The title of this game has been cleared by an Administrator'; } $RowTagAttributes = null; if ($_SESSION['LoggedIn']) { $GameCreatorColumn = '<a href="userdetails.php?UserID=' . $row['GameCreator'] . '">' . $row['GameCreatorName'] . '</a>'; if (!is_null($row['User'])) { $RowTagAttributes = 'class="mygame"'; } } else { $GameCreatorColumn = $row['GameCreatorName']; } $tt->opennode('tr', $RowTagAttributes); $version_name = vname($row['VersionName'], $row['VersionNameSuffix']); $tt->leaf('td', '<img src="gfx/icon-' . strtolower($row['ShortVersionName']) . '.png" alt="' . $version_name . '" title="' . $version_name . ' (' . $row['Creators'] . ')">', 'width=23 style="border-right: none;"'); $tt->leaf('td', '<a href="board.php?GameID=' . $row['GameID'] . '">' . $row['GameName'] . '</a>', 'style="border-left: none; padding-left: 0px; text-align: left;"'); $tt->leaf('td', $GameCreatorColumn); if ($row['Friendly']) { $tt->leaf('td', transtext('^Yes'), 'bgcolor="#9FFF9F"'); } else { $tt->leaf('td', transtext('^No'), 'bgcolor="#FFC18A"'); } $tt->leaf('td', $row['OriginalPlayers']); $tt->leaf('td', $row['CurrentPlayers']); $tt->leaf('td', $row['GameStatus']); $tt->leaf('td', ($row['Round'] >= 10 ? '' : ' ') . $row['Round'] . ' / ' . $row['NumRounds'], 'class="' . $RoundColumnStyles[$row['RailPhase']] . '"'); $lmtime = strtotime($row['LastMove']); $tt->opennode('td'); $tt->leaf('span', date('Y', $lmtime), 'style="font-size: 50%;"'); $tt->text(date('M-d H:i:s', $lmtime)); $tt->closenode(2); // td, tr } $tt->closenode(2); // tbody, table $tt->append($PaginationBar[1]); }
$mypage->emptyleaf('input', 'type="hidden" id="emailtype_id" name="emailtype" value=0'); $mypage->emptyleaf('input', 'type="hidden" id="ys_id" name="ys" value=' . $StartYear); $mypage->emptyleaf('input', 'type="hidden" id="ms_id" name="ms" value=' . $StartMonth); $mypage->emptyleaf('input', 'type="hidden" id="ye_id" name="ye" value=' . $EndYear); $mypage->emptyleaf('input', 'type="hidden" id="me_id" name="me" value=' . $EndMonth); $mypage->closenode(); ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// if (!$CountQueryResult) { $mypage->leaf('p', 'There aren\'t any emails to display that satisfy the currently selected constraints. You can refine the constraints using the controls above.'); $mypage->leaf('p', 'Click <a href="index.php">here</a> to return to the Main Page.'); $mypage->finish(); } require HIDDEN_FILES_PATH . 'paginate.php'; $PaginationBar = paginationbar('email', 'emails', SITE_ADDRESS . 'emails.php', array('ys' => $StartYear, 'ms' => $StartMonth, 'ye' => $EndYear, 'me' => $EndMonth, 'emailtype' => $message_type), 20, $Page, $CountQueryResult); $mypage->append($PaginationBar[0]); if ($QueryResult !== 'NONE') { while ($row = db_fetch_assoc($QueryResult)) { $colourclass = 'messagebox'; switch ($message_type) { case 0: if ($row['Sender'] == $_SESSION['MyUserID']) { $colourclass = 'mygame'; $legend = '<b>Sent</b> to <a href="userdetails.php?UserID=' . $row['Recipient'] . '">' . $row['RecipientName'] . '</a> '; } else { $legend = '<b>Received</b> from <a href="userdetails.php?UserID=' . $row['Sender'] . '">' . $row['SenderName'] . '</a> '; } break; case 1: $legend = '<b>Received</b> from <a href="userdetails.php?UserID=' . $row['Sender'] . '">' . $row['Name'] . '</a> ';
<?php $mypage = page::standard(); $mypage->title_body($statsb_parameters[0]); $mypage->loginbox(array('Location' => 4, 'Mode' => $mode, 'Players' => $numplayers, 'Board' => $board, 'UserID' => $RequestedUserID, 'Page' => $Page)); $mypage->leaf('h1', $statsb_parameters[0]); $StartPoint = 100 * ($Page - 1); $QueryResult = dbquery(DBQUERY_READ_RESULTSET, 'SELECT SQL_CALC_FOUND_ROWS "UserID", "Name", ' . $statsb_parameters[1] . ' FROM "User" WHERE "UserValidated" = 1 ORDER BY ' . $statsb_parameters[2] . ' DESC, "UserID" LIMIT :startpoint:, 100', 'startpoint', $StartPoint); $CountQueryResult = dbquery(DBQUERY_READ_INTEGER, 'SELECT FOUND_ROWS() AS "Co"'); if (!$CountQueryResult) { $mypage->leaf('p', 'There aren\'t any users to display.'); $mypage->leaf('p', 'Click <a href="index.php">here</a> to return to the Main Page, or <a href="statistics.php">here</a> to return to the main Statistics page.'); $mypage->finish(); } require HIDDEN_FILES_PATH . 'paginate.php'; $PaginationBar = paginationbar('user', 'users', SITE_ADDRESS . 'statistics.php', array('Mode' => $mode), 100, $Page, $CountQueryResult); $mypage->append($PaginationBar[0]); if ($QueryResult === 'NONE') { $mypage->leaf('p', 'Click <a href="index.php">here</a> to return to the Main Page, or <a href="statistics.php">here</a> to return to the main Statistics page.'); $mypage->finish(); } $mypage->opennode('table'); $mypage->opennode('thead'); $mypage->opennode('tr'); $mypage->leaf('th', 'Rank', 'style="min-width: 80px;"'); $mypage->leaf('th', 'Name', 'style="min-width: 320px;"'); $mypage->leaf('th', $statsb_parameters[3], 'style="min-width: 80px;"'); $mypage->closenode(2); $mypage->opennode('tbody'); while ($row = db_fetch_assoc($QueryResult)) { if ($_SESSION['LoggedIn'] and $_SESSION['MyUserID'] == $row['UserID']) {
function gamelistdisplayuf(tagtree &$tt, $ThePlayerID, $PlayerName, $PlayerPronoun, $DisplayNotification, $StartPoint, $MaxResults, $Pagenum) { if ($DisplayNotification) { $MaxResults++; } $QueryResult = dbquery(DBQUERY_READ_RESULTSET, 'SELECT "PlayerGameRcd"."Colour" AS "UsersColour", "PlayerGameRcd"."Inherited", "PlayerGameRcd"."GameCounts", "PlayerGameRcd"."GameResult", "PlayerGameRcd"."NumLongTurns", "Game"."GameID", "Game"."Friendly", "Game"."GameName", "Game"."GTitleDeletedByAdmin", "Game"."LastMove", "Game"."GameCreator", "Game"."OriginalPlayers", "Game"."CurrentPlayers", "Game"."GameStatus", "GameVersion"."ShortVersionName", "GameVersionGroup"."VersionName", "GameVersion"."VersionNameSuffix", "GameVersion"."Creators", "User"."Name" AS "GameCreatorName", "GameInProgress"."PlayerToMove", "GameInProgress"."AbortVote", "GameInProgress"."KickVote", ROUND("PGRScore"."Score"/100, 2) AS "Score", "ParticipantRcd"."CurrentOccupant" FROM "PlayerGameRcd" JOIN "Game" ON "PlayerGameRcd"."Game" = "Game"."GameID" JOIN "GameVersion" ON "Game"."GVersion" = "GameVersion"."VersionID" JOIN "GameVersionGroup" ON "GameVersion"."VersionGroup" = "GameVersionGroup"."VersionGroupID" JOIN "User" ON "Game"."GameCreator" = "User"."UserID" LEFT JOIN "GameInProgress" ON "Game"."GameID" = "GameInProgress"."Game" LEFT JOIN "PGRScore" ON "PlayerGameRcd"."Game" = "PGRScore"."Game" AND "PlayerGameRcd"."User" = "PGRScore"."User" LEFT JOIN "PlayerGameRcd" AS "ParticipantRcd" ON "ParticipantRcd"."User" = :me: AND "Game"."GameID" = "ParticipantRcd"."Game" WHERE "PlayerGameRcd"."User" = :user: AND "PlayerGameRcd"."GameResult" NOT IN (\'Playing\', \'Hide\') ORDER BY "Game"."LastMove" DESC LIMIT :startpoint:, :maxresults:', 'user', $ThePlayerID, 'me', $_SESSION['MyUserID'], 'startpoint', $StartPoint, 'maxresults', $MaxResults); if ($DisplayNotification) { $MaxResults--; if ($QueryResult === 'NONE') { $tt->leaf('p', 'None'); return; } $fb = fragment::blank(); $PaginationBar = array($fb, $fb); } else { require_once HIDDEN_FILES_PATH . 'paginate.php'; $CountQueryResult = dbquery(DBQUERY_READ_INTEGER, 'CALL "CountUsersGamesFinished"(:user:)', 'user', $ThePlayerID); if (!$CountQueryResult) { return false; } $PaginationBar = paginationbar('game', 'games', SITE_ADDRESS . 'oldgames.php', array('UserID' => $ThePlayerID), 100, $Pagenum, $CountQueryResult); if ($QueryResult === 'NONE') { $tt->append($PaginationBar[0]); return; } } $PlayerColours = array('FFC18A', 'FFFFAF', '9FFF9F', 'FFC6FF', 'C4C4C4'); $ColourNames = array(transtext('_colourRed'), transtext('_colourYellow'), transtext('_colourGreen'), transtext('_colourPurple'), transtext('_colourGrey')); $TranslatedResults = array('Finished 1st' => transtext('_ugResult1st'), 'Finished 2nd' => transtext('_ugResult2nd'), 'Finished 3rd' => transtext('_ugResult3rd'), 'Finished 4th' => transtext('_ugResult4th'), 'Finished 5th' => transtext('_ugResult5th'), 'Game Aborted' => transtext('_ugResultAborted'), 'Quit' => transtext('_ugResultQuit'), 'Kicked by Admin' => transtext('_ugResultKickA'), 'Kicked by System' => transtext('_ugResultKickS'), 'Kicked by Vote' => transtext('_ugResultKickV')); $frag = fragment::blank(); $OldGameID = 0; $i = 0; while ($row = db_fetch_assoc($QueryResult)) { if ($row['GameID'] != $OldGameID) { $i++; if ($i > $MaxResults) { // "This table shows only X's last 20 games" etc $tt->leaf('p', str_replace(array('\\username', '\\pronoun', '\\userid'), array($PlayerName, $PlayerPronoun, $ThePlayerID), transtext('_ugFinishedNote'))); break; } $OldGameID = $row['GameID']; if ($row['GTitleDeletedByAdmin']) { $row['GameName'] = 'The title of this game has been cleared by an Administrator'; } if (is_null($row['CurrentOccupant']) or $row['CurrentOccupant'] > 0 and !$row['GameIsFinished']) { $RowTagAttributes = null; } else { if ($row['GameStatus'] == 'In Progress' and $row['PlayerToMoveID'] == $_SESSION['MyUserID'] or $row['GameStatus'] == 'Recruiting Replacement' and !is_null($row['Colour'])) { $RowTagAttributes = 'class="mymove"'; } else { if (($row['GameStatus'] == 'In Progress' or $row['GameStatus'] == 'Recruiting Replacement') and ($row['AbortVote'] != '00000' or $row['KickVote'] != '00000')) { $RowTagAttributes = 'class="myattn"'; } else { $RowTagAttributes = 'class="mygame"'; } } } $frag->opennode('tr', $RowTagAttributes); $version_name = vname($row['VersionName'], $row['VersionNameSuffix']); $frag->leaf('td', '<img src="gfx/icon-' . strtolower($row['ShortVersionName']) . '.png" alt="' . $version_name . '" title="' . $version_name . ' (' . $row['Creators'] . ')">', 'width=23 style="border-right: none;"'); $frag->leaf('td', '<a href="board.php?GameID=' . $row['GameID'] . '">' . $row['GameName'] . '</a>', 'style="border-left: none; padding-left: 0px; text-align: left;"'); $frag->leaf('td', '<a href="userdetails.php?UserID=' . $row['GameCreator'] . '">' . $row['GameCreatorName'] . '</a>'); if ($row['Friendly']) { $frag->leaf('td', transtext('^Yes'), 'bgcolor="#9FFF9F"'); } else { $frag->leaf('td', transtext('^No'), 'bgcolor="#FFC18A"'); } $frag->leaf('td', $row['CurrentPlayers'] . ($row['CurrentPlayers'] == $row['OriginalPlayers'] ? '' : ' / ' . $row['OriginalPlayers'])); $frag->leaf('td', $row['GameStatus']); $lmtime = strtotime($row['LastMove']); $frag->opennode('td'); $frag->leaf('span', date('Y', $lmtime), 'style="font-size: 50%;"'); $frag->text(date('M-d', $lmtime)); $frag->closenode(); $frag->leaf('td', $ColourNames[$row['UsersColour']], 'bgcolor="#' . $PlayerColours[$row['UsersColour']] . '"'); $frag->leaf('td', $TranslatedResults[$row['GameResult']]); $frag->leaf('td', $row['NumLongTurns']); $frag->leaf('td', is_null($row['Score']) ? 'n/a' : $row['Score']); $frag->leaf('td', $row['GameCounts'] ? transtext('^Yes') : transtext('^No')); $frag->leaf('td', $row['Inherited'] ? transtext('^Yes') : transtext('^No')); $frag->closenode(); } } $tt->append($PaginationBar[0]); $tt->opennode('table', 'class="table_extra_horizontal_padding"'); $tt->opennode('thead'); $tt->opennode('tr'); $tt->leaf('th', 'Name', 'colspan=2 style="width: 175px;"'); $tt->leaf('th', 'Creator'); $tt->leaf('th', 'Frdly', 'title="Whether the game was a "friendly" game."'); $tt->leaf('th', 'P', 'title="The number of players the game had when it finished (or currently has, if it hasn\'t finished) / the number of players it had when it started."'); $tt->leaf('th', 'Status'); $tt->leaf('th', 'Last Move', 'style="min-width: 75px;"'); $tt->leaf('th', transtext('_ugColColour'), 'title="The colour ' . $PlayerName . ' played as in this game."'); $tt->leaf('th', transtext('_ugColResult'), 'style="min-width: 90px;" title="The result ' . $PlayerName . ' achieved in this game. Usually this will be a rank achieved at the final scoring."'); $tt->leaf('th', transtext('_ugColLT'), 'title=""Long Turns": The number of times in this game ' . $PlayerName . ' took longer than Time Limit A to make a decision."'); $tt->leaf('th', transtext('_ugColScore'), 'title="The score ' . $PlayerName . ' achieved in this game. The decimal part gives the player\'s position on the income track."'); $tt->leaf('th', 'Counts', 'title="Whether the game counts towards ' . $PlayerName . '\'s statistics. Sometimes if you join a game in the middle, it does not contibute (either negatively or positively) toward your personal statistics."'); $tt->leaf('th', 'Inhrtd', 'title="Whether ' . $PlayerName . ' inherited this game, that is, took over from another player who had left the game."'); $tt->closenode(2); // tr, thead $tt->opennode('tbody'); $tt->append($frag); $tt->closenode(2); // tbody, table $tt->append($PaginationBar[1]); }
$mypage->text('This board is closed ---'); $mypage->emptyleaf('input', 'type="checkbox" name="BoardAdminOnly" value=1' . $SAdminOnly); $mypage->text('This board is admin-only ---'); $mypage->emptyleaf('input', 'type="submit" name="FormSubmit" value="Execute"'); $mypage->closenode(); $mypage->emptyleaf('input', 'type="hidden" name="WhichBoard" value=' . $BoardID); $mypage->closenode(); } $CountQueryResult = dbquery(DBQUERY_READ_INTEGER, 'SELECT COUNT(*) AS "Co" FROM "NonGameThread" WHERE "Board" = :board:', 'board', $BoardID); if (!$CountQueryResult) { $mypage->leaf('p', 'There aren\'t any threads to display.'); } else { $StartPoint = 100 * ($Page - 1); $QR = dbquery(DBQUERY_READ_RESULTSET, 'SELECT "GeneralThread"."ThreadID", "GeneralThread"."Closed", "GeneralThread"."NumberOfPosts", "NonGameThread"."LastPost", "NonGameThread"."OriginalPoster", "NonGameThread"."LastPoster", "NonGameThread"."Sticky", "NonGameThread"."Title", "NonGameThread"."TitleDeletedByAdmin", "User"."UserID", "User"."Name", "LastPoster"."UserID" AS "LastPosterUserID", "LastPoster"."Name" AS "LastPosterName" FROM "NonGameThread" LEFT JOIN "GeneralThread" ON "NonGameThread"."Thread" = "GeneralThread"."ThreadID" LEFT JOIN "User" ON "NonGameThread"."OriginalPoster" = "User"."UserID" LEFT JOIN "User" AS "LastPoster" ON "NonGameThread"."LastPoster" = "LastPoster"."UserID" WHERE "NonGameThread"."Board" = :board: ORDER BY "NonGameThread"."Sticky" DESC, "NonGameThread"."LastPost" DESC LIMIT :startpoint:, 100', 'board', $BoardID, 'startpoint', $StartPoint); require_once HIDDEN_FILES_PATH . 'paginate.php'; $PaginationBar = paginationbar('thread', 'threads', SITE_ADDRESS . 'boardview.php', array('BoardID' => $BoardID), 100, $Page, $CountQueryResult); $mypage->append($PaginationBar[0]); if ($QR !== 'NONE') { $mypage->opennode('table', 'class="table_extra_horizontal_padding"'); $mypage->opennode('thead'); $mypage->opennode('tr'); $mypage->leaf('th', 'Name', 'style="width: 300px;"'); $mypage->leaf('th', 'Creator'); $mypage->leaf('th', 'Posts'); $mypage->leaf('th', 'Last Post'); $mypage->leaf('th', 'Last Poster'); $mypage->closenode(2); $mypage->opennode('tbody'); while ($row = db_fetch_assoc($QR)) { if ($row['TitleDeletedByAdmin']) { $row['Title'] = 'The title of this thread has been cleared by an Administrator';
$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]); if ($QueryResult != 'NONE') { $TranslatedResults = array('Finished 1st' => transtext('_ugResult1st'), 'Finished 2nd' => transtext('_ugResult2nd'), 'Finished 3rd' => transtext('_ugResult3rd'), 'Finished 4th' => transtext('_ugResult4th'), 'Finished 5th' => transtext('_ugResult5th')); $mypage->opennode('table', 'class="table_extra_horizontal_padding"'); $mypage->opennode('thead'); $mypage->opennode('tr'); $mypage->leaf('th', ''); $mypage->leaf('th', 'Score'); if (!$EscapedUserID) { $mypage->leaf('th', 'User'); } if ($resultcolumn) { $mypage->leaf('th', 'Result'); }
$mypage->leaf('p', $QR['ModuleDescription']); if (!$Language and $Administrator < 2) { $mypage->leaf('p', 'Your language is set to English. Please click <a href="translatea.php">here</a> to select a language to translate into, or <a href="index.php">here</a> to return to the Main Page.'); $mypage->finish(); } $QR = dbquery(DBQUERY_READ_RESULTSET, 'SELECT * FROM "Phrase" WHERE "Module" = :module: ORDER BY "CurrentlyInUse" DESC, "OrderingNumber" LIMIT :startpoint:, 20', 'module', $ModuleID, 'startpoint', $StartPoint); $QRX = dbquery(DBQUERY_READ_INTEGER, 'SELECT COUNT(*) AS "Co" FROM "Phrase" WHERE "Module" = :module:', 'module', $ModuleID); if (!$QRX) { $mypage->leaf('p', 'There are no phrases to translate for this page yet.'); } else { require_once HIDDEN_FILES_PATH . 'paginate.php'; $PBArgument4Array['ModuleID'] = $ModuleID; if ($SimulateTranslatorMode) { $PBArgument4Array['SimulateTranslatorMode'] = 1; } $PaginationBar = paginationbar('phrase', 'phrases', SITE_ADDRESS . 'translateb.php', $PBArgument4Array, 20, $Page, $QRX); $mypage->append($PaginationBar[0]); $PhrasesStillInUse = true; while ($row = db_fetch_assoc($QR)) { if ($PhrasesStillInUse and !$row['CurrentlyInUse']) { $PhrasesStillInUse = false; $mypage->leaf('pre', "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n++++++++++++++++++++++++++++++ PHRASES FROM HERE ON DOWN ARE NOT IN USE ++++++++++++++++++++++++++++++\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } if ($Administrator < 2 or $SimulateTranslatorMode and $Language) { $mypage->opennode('div', 'style="position: relative; width: 960px; border: 1pt solid black; padding: 7px; margin-bottom: 10px; background-color: #E7E7E7;"'); $mypage->leaf('div', $row['OrderingNumber'], 'style="float: right; border: none; margin: 5px 0px; text-align: right; font-size: 75%;"'); $mypage->leaf('p', $row['PhraseName'], 'style="font-family: monospace;"'); $mypage->leaf('div', $row['PhraseInEnglish'], 'style="position: relative; width: 944px; border: 1pt solid black; padding: 7px; margin-bottom: 7px; background-color: #FFC18A; font-family: monospace;"'); if (!is_null($row['Description'])) { $mypage->opennode('div', 'style="position: relative; width: 944px; border: 1pt solid black; padding: 7px; margin-bottom: 7px; background-color: #EA77EA;"'); $mypage->leaf('b', 'Description:');