<label for="none_input"><input type="radio" name="email_frequency" value="None" id="none_input" <?php $_SESSION['User']->email_frequency == "None" ? print "checked='checked'" : (print ""); ?> //>None</label> </td> </tr> </tbody> </table> </div> <div id="tickerTrackerDiv"> <h3></h3> <div id="tickerTrackerTableDiv"> <?php $DB = new Database(); $Portfolio = $DB->GetMostRecentPortfolio($_SESSION['User']->user_id); $LastTotal = $DB->_getLastPortfolioTotal($_SESSION['User']->user_id); if (count($Portfolio) == 0) { print "<center><h4>No existing portfolio found.</h4></center>"; print "<script>TickerTracker.currentPortfolioType='\$';TickerTracker.lastPortfolioType=null;</script>"; } else { print "<table><thead><tr><th>Ticker</th><th>Company / Mutual Fund Name</th><th>Amount (as of date)</th><th></th></tr></thead><tbody>"; $Output = "<script type='text/javascript'>TickerTracker.userTrackingSymbols = ["; $i = 0; $TotalVal = 0; foreach ($Portfolio as $PortfolioItem) { print "<tr data-tracker-index='" . $i . "'><td>" . $PortfolioItem->symbol_name . "</td><td>" . $PortfolioItem->symbol_description . "</td><td><div class='input-prepend'><span class='add-on primary toggleVal unselectable' style='z-index:0;' data-alt-value='" . ($PortfolioItem->ownership_type == '$' ? '%' : '$') . "'>" . $PortfolioItem->ownership_type . "</span><input type='text' class='span2 stockValue' value='" . number_format((double) $PortfolioItem->ownership_value, 2, ".", "") . "'></div></td><td><button class='btn error removeStock'>X</button></td></tr>"; $Output .= "{symbol_id:" . $PortfolioItem->symbol_id . ",ownership_value:'" . number_format((double) $PortfolioItem->ownership_value, 2, ".", "") . "',symbol_name:'" . $PortfolioItem->symbol_name . "',symbol_description:'" . $PortfolioItem->symbol_description . "', ownership_type:'" . $PortfolioItem->ownership_type . "'},"; $i++; } $Output = substr($Output, 0, strlen($Output) - 1) . "];"; $Type = isset($Portfolio[0]->ownership_type) ? $Portfolio[0]->ownership_type : "%";