function include_tools_text() { $objSrcUser =& $GLOBALS["objSrcUser"]; include_once 'inc/pages/advisors.inc.php'; $toolsText = get_guide_link($objSrcUser, 'tools'); echo $toolsText; }
function include_advisors_text() { $objSrcUser =& $GLOBALS["objSrcUser"]; $show = 'population'; if (isset($_GET['show'])) { $show = $_GET['show']; } echo get_advisor_links($show); switch ($show) { case 'population': ?> <!-- <div id="textMedium"> <p><b>The population advisor</b> greets you humbly:<br />Leader, no lands have ever before seen such great care that you show us. Please allow me to kiss your feet.</p> </div> --> <div id="columns"> <!-- Start left column --> <div id="leftcolumn"> <h2>Population</h2> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=build">Construction</a> </div> <?php echo get_housing_table($objSrcUser); ?> <br /> <?php echo get_population_table($objSrcUser); ?> <?php echo get_guide_link($objSrcUser, 'advisor_population'); ?> </div> <!-- end left column --> <!-- start right column --> <div id="rightcolumn"> <h2>Citizens</h2> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=mystic">Mystics</a> </div> <?php echo get_citizen_table($objSrcUser); ?> </div> <!-- End of the right column--> </div> <!-- end of 2 column layout --> <?php break; // end case population // end case population case 'resources': ?> <!-- <div id="textMedium"> <p><b>The resource advisor</b> greets you humbly:<br />Leader, no lands have ever before seen such great care that you show us. Please allow me to kiss your feet.</p> </div> --> <div id="columns"> <!-- Start left column --> <div id="leftcolumn"> <h2>Production</h2> <?php echo get_income_table($objSrcUser); ?> <br /><br /> <?php echo get_wood_table($objSrcUser); ?> <h2>Resources</h2> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=market&action=sell">Sell Goods</a> </div> <?php echo get_goods_table($objSrcUser); ?> </div> <!-- end left column --> <!-- start right column --> <div id="rightcolumn"> <h2> </h2> <?php echo get_food_table($objSrcUser); ?> <br /><br /> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=research">Invest</a> </div> <?php echo get_research_table($objSrcUser); ?> <h2> </h2> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=advisors&show=build">Infrastructure</a> </div> <?php echo get_building_output_table($objSrcUser); ?> </div> <!-- end right column --> </div> <!-- end of 2 column layout --> <?php break; // end case resources // end case resources case 'military': include_once "inc/functions/tribe.php"; ?> <!-- <div id="textMedium"> <p><b>Your general</b> greets you humbly:<br />Leader, no lands have ever before seen such great care that you show us. Please allow me to kiss your feet.</p> </div> --> <br /> <!-- Start 2 column layout --> <div id="columns"> <!-- Start left column --> <div id="leftcolumn"> <?php echo get_offence_table($objSrcUser); ?> </div> <!-- end left column --> <!-- start right column --> <div id="rightcolumn"> <?php echo get_defence_table($objSrcUser); ?> </div> <!-- end right column --> </div> <div class="clear"><hr /></div> <!-- end of 2 column layout --> <br /> <div class="tableLinkMedium"> <a href="main.php?cat=game&page=army">Military Training</a> </div> <?php echo get_military_training_table($objSrcUser); ?> <br /> <div class="tableLinkMedium"> <a href="main.php?cat=game&page=invade">Invasion</a> </div> <?php echo get_military_returning_table($objSrcUser); ?> <?php echo get_guide_link($objSrcUser, 'advisor_military', 'textMedium'); ?> <br /> <?php break; // end case military // end case military case 'actions': ?> <!-- <div id="textMedium"> <p><b>The advisor</b> greets you humbly:<br />Leader, no lands have ever before seen such great care that you show us. Please allow me to kiss your feet.</p> </div> --> <br /> <div id="columns"> <!-- Start left column --> <div id="leftcolumn"> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=mystic">Mystics</a> </div> <?php echo get_effecting_spells_table($objSrcUser); ?> <?php echo get_guide_link($objSrcUser, 'advisor_actions'); ?> </div> <!-- end left column --> <!-- start right column --> <div id="rightcolumn"> <div class="tableLinkSmall"> <a href="main.php?cat=game&page=thievery">Thievery</a> </div> <?php echo get_effecting_ops_table($objSrcUser); ?> </div> <!-- end right column --> </div> <div class="clear"><hr /></div> <!-- end of 2 column layout --> <?php break; // end case actions // end case actions case 'build': ?> <!-- <div id="textMedium"> <p><b>The tribe architect</b> greets you humbly:<br />Leader, no lands have ever before seen such great care that you show us. Please allow me to kiss your feet.</p> </div> --> <br /> <div class="tableLinkMedium"> <a href="main.php?cat=game&page=explore">Exploration</a> :: <a href="main.php?cat=game&page=build">Construction</a> </div> <?php echo get_construction_table($objSrcUser); ?> <?php echo get_guide_link($objSrcUser, 'advisor_build', 'textMedium'); break; // end case build } }
function include_war_room_text() { // User object $objSrcUser = $GLOBALS['objSrcUser']; $arrSrcStats = $objSrcUser->get_stats(); // Alliance object $objSrcAlli = $objSrcUser->get_alliance(); $arrSrcWar = $objSrcAlli->get_wars(); // Include war functions // Show declare war page is default unless the alliance is at war $strShow = "declare_war"; if ($arrSrcWar['target'] != 0) { $strShow = "current_war"; } // Show page switch ($strShow) { case "declare_war": // M: Show statistics (if we have been in war) $strStatistics = ''; if ($arrSrcWar['last_target'] != 0) { // M: Show statistics, with correct grammar $arrS = array('ies', 's', 's', 's'); if ($arrSrcWar['victory'] == 1) { $arrS[0] = 'y'; } if ($arrSrcWar['defeat'] == 1) { $arrS[1] = ''; } if ($arrSrcWar['surrender'] == 1) { $arrS[2] = ''; } if ($arrSrcWar['truce'] == 1) { $arrS[3] = ''; } $strStatistics .= '<p>' . '<strong class="positive">' . $arrSrcWar['victory'] . " war victor{$arrS['0']}</strong>—defeated " . $arrSrcWar['defeat'] . " time{$arrS['1']}.<br />" . "We have surrendered " . $arrSrcWar['surrender'] . " time{$arrS['2']} and truced " . $arrSrcWar['truce'] . " time{$arrS['3']}.</strong>" . '</p><p>'; // Info about who the last wartarget was - AI $objTrgAlli = new clsAlliance($arrSrcWar['last_target']); $arrTrgAlli = $objTrgAlli->get_alliance_infos(); // M: Show continued statistics, with correct grammar if ($arrSrcWar['last_outgoing'] == 'surrender') { $strF = 'Our last war ended as a %s to %s (#%d).'; } elseif ($arrSrcWar['last_outgoing'] == 'victory') { $strF = 'Our last war ended as a %s over %s (#%d).'; } elseif ($arrSrcWar['last_outgoing'] == 'defeat') { $strF = 'Our last war ended as a %s against %s (#%d).'; } elseif ($arrSrcWar['last_outgoing'] == 'truce') { $strF = 'Our last war ended in a %s with %s (#%d).'; } // M: Echo continued statistics $strStatistics .= sprintf($strF, $arrSrcWar['last_outgoing'], stripslashes($arrTrgAlli['name']), $arrSrcWar['last_target']); $strStatistics .= '</p>'; } else { $strStatistics .= '<p>We have not been in a war yet.</p>'; } // M: Find alliances in range $iAlliSize = $objSrcAlli->get_alliance_size('land'); $iUpwardRange = floor($iAlliSize * WAR_UPWARD_MOD); $iBottomRange = ceil($iAlliSize * WAR_BOTTOM_MOD); $strSQL = "SELECT id FROM rankings_alliance "; $strSQL .= "WHERE land BETWEEN {$iBottomRange} and {$iUpwardRange} "; $strSQL .= "ORDER BY land DESC"; $resSQL = mysql_query($strSQL); $count = 1; $objTmpAlli = new clsAlliance(1); $strTableRow = ''; $strInputList = '<option selected="selected"></option>'; while ($row = mysql_fetch_assoc($resSQL)) { // M: Get temporary alliance object $objTmpAlli->set_allianceid($row['id']); // M: Check if war is possible $arrWarPossible = testWarPossible($objSrcAlli, $objTmpAlli); $bWarPossible = $arrWarPossible[0]; if ($bWarPossible) { // M: Fetch alliance rankings $arrTmpRanks = $objTmpAlli->get_rankings_alliances(); $strAllianceLink = "<a href=\"main.php?cat=game&page=" . "alliance&aid={$row['id']}\">{$row['id']}</a>"; // M: Create drop-down list with targets in range (for form) $strInputList .= '<option value="' . $row['id'] . '">' . stripslashes($arrTmpRanks['alli_name']) . '</option>'; // M: Create "Alliances in range" table data $strTableRow .= "<tr class=data>" . '<th width="22">' . $count . '.</th>' . "<th>" . stripslashes($arrTmpRanks['alli_name']) . " (#{$strAllianceLink})" . "</th>" . "<td>" . number_format($arrTmpRanks['land']) . "</td>" . "<td>" . number_format($arrTmpRanks[STRENGTH]) . "</td>" . "<td>" . number_format($arrTmpRanks['fame']) . "</td>" . "</tr>"; $count++; } } if ($count == 1) { $strTableRow .= '<tr class="data">' . '<th class="center" colspan="5">' . "There are no alliances that we can declare against." . '</th>' . "</tr>"; $strForm = "<p>There are no alliances that we can declare against.</p>"; } elseif ($_SERVER['SERVER_NAME'] == DEV_SERVER_NAME || $arrSrcStats['type'] == "elder" || $arrSrcStats['type'] == "coelder") { $strForm = '<form method="post" action="main.php?cat=game&page=war_room2" id="center">' . '<label>Alliance: ' . '<select name="target">' . $strInputList . '</select>' . '</label> ' . '<input type="submit" name="declare" value="Declare War!" />' . '</form><br />'; } else { $strForm = '<p>Only alliance elders can declare war.</p>'; } // M: Show page contents echo $strPage = '<div id="textMedium" style="margin-top: 0;">' . '<h2>Declare War</h2>' . '<p>' . "In a war, knowing the enemy is very important. " . "Decipher the enemies' weaknesses and avoid " . "confronting their strengths. Gather information about " . "their tribes and research, and then choose targets for " . "your attackers, thieves and mages." . '</p>' . '<h3>Statistics</h3>' . $strStatistics . '<h3>New war target</h3>' . $strForm . '</div><br />' . '<table class="medium" cellpadding="0" cellspacing="0">' . '<tr class="header">' . '<th colspan="5">Alliances in Range</th>' . '</tr>' . '<tr class="subheader"><th colspan="2">Alliance</th>' . '<th>Acres</th>' . '<th class="right">Strength</th>' . '<th class="right">Fame</th>' . '</tr>' . $strTableRow . '</table>'; break; case "current_war": // We are in war $objTrgAlli = new clsAlliance($arrSrcWar['target']); $arrTrgAlli = $objTrgAlli->get_alliance_infos(); $arrTrgWar = $objTrgAlli->get_wars(); // Time of war start // Get game hours require_once 'inc/classes/clsGame.php'; require_once 'inc/functions/orktime.php'; $objGame = new clsGame(); $iGameHours = $objGame->get_game_time('hour_counter'); $arrOE = hoursToYears(WAR_LENGTH - ($iGameHours - $arrSrcWar['war_started'])); $strOrkDate = "{$arrOE['years']} years and {$arrOE['months']} months"; // Option: Claim Victory (tho should be automatic like "final blow") $strDiplomacy = ''; if ($arrSrcWar['land_needed'] <= 0) { $strDiplomacy .= '<p>We have reached our war goal. Do you wish to claim this victory?</p>' . '<form method="post" action="main.php?cat=game&page=war_room2" id="center">' . '<input type="submit" name="victory" value="Claim Victory!">' . "</form><br />"; } elseif (($_SERVER['SERVER_NAME'] == DEV_SERVER_NAME || $arrSrcStats['type'] == "elder" || $arrSrcStats['type'] == "coelder") && $arrSrcWar['truce_offer'] == 1 && $arrTrgWar['truce_offer'] == 0) { $strDiplomacy .= '<p>' . "Alliance #" . $objTrgAlli->get_allianceid() . " has " . "not accepted our generous offer to truce yet. " . '</p>' . '<p>' . "As a last resort and at a greater cost we may " . "surrender. (+40% war losses). The only valid reason " . "to do this is to save our alliance from further damage." . '</p>' . '<p>Do you wish to surrender?</p>' . '<form method="post" action="main.php?cat=game&page=war_room2" id="center">' . '<input type="submit" name="ctruce" value="Withdraw Truce" /> ' . '<input type="submit" name="surrender" value="Surrender War" />' . '</form><br />'; } elseif (($_SERVER['SERVER_NAME'] == DEV_SERVER_NAME || $arrSrcStats['type'] == "elder" || $arrSrcStats['type'] == "coelder") && $arrSrcWar['truce_offer'] == 0 && $arrTrgWar['truce_offer'] == 0) { $strDiplomacy .= '<p>We have the option to offer a truce to the enemy.</p>' . '<form method="post" action="main.php?cat=game&page=war_room2" id="center">' . '<input type="submit" name="otruce" value="Offer truce">' . "</form><br />"; } elseif (($_SERVER['SERVER_NAME'] == DEV_SERVER_NAME || $arrSrcStats['type'] == "elder" || $arrSrcStats['type'] == "coelder") && $arrSrcWar['truce_offer'] == 0 && $arrTrgWar['truce_offer'] == 1) { $strDiplomacy .= '<p>' . "Leader, #<strong>{$arrTrgWar['id']}</strong> has " . "offered us a truce." . '</p>' . '<form method="post" action="main.php?cat=game&page=war_room2" id="center">' . '<input type="submit" name="atruce" value="Accept Truce">' . '</form><br />'; } echo $strPage = '<div class="tableLinkMedium">' . '<a href="main.php?cat=game&page=global_news">Global News</a>' . ' | <a href="main.php?cat=game&page=alliance&aid=' . $arrTrgAlli['id'] . '">Alliance #' . $arrTrgAlli['id'] . '</a>' . '</div>' . '<div id=textMedium style="margin-top: 0;">' . '<h2>Victory conditions</h2>' . '<p>' . '<strong class="positive">Take ' . number_format($arrSrcWar['land_needed']) . ' acres to win</strong>—lose ' . number_format($arrTrgWar['land_needed']) . " acres for defeat." . '</p>' . "<p><em>{$strOrkDate} left until automatic draw.</em></p>" . '<h3>Diplomacy</h3>' . $strDiplomacy . '</div>'; break; } // M: Show guide link + advice include_once 'inc/pages/advisors.inc.php'; echo get_guide_link($objSrcUser, 'war_room', 'textMedium'); }
function include_research_text() { $objSrcUser =& $GLOBALS["objSrcUser"]; $arrStats = $objSrcUser->get_stats(); // M: Navigation links $strPurchase = ''; if ($arrStats[TYPE] == "elder" || $arrStats[TYPE] == "coelder") { $strPurchase = "<a href='main.php?cat=game&page=research&action=buy'>Purchase</a> | "; } $topLinks = '<div class="center">' . '| <a href="main.php?cat=game&page=research&action=view">View/Invest</a> | ' . $strPurchase . '<a href="main.php?cat=game&page=research&action=history">History</a> |' . '</div>'; echo $topLinks; // M: User Tables $arrGoods = $objSrcUser->get_goods(); $arrUserInfos = $objSrcUser->get_user_infos(); // M: Alliance Tables $objSrcAlli = $objSrcUser->get_alliance(); $arrAlli = $objSrcAlli->get_alliance_infos(); $arrSci = $objSrcAlli->get_alliance_sciences(); // M: Get rounded %'s foreach ($arrSci as $str => $iBonus) { $arrSciMod[$str] = round($iBonus * 100, 2); } $do = ''; if (isset($_GET['do']) && !empty($_GET['do'])) { $do = strval($_GET['do']); } $action = 'view'; if (isset($_GET['action']) && !empty($_GET['action'])) { $action = strval($_GET['action']); } switch ($action) { case 'view': if ($do == "invest") { $invest = max(0, $arrGoods[RESEARCH]); if ($arrUserInfos[HOURS] < PROTECTION_HOURS) { echo '<br /><div class="center">' . "Sorry, you can only invest research points once you have left protection.</div><br />"; return; } elseif ($invest == 0) { echo '<br /><div class="center">' . "I'm sure you meant well, but investing 0 rps will do nothing for our research.</div><br />"; return; } else { $arrStats[INVESTED] += $invest; $arrAlli[RESEARCH] += $invest; $objSrcUser->set_good(RESEARCH, 0); $objSrcUser->set_stat(INVESTED, $arrStats[INVESTED]); $objSrcAlli->set_alliance_info(RESEARCH, $arrAlli[RESEARCH]); header('location:main.php?cat=game&page=research&action=view&do=thank'); exit; } } if ($arrGoods[RESEARCH] > 0) { $strMessage = "Our researchers have been working very hard." . "<br />" . "Would you like to invest their produced research points?" . "<form method=\"post\" action=\"main.php?cat=game&page=research&action=view&do=invest\">" . '<label>Available: </label><strong><span class="indicator">' . $arrGoods[RESEARCH] . '</span> rps</strong> ' . "<input type=\"submit\" value=\"Invest\" name=\"invest\" />" . "</form>"; } elseif ($do == 'thank') { $strMessage = "You have invested your research. Your alliance thanks you!"; } else { $strMessage = "We have no research points for you to invest at this moment."; } $strAdvisorText = '<div id="textMedium">' . "<p>Good morning " . stripslashes($arrStats[NAME]) . "!<br />" . $strMessage . '</p>' . '</div><br />'; echo $strAdvisorText; // M: Show alliance research (new function shared with spells) echo get_alliance_science_table($objSrcAlli); // M: Show guide link + advice include_once 'inc/pages/advisors.inc.php'; echo get_guide_link($objSrcUser, 'research', 'textMedium'); break; case "buy": // M: Restrict access to elders and co-elders if ($arrStats[TYPE] == "player") { echo "<div class=\"center\">Only your elected elder can purchase the research points you have invested.<br /><br />"; echo "| <a href=main.php?cat=game&page=research&action=view style=\"text-decoration:none\">Return To Investing</a> |</div>"; return; } // M: Handle POST action if ($do == "buy") { // M: Clean POST-data $invest_prod = max(0, floor(intval($_POST['invest_prod']))); $invest_eng = max(0, floor(intval($_POST['invest_eng']))); $invest_def = max(0, floor(intval($_POST['invest_def']))); $invest_off = max(0, floor(intval($_POST['invest_off']))); $iToPurchase = $invest_off + $invest_def + $invest_eng + $invest_prod; if ($iToPurchase == 0) { echo "<div class=\"center\">I'm sure you meant well, but purchasing 0 rps will do nothing for our science.</div><br />"; } elseif ($iToPurchase < 0 || $iToPurchase > 9999999 || $invest_eng < 0 || $invest_eng > 9999999 || $invest_prod < 0 || $invest_prod > 9999999 || $invest_def < 0 || $invest_def > 9999999 || $invest_off < 0 || $invest_off > 9999999) { echo "<div class=\"center\">It's impossible to invest that amount.</div><br />"; } elseif ($iToPurchase > $arrAlli[RESEARCH]) { echo "<div class=\"center\">How can you purchase research points that you don't have?</div><br />"; } else { // M: New research $iNewResearch = max(0, $arrAlli[RESEARCH] - $iToPurchase); $arrNewAlliInfos = array(RESEARCH => $iNewResearch, HOME_BONUS => $arrAlli[HOME_BONUS] + $invest_eng, INCOME_BONUS => $arrAlli[INCOME_BONUS] + $invest_prod, DEFENCE_BONUS => $arrAlli[DEFENCE_BONUS] + $invest_def, OFFENCE_BONUS => $arrAlli[OFFENCE_BONUS] + $invest_off); // M: Save to DB $objSrcAlli->set_alliance_infos($arrNewAlliInfos); // M: Show report $strReport = '<div id="textMedium">' . '<h2>Purchase Report</h2>' . "<p>" . "Thank you " . stripslashes($arrStats[NAME]) . ", our research has been updated!" . "</p>" . "<p>" . "You had <strong>" . number_format($arrAlli[RESEARCH]) . " research points</strong> and you used up " . "<strong>" . number_format($iToPurchase) . "</strong>." . "</p>" . "<p>" . '<a href="main.php?cat=game&page=research' . '&action=buy">Return To Purchasing</a>' . '</p>' . '</div>'; echo $strReport; include_game_down(); exit; } } // M: Show "advisor" text if ($arrAlli['research'] != 0) { $strMessage = "<br />Our alliance has been working very hard.<br />" . "In what branch of sciences would you like to purchase?"; } else { $strMessage = "<br />We have no research points for you to " . "purchase at this moment."; } $strAdvisorText = '<div id="textMedium">' . '<p>Good morning ' . $arrStats[NAME] . '!' . $strMessage . '</p>' . '</div><br />'; echo $strAdvisorText; // M: Show purchase interface $left = '<img src="' . HOST_PICS . 'bar_left.gif" alt="" />' . '<img src="' . HOST_PICS . 'bar_mid.gif" height="12" width="'; $right = '%" alt="" /><img src="' . HOST_PICS . 'bar_right.gif" alt="" />'; $researchPurchase = "<table cellspacing=\"0\" cellpadding=\"0\" class=\"medium\">" . "<form method=\"post\" action=\"main.php?cat=game&page=research&action=buy&do=buy\">" . "<tr class=\"header\">" . "<th colspan=\"4\">Alliance Research</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th width=\"33%\">" . "Type" . "</th>" . "<th>" . "Amount" . "</th>" . "<th width=\"10%\" class=\"center\">" . "%" . "</th>" . "<th width=\"20%\" class=\"right\">" . "Purchase" . "</th>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Production:" . "</th>" . "<td class=\"left\">" . $left . floor($arrSciMod['prod'] * 1.4) . $right . "</td>" . "<td class=\"center\">" . $arrSciMod['prod'] . "</td>" . "<td>" . "<input type=\"text\" name=\"invest_prod\" size=\"8\" maxlength=\"7\" value=\"0\" />" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Engineering:" . "</th>" . "<td class=\"left\">" . $left . floor($arrSciMod['eng'] * 1.4) . $right . "</td>" . "<td class=\"center\">" . $arrSciMod['eng'] . "</td>" . "<td>" . "<input type=\"text\" name=\"invest_eng\" size=\"8\" maxlength=\"7\" value=\"0\" />" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Defence Tactics:" . "</th>" . "<td class=\"left\">" . $left . floor($arrSciMod['def'] * 1.4) . $right . "</td>" . "<td class=\"center\">" . $arrSciMod['def'] . "</td>" . "<td>" . "<input type=\"text\" name=\"invest_def\" size=\"8\" maxlength=\"7\" value=\"0\" />" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "War Tactics:" . "</th>" . "<td class=\"left\">" . $left . floor($arrSciMod['war'] * 1.4) . $right . "</td>" . "<td class=\"center\">" . $arrSciMod['war'] . "</td>" . "<td>" . "<input type=\"text\" name=\"invest_off\" size=\"8\" maxlength=\"7\" value=\"0\" />" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th class=\"bsup\">" . "Available:" . "</th>" . "<td class=\"bsup left\" colspan=\"2\"><strong><span class=\"indicator\">" . number_format($arrAlli['research']) . "</span> rps</strong>" . "</td>" . "<td class=\"bsup\">" . "<input type=\"submit\" value=\"Purchase\" name=\"submit\" />" . "</td>" . "</tr>" . "</form>" . "</table>"; echo $researchPurchase; break; case "history": echo '<br />'; $arrUserids = $objSrcAlli->get_userids(); $objTmpUser = new clsUser(0); $strTribesInvested = ''; foreach ($arrUserids as $iTmpUserid) { // M: Clear temporary object (first time trying this method :)) $objTmpUser->set_userid($iTmpUserid); $arrTmpStats = $objTmpUser->get_stats(); $iTmpAcres = $objTmpUser->get_build(LAND); $strTribesInvested .= "<tr class=\"data\">" . "<th>" . stripslashes($arrTmpStats[TRIBE]) . "</th>" . "<td>" . round($arrTmpStats[INVESTED] / $iTmpAcres) . "</td>" . "<td>" . number_format($arrTmpStats[INVESTED]) . " rps</td>" . "</tr>"; } $researchHistoryTable = '<table cellspacing="0" cellpadding="0" class="medium">' . "<tr class=\"header\">" . "<th colspan=\"4\">Investment History</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th>" . "Tribe" . "</th>" . "<th class=\"right\">" . "RPA" . "</th>" . "<th class=\"right\">" . "Amount" . "</th>" . "</tr>" . $strTribesInvested . '</table>'; echo $researchHistoryTable; echo '<div id="textMedium">' . '<h3>What does it mean?</h3>' . '<ul><li>RPA - Research Per Acre' . '</li>' . '<li>rps - research points' . '</li><ul>' . '</div>'; break; } }