a couple of php classes for generic paginations