getMarketSummaryReturn->TSIA, 2); $gain = round($mktSummary->getMarketSummaryReturn->TSIA - $mktSummary->getMarketSummaryReturn->openTSIA, 2); $volume = $mktSummary->getMarketSummaryReturn->volume; $topGainers = $mktSummary->getMarketSummaryReturn->topGainers; $topLosers = $mktSummary->getMarketSummaryReturn->topLosers; /*Account information for the user.*/ $accountData = GetAccountData(GetUserFromCookie()); $accountDataReturn = $accountData->getAccountDataReturn; /*Holding information for a particular user*/ $holdings = GetHoldings(GetUserFromCookie()); $holdingInfo = GetHoldingInformation($holdings); $noOfHoldings = $holdingInfo->noOfHoldings; $totalHoldings = $holdingInfo->totalHoldings; } ?> Apache Stonehenge StockTrader Welcome

Home

"); print ("

Welcome ".GetUserFromCookie()."

"); ?>
"); print (""); print (""); print (""); print (""); print (""); } ?> "); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print(""); } ?>
User Statistics
Account ID: ".($accountDataReturn->accountID)."
Account Created: ".date("m/d/Y h:i:s A", $accountDataReturn->creationDate)."
Total Logins: ".$accountDataReturn->loginCount."
Session Created: ".date("m/d/Y h:i:s A", $accountDataReturn->lastLogin)."
Summary
Cash Balance: ".$accountDataReturn->balance."
Number of Holdings: ".$noOfHoldings."
Total of Holdings:"); printf("$ %.2f",$totalHoldings); print ("
Sum of Cash and Holdings:"); printf("$ %.2f",($totalHoldings + ($accountDataReturn->balance))); print ("
Opening Balance:"); printf ("$ %.2f", $accountDataReturn->openBalance); print ("
Current Gain/(Loss): "); $gain = (($totalHoldings + ($accountDataReturn->balance)) - $accountDataReturn->openBalance); if ($gain < 0) { printf("$ (%.2f)", ((-1) * $gain)); } else if ($gain >= 0) { printf("$ %.2f", $gain); } $gainPercent = round((($gain/$accountDataReturn->openBalance) * 100), 2); print ("
%Gain/(Loss):"); if ($gainPercent > 0) { print ("".$gainPercent."%"); } else if ($gainPercent < 0) { print ("".$gainPercent."%"); } else { print ("".$gainPercent."%"); } print ("

Market Summary

"); print (""); print(""); print ("
Trade Stock Index (TSIA)"); print($tsia); print(" "); print(" 0) { print (" class=\"price-gain\">$"); } else if ($gain < 0) { print (" class=\"price-loss\">$"); } else { print(">"); } printf("%.2f", $gain); print ("
Trading Volume"); print ($volume); print ("
Top Gainers"); print (""); print(""); print(""); $index = 0; $gainer = $topGainers->QuoteDataBean[$index]; while($gainer) { print (""); printf ("", $gainer->price); print (""); print (""); $index++; $gainer = $topGainers->QuoteDataBean[$index]; } print ("
SymbolPriceChange
symbol."\"/> symbol."\">
$%.2fchange) > 0) { print ("class=\"price-gain\">$"); } else if (($gainer->change) < 0) { print ("class=\"price-loss\">$"); } else { print(">$"); } printf ("%.2f", $gainer->change); print ("
Top Losers "); $index = 0; $loser = $topLosers->QuoteDataBean[$index]; while($loser) { print (""); printf ("", $loser->price); print (""); print (""); $index++; $loser = $topLosers->QuoteDataBean[$index]; } print("
SymbolPriceChange
symbol."\">
$%.2fchange) > 0) { print (" class=\"price-gain\">$"); } else if (($loser->change) < 0) { print (" class=\"price-loss\">$"); } else { print(">$"); } printf ("%.2f", $loser->change); print ("
"); print("
"); print("
"); print("
"); } ?>