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]); }
function gamelistdisplayx(tagtree &$tt) { if ($_SESSION['LoggedIn']) { $Query = 'CALL "ListGamesNeedingReplacements_LoggedIn"(:me:)'; $me = $_SESSION['MyUserID']; } else { $Query = 'CALL "ListGamesNeedingReplacements_LoggedOut"()'; $me = 0; } $QueryResult = dbquery(DBQUERY_READ_RESULTSET, $Query, 'me', $me); if ($QueryResult === 'NONE') { $tt->leaf('p', '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', 'Found?', 'title="Has at least one candidate replacement been found for the seat that is unfilled?"'); $tt->leaf('th', 'Original', 'title="The number of players the game had when it started."'); $tt->leaf('th', 'Current', 'title="The number of players (as in seats, whether filled or unfilled) the game has at present."'); $tt->leaf('th', '<a href="http://orderofthehammer.com/credits.htm#acronyms">TLA</a>', 'style="min-width: 36px;" title=""Time Limit A" - click the link for more information."'); $tt->leaf('th', '<a href="http://orderofthehammer.com/credits.htm#acronyms">TLB</a>', 'style="min-width: 36px;" title=""Time Limit B" - click the link for more information."'); $tt->leaf('th', 'Round', 'style="width: 46px;"'); $tt->leaf('th', 'Talk Rules', 'style="min-width: 100px;"'); $tt->closenode(2); // tr, thead $tt->opennode('tbody'); $RoundColumnStyles = array('gamelist_roundcol_c', 'gamelist_roundcol_r'); $OldGameID = 0; while ($row = db_fetch_assoc($QueryResult)) { if ($row['GameID'] != $OldGameID) { $OldGameID = $row['GameID']; 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'])) { if (!is_null($row['Colour'])) { $RowTagAttributes = 'class="mymove"'; } else { if ($row['AbortVote'] == '00000' and $row['KickVote'] == '00000') { $RowTagAttributes = 'class="mygame"'; } else { $RowTagAttributes = 'class="myattn"'; } } } } else { $GameCreatorColumn = $row['GameCreatorName']; } if ($row['TimeLimitA'] <= 1080) { $TLACellAttributes = 'class="alert"'; } else { if ($row['TimeLimitA'] <= 1800) { $TLACellAttributes = 'style="font-weight: bold;"'; } else { $TLACellAttributes = null; } } if ($row['TimeLimitB'] <= 2160) { $TLBCellAttributes = 'class="alert"'; } else { if ($row['TimeLimitB'] <= 3600) { $TLBCellAttributes = 'style="font-weight: bold;"'; } else { $TLBCellAttributes = null; } } $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"'); } if (is_null($row['Colour'])) { $tt->leaf('td', transtext('^No'), 'bgcolor="#FFC18A"'); } else { $tt->leaf('td', transtext('^Yes'), 'bgcolor="#9FFF9F"'); } $tt->leaf('td', $row['OriginalPlayers']); $tt->leaf('td', $row['CurrentPlayers']); $tt->leaf('td', minutes_mhd($row['TimeLimitA']), $TLACellAttributes); $tt->leaf('td', minutes_mhd($row['TimeLimitB']), $TLBCellAttributes); $tt->leaf('td', ($row['Round'] >= 10 ? '' : ' ') . $row['Round'] . ' / ' . $row['NumRounds'], 'class="' . $RoundColumnStyles[$row['RailPhase']] . '"'); $tt->leaf('td', $row['TalkRules']); $tt->closenode(); } } $tt->closenode(2); // tbody, table }
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]); }
function AdminFP(tagtree &$tt) { global $Administrator; $queries = array('SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'User\' AND "EventTime" > TIMESTAMPADD(HOUR, -24, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'User\' AND "EventTime" > TIMESTAMPADD(HOUR, -72, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Message\' AND "EventTime" > TIMESTAMPADD(HOUR, -24, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Message\' AND "EventTime" > TIMESTAMPADD(HOUR, -72, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Game\' AND "EventTime" > TIMESTAMPADD(HOUR, -24, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Game\' AND "EventTime" > TIMESTAMPADD(HOUR, -72, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Email\' AND "EventTime" > TIMESTAMPADD(HOUR, -24, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Email\' AND "EventTime" > TIMESTAMPADD(HOUR, -72, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Maintenance\' AND "EventTime" > TIMESTAMPADD(HOUR, -24, UTC_TIMESTAMP())', 'SELECT COUNT(*) AS "Co" FROM "RecentEventLog" WHERE "EventType" = \'Maintenance\' AND "EventTime" > TIMESTAMPADD(HOUR, -72, UTC_TIMESTAMP())'); $minor_warning_boundaries_above = array(10, 25, 100, 250, 30, 75, 8, 20, 110, 330); $major_warning_boundaries_above = array(15, 37, 150, 375, 45, 112, 12, 30, 112, 336); $minor_warning_boundaries_below = array(0, 0, 0, 0, 0, 0, 0, 0, 109, 328); $major_warning_boundaries_below = array(0, 0, 0, 0, 0, 0, 0, 0, 107, 326); for ($i = 0; $i < count($queries); $i++) { $width = $i ? null : 'width=40 '; $stats[$i] = dbquery(DBQUERY_READ_INTEGER, $queries[$i]); if ($stats[$i] > $minor_warning_boundaries_above[$i] or $stats[$i] < $minor_warning_boundaries_below[$i]) { $alerts[$i] = $width . 'class="hugealert"'; } else { if ($stats[$i] > $major_warning_boundaries_above[$i] or $stats[$i] < $major_warning_boundaries_below[$i]) { $alerts[$i] = $width . 'class="bigalert"'; } else { $alerts[$i] = $width; } } } if ($Administrator == 2) { $tt->opennode('p'); $tt->leaf('a', 'SQL Query Page', 'href="http://orderofthehammer.com/query.php"'); $tt->text('/'); $tt->leaf('a', 'SQL squasher', 'href="sql_squash.php"'); $tt->text('/'); $tt->leaf('a', 'Manage Procedures', 'href="manageprocedures.php"'); $tt->emptyleaf('br'); $tt->leaf('a', 'Specification Converter', 'href="spec_convert.php"'); $tt->text('/'); $tt->leaf('a', 'Board Preview', 'href="gvpreview.php"'); $tt->text('/'); $tt->leaf('a', 'To Do list', 'href="todolist.php"'); $tt->text('/'); $tt->leaf('a', 'Password Generator', 'href="pwgen.php"'); $tt->closenode(); // p } $tt->opennode('table', 'class="table_no_borders" style="text-align: left;"'); $tt->opennode('tr'); $tt->leaf('td', 'New Users in last 24 hours:', 'align=right'); $tt->leaf('td', '', 'width=10'); $tt->leaf('td', $stats[0], $alerts[0]); $tt->leaf('td', 'and in last 72 hours:'); $tt->leaf('td', '', 'width=10'); $tt->leaf('td', $stats[1], $alerts[1]); $tt->next(); $tt->leaf('td', 'New Messages in last 24 hours:', 'align=right'); $tt->leaf('td', ''); $tt->leaf('td', $stats[2], $alerts[2]); $tt->leaf('td', 'and in last 72 hours:'); $tt->leaf('td', ''); $tt->leaf('td', $stats[3], $alerts[3]); $tt->next(); $tt->leaf('td', 'New Games in last 24 hours:', 'align=right'); $tt->leaf('td', ''); $tt->leaf('td', $stats[4], $alerts[4]); $tt->leaf('td', 'and in last 72 hours:'); $tt->leaf('td', ''); $tt->leaf('td', $stats[5], $alerts[5]); $tt->next(); $tt->leaf('td', 'New <a href="emails.php?emailtype=3">Emails</a> in last 24 hours:', 'align=right'); $tt->leaf('td', ''); $tt->leaf('td', $stats[6], $alerts[6]); $tt->leaf('td', 'and in last 72 hours:'); $tt->leaf('td', ''); $tt->leaf('td', $stats[7], $alerts[7]); $tt->next(); $tt->leaf('td', 'New maintenance logs in last 24 hours:', 'align=right'); $tt->leaf('td', ''); $tt->leaf('td', $stats[8], $alerts[8]); $tt->leaf('td', 'and in last 72 hours:'); $tt->leaf('td', ''); $tt->leaf('td', $stats[9], $alerts[9]); $tt->closenode(2); // tr, table }