getOrdersReturn; $accountSummary = GetUserAccountSummary($ordersReturn); $userAccountDataReturn = GetAccountData(GetUserFromCookie())->getAccountDataReturn; $userAccountProfileDataReturn = GetAccountProfileData(GetUserFromCookie())->getAccountProfileDataReturn; } function FormatDate($date) { if ($date) { return date("m/d/Y h:i:s A", $date); } return "-"; } ?> Apache Stonehenge - PHP StockTrader - Account
Trade Alert: The following orders have completed.

"); print(""); $index = 0; while ($getClosedOrdersReturn->OrderDataBean[$index]) { print (""); $index ++; } print("
Order IDOrder Status Creation DateCompletion Date Txn FeeTypeSymbol Quantity
".$getClosedOrdersReturn->OrderDataBean[$index]->orderID." ".$getClosedOrdersReturn->OrderDataBean[$index]->orderStatus." ".FormatDate($getClosedOrdersReturn->OrderDataBean[$index]->openDate)." ".FormatDate($getClosedOrdersReturn->OrderDataBean[$index]->completionDate)." $".$getClosedOrdersReturn->OrderDataBean[$index]->orderFee." ".$getClosedOrdersReturn->OrderDataBean[$index]->orderType." ".$getClosedOrdersReturn->OrderDataBean[$index]->symbol." ".$getClosedOrdersReturn->OrderDataBean[$index]->quantity."


"); } /*Display the account summary information of a particular user.*/ if ($accountSummary) { print ("

Account Information

"); print (""); printf("", $accountSummary->totalBuys); printf("", $accountSummary->totalSells); printf("", $accountSummary->totalTax); printf("
Subtotal BuysSubtotal SellsSubtotal Fees Net Impact Cash Balance
$%.2f$%.2f$%.2f"); if ($accountSummary->totalImpact > 0) { printf("$%.2f", $accountSummary->totalImpact); } else if ($accountSummary->totalImpact < 0) { printf("$%.2f", $accountSummary->totalImpact); } else { printf("($%.2f)", $accountSummary->totalImpact); } printf("
"); } /*Display the orders a particular user is associated with.*/ if ($ordersReturn) { print("

Total Orders Shown

"); print(""); print(""); $index = 0; while ($ordersReturn->OrderDataBean[$index]) { print (""); print (""); print (""); $index ++; } print ("
Order IDOrder StatusCreation DateCompletion Date Txn FeeTypeSymbolQuantityPrice Total
".$ordersReturn->OrderDataBean[$index]->orderID." ".$ordersReturn->OrderDataBean[$index]->orderStatus." ".FormatDate($ordersReturn->OrderDataBean[$index]->openDate)." ".FormatDate($ordersReturn->OrderDataBean[$index]->completionDate)." $".$ordersReturn->OrderDataBean[$index]->orderFee." ".$ordersReturn->OrderDataBean[$index]->orderType."
OrderDataBean[$index]->symbol."\"/> OrderDataBean[$index]->symbol."\"/>
".$ordersReturn->OrderDataBean[$index]->quantity." $".$ordersReturn->OrderDataBean[$index]->price." $".(($ordersReturn->OrderDataBean[$index]->price * $ordersReturn->OrderDataBean[$index]->quantity) + $ordersReturn->OrderDataBean[$index]->orderFee)."
"); } /*Display the account profile information associted to a the user.*/ if ($userAccountProfileDataReturn) { print ("
Update Account Profile:".GetUserFromCookie()."
"); print (""); print (""); print (""); print (""); print (""); print ("
Full Name:fullName."\" id=\"\" size=\"25\"/> Email Address:email."\" id=\"\" size=\"25\"/>
Address:address."\" id=\"\" size=\"25\"/> Password:password."\" id=\"\" size=\"25\"/>
Credit Card:creditCard."\" id=\"\" size=\"25\"/> Confirm Password:password."\" id=\"\" size=\"25\"/>
"); /*Display the account information of a the user*/ if ($userAccountDataReturn) { print(""); print (""); print (""); print (""); print(""); if ($userAccountDataReturn->balance > 0) { print(""); } else if($userAccountDataReturn->balance < 0) { print(""); } else { print(""); } print(""); print("
Account ID: ".$userAccountDataReturn->accountID." Account Created".FormatDate($userAccountDataReturn->creationDate)."
User ID: ".$userAccountDataReturn->profileID." Last Login:".FormatDate($userAccountDataReturn->lastLogin)."
Opening Balance: ".$userAccountDataReturn->openBalance." Total Logins: ".$userAccountDataReturn->loginCount."
Cash Balance:$". $userAccountDataReturn->balance."$". (-1) * $userAccountDataReturn->balance."$".$userAccountDataReturn->balance."Total Logouts: ".$userAccountDataReturn->logoutCount."
"); } print("
"); } ?>