function display_table($symbol, $data) { if (sizeof($data) > 0) { $categories = $data[$symbol]['categories']; $periods = $data[$symbol]["periods"]; $fundamentals = $data[$symbol]["fundamentals"]; $name = $data[$symbol]["name"]; echo '<div id="analysis" class="grid_12">'; display_company_info($symbol, $name, $fundamentals); #echo "<div style='padding-left:5px;color:#444444;font-size:1.4em'>$name ($symbol)</div>"; //echo '<div id="wrap">'; foreach ($categories as $category => $values) { ?> <div class="fdata_c grid_12 alpha"> <div class="category" id="<?php echo strtolower($category); ?> "><?php echo $category; ?> </div> <div id="fdata_container"> <div class="grid_12 alpha h"> <div class="grid_4 alpha"> </div> <?php foreach ($periods as $y => $year) { ?> <div class="year grid_2 <?php if ($y == sizeof($periods) - 1) { echo 'omega'; } ?> "><?php echo $year; ?> </div> <?php } ?> </div> <?php foreach ($values as $term => $value) { ?> <?php $term = str_replace("_", " ", $term); $len = sizeof($value); ?> <div class="grid_12 h"> <div class="grid_4 alpha"><?php echo $term; ?> </div> <?php for ($i = 0; $i < $len; $i++) { ?> <div class="fdata grid_2 <?php if ($i == $len - 1) { echo 'omega'; } ?> "><?php printf("%.2f", $value[$i]); ?> </div> <?php } ?> <?php for ($i = 0; $i < sizeof($periods) - $len; $i++) { ?> <div class="fdata grid_2 omega">-</div> <?php } ?> </div> <?php } ?> </div> </div> <?php } echo "</div>"; } }
$smarty->assign('customer_details', $customer_details); /*Get Employee Info */ $q = "SELECT * FROM " . PRFX . "TABLE_EMPLOYEE WHERE EMPLOYEE_DISPLAY_NAME ='" . $login . "'"; $rs = $db->Execute($q); $employee_details = $rs->FetchRow(); $smarty->assign('employee_details', $employee_details); // assign the arrays $smarty->assign('open_work_orders', display_open_workorders($db, $customer_id)); $smarty->assign('closed_work_orders', display_closed_workorders($db, $customer_id)); //$smarty->assign('customer_details', display_customer_info($db, $customer_id)); $smarty->assign('customer_details', $customer_details); $smarty->assign('unpaid_invoices', display_unpaid_invoices($db, $customer_id)); $smarty->assign('paid_invoices', display_paid_invoices($db, $customer_id)); $smarty->assign('memo', display_memo($db, $customer_id)); $smarty->assign('gift', display_gift($db, $customer_id)); $smarty->assign('company_details', display_company_info($db, $company_id)); //Lets Get the file downloaded to have a look at it from the database if (isset($download_id)) { /*Get All customer Emails */ $q = "SELECT CUSTOMER_EMAIL_ATT_NAME1, CUSTOMER_EMAIL_ATT_TYPE1, CUSTOMER_EMAIL_ATT_SIZE1, CUSTOMER_EMAIL_ATT_FILE1, FROM " . PRFX . "TABLE_CUSTOMER_EMAILS WHERE CUSTOMER_EMAIL_ID ='" . $download_id . "'"; $rs = $db->Execute($q); //header("Content-length: $rs->fields['CUSTOMER_EMAIL_ATT_SIZE1']"); //header("Content-type: $rs->fields['CUSTOMER_EMAIL_ATT_TYPE1']"); //header("Content-Disposition: attachment; filename=$rs->fields['CUSTOMER_EMAIL_ATT_NAME1']"); $file_download = $rs->fields['CUSTOMER_EMAIL_ATT_FILE1']; $smarty->assign('file_download', $file_download); //Print $CUSTOMER_EMAIL_ATT_NAME1; exit; } // BOF Email Message details //Mail