function loadBusinesswithSumRow($loai, $monthFrom, $monthTo, $year) { $strLink = ""; $curPage = 1; $totalItems = null; $business = null; if (isset($_REQUEST['page'])) { $curPage = $_REQUEST['page']; } $maxItems = 3; $maxPages = 25; $offset = ($curPage - 1) * $maxItems; $totalItems = ThuChiBUS::count($loai); $business = ThuChiBUS::getALL($offset, $maxItems, $loai); $display = displayWithSumRow($business, $loai, $monthFrom, $monthTo, $year); $strPaging = Utils::paging($strLink, $totalItems[0], $curPage, $maxPages, $maxItems); return $display . $strPaging; }