User Statistics |
");
print ("Account ID: |
".($accountDataReturn->accountID)." | ");
print ("Account Created: |
".date("m/d/Y h:i:s A", $accountDataReturn->creationDate)." | ");
print ("Total Logins: |
".$accountDataReturn->loginCount." | ");
print ("Session Created: |
".date("m/d/Y h:i:s A", $accountDataReturn->lastLogin)." | ");
print ("");
}
?>
Summary |
");
print ("Cash Balance: |
".$accountDataReturn->balance." | ");
print ("Number of Holdings: |
".$noOfHoldings." | ");
print ("Total of Holdings: | ");
printf("$ %.2f",$totalHoldings);
print (" | ");
print ("Sum of Cash and Holdings: | ");
printf("$ %.2f",($totalHoldings + ($accountDataReturn->balance)));
print (" | ");
print ("Opening Balance: | ");
printf ("$ %.2f", $accountDataReturn->openBalance);
print (" | ");
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 (" | ");
print ("%Gain/(Loss): | ");
if ($gainPercent > 0)
{
print ("".$gainPercent."%");
}
else if ($gainPercent < 0)
{
print ("".$gainPercent."%");
}
else
{
print ("".$gainPercent."%");
}
print (" | ");
print("");
}
?>
|
Market Summary
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 (" | ");
print ("Trading Volume | ");
print ($volume);
print (" | ");
print("Top Gainers | ");
print ("");
print("Symbol | Price | Change | ");
print("");
$index = 0;
$gainer = $topGainers->QuoteDataBean[$index];
while($gainer)
{
print (" | ");
printf ("$%.2f | ", $gainer->price);
print ("change) > 0)
{
print ("class=\"price-gain\">$");
}
else if (($gainer->change) < 0)
{
print ("class=\"price-loss\">$");
}
else
{
print(">$");
}
printf ("%.2f", $gainer->change);
print (" | ");
print (" ");
$index++;
$gainer = $topGainers->QuoteDataBean[$index];
}
print (" | ");
print ("Top Losers |
Symbol | Price | Change | ");
$index = 0;
$loser = $topLosers->QuoteDataBean[$index];
while($loser)
{
print (" | ");
printf ("$%.2f | ", $loser->price);
print ("change) > 0)
{
print (" class=\"price-gain\">$");
}
else if (($loser->change) < 0)
{
print (" class=\"price-loss\">$");
}
else
{
print(">$");
}
printf ("%.2f", $loser->change);
print (" | ");
print (" ");
$index++;
$loser = $topLosers->QuoteDataBean[$index];
}
print(" ");
print(" | ");
print(" ");
print(" |