added pagedisplay.php and basic sorting