Esempio n. 1
0
function get_building_output_table(&$objUser)
{
    include_once 'inc/functions/production.php';
    $arrYards = getWoodProduction($objUser);
    $arrMines = getMineProduction($objUser);
    $arrBanks = getBankProduction($objUser);
    $arrFarms = getFoodProduction($objUser);
    $arrLabs = getResearchProduction($objUser);
    $buildingOutput = "<table class=\"small\" cellpadding=\"0\" cellspacing=\"0\">" . "<tr class=\"header\">" . "<th colspan=\"2\">" . "Building Output" . "</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th>" . "Building Type" . "</th>" . "<td>" . "One Acre Produce" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Banks:" . "</th>" . "<td>" . number_format($arrBanks['per_each']) . " cr" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Farms:" . "</th>" . "<td>" . number_format($arrFarms['per_each']) . " kgs" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Mines:" . "</th>" . "<td>" . number_format($arrMines['per_each']) . " cr" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Labs:" . "</th>" . "<td>" . number_format($arrLabs['per_each']) . " rps" . "</td>" . "</tr>" . "<tr class=\"data\">" . "<th>" . "Yards:" . "</th>" . "<td>" . number_format($arrYards['per_each']) . " logs" . "</td>" . "</tr>" . "</table>";
    return $buildingOutput;
}
Esempio n. 2
0
function getTotalIncome(&$objUser)
{
    $cash_balance = array();
    $strRace = $objUser->get_stat(RACE);
    // Income From Citizens
    $arrTaxes = getCitizenIncome($objUser);
    // Income From Mines
    $arrMineProd = getMineProduction($objUser);
    // Income From Banks
    $arrBankProd = getBankProduction($objUser);
    // Costs for Military Upkeep
    $iUpkeep = getMilitaryUpkeep($objUser);
    // Total Income Balance
    $total_income = $arrTaxes['total'] + $arrMineProd['total'] + $arrBankProd['total'] - $iUpkeep;
    $cash_balance['total'] = $total_income;
    return $cash_balance;
}