0){ $sql .= 'AND cr.cat_id = '.$cat_id.' '; } if(isset($main_cat_id) && $main_cat_id > 0){ $sql .= 'AND cr.main_cat_id = '.$main_cat_id.' '; } $sql .= 'ORDER BY cr.sOrder ASC '; $totalRows = mysqli_num_rows(mysqli_query($con, $sql)); $limit = 10; if(isset($_REQUEST['pageNo']) && $_REQUEST['pageNo'] > 0){ $offset = ($_REQUEST['pageNo'] - 1); }else { $offset = 0; } if(!isset($_REQUEST['viewall'])){ $sql .= ' LIMIT '.$limit.' OFFSET '.($offset*$limit); } #echo $sql; $res = mysqli_query($con, $sql); ?> 0): ?> id; $car_name = stripslashes($row->car_name); $img_title = stripslashes($row->img_title); $description= strip_tags(stripslashes($row->description), '
'); if(strpos($row->img, '/images') !== false){ $imgPath = '.'.stripslashes($row->img); }else { $imgPath = './images/cars/'.stripslashes($row->img); } $carUrl = makePermaLink($car_name).'-'.$id.'.php'; $reserveCarUrl = 'reserve-'.makePermaLink($car_name).'-'.$id.'.php'; ?> No Vehicle(s) Found! $limit): ?> NEXT'; $npLink = 'NEXT'; }else if($currentPagination == $totalPages){ $paginationLinks = 'PREV'; $ppLink = 'PREV'; }else if($currentPagination < $totalPages){ $ppLink = 'PREV'; $npLink = 'NEXT'; } ?>