$filterPro->setProID($_POST['ProID']); } if (isset($_POST['ProName']) & !empty($_POST['ProName'])) { $filterPro->setProName($_POST['ProName']); } if (isset($_POST['Price']) & !empty($_POST['Price'])) { $filterPro->setPrice($_POST['Price']); } if (isset($_POST['InStock']) & !empty($_POST['InStock'])) { $filterPro->setInStock($_POST['InStock']); } if (isset($_POST['CatProID']) & !empty($_POST['CatProID'])) { $filterPro->setCatPro(new Category($_POST['CatProID'])); } if (isset($_POST['Status']) & !empty($_POST['Status'])) { $filterPro->setStatus($_POST['Status']); } if (isset($_POST['SortName']) & !empty($_POST['SortName'])) { $SortName = $_POST['SortName']; } if (isset($_POST['SortType']) & !empty($_POST['SortType'])) { $SortType = $_POST['SortType']; } $numberOfRows = $filterPro->countRecords(); // Số lượng dòng của bảng $ListProducts = array(); if ($rowsPerPage == -1) { // nếu là chọn hiển thị là ALL $rowsPerPage = $numberOfRows; $ListProducts = $filterPro->loadLimit($rowsPerPage, 0, $SortName, $SortType); } else {