<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->selectExcelDownloadData(); $comp = $tWork->selectExcelDownloadDataAsComp(); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); exit; } $_downloadFilename = $_POST['downFileName']; $tot_supply = 0; $tot_tax = 0; $tot_total = 0; for ($i = 0; $i < count($res); $i++) { $obj = $res[$i]; $tot_supply = $tot_supply + $obj['atax_supply_price']; $tot_tax = $tot_tax + $obj['atax_tax']; } $tot_total = $tot_tax + $tot_supply; header("Content-type: application/vnd.ms-excel"); header("Content-type: application/vnd.ms-excel; charset=utf-8"); header("Content-Disposition: attachment; filename = {$_downloadFilename}"); header("Content-Description: PHP4 Generated Data"); /*