diff --git a/include/objectManager.php b/include/objectManager.php index 47852ea..8afe07f 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -95,8 +95,8 @@ class ObjectManager $oObject = new $this->sClass(); - /* Display selectors for items per page and current page, if applicable. The function - returns FALSE or an array of arguments to be passed to objectGetEntries() */ + // Display top of the page selectors for items per page and + // current page, if applicable. $this->handleMultiPageControls($aClean, TRUE); /* query the class for its entries */ @@ -192,6 +192,11 @@ class ObjectManager echo "

makeUrl("add", false, "Add $this->sClass")."\">Add entry\n"; } + + // Display bottom of page selectors current page, if applicable + // NOTE: second parameter is false because we don't want the + // items per page selector appearing for the second set of page controls + $this->handleMultiPageControls($aClean, FALSE); } /* display the entry for editing */ @@ -704,24 +709,32 @@ class ObjectManager $iItemsPerPage = $iDefaultPerPage; - if ( isset($aClean['iItemsPerPage']) && in_array($aClean['iItemsPerPage'], $aItemsPerPage) ) - $iItemsPerPage = $aClean['iItemsPerPage']; - - $sControls = "
makeUrl()."\" method=\"get\">"; - - /* Fill in form data for the objectManager URL */ - $sControls .= $this->makeUrlFormData(); - $sControls .= "

 Items per page"; - $sControls .= ""; + + foreach($aItemsPerPage as $iNum) + { + $sSelected = ($iNum == $iItemsPerPage) ? ' selected="selected"' : ""; + $sControls .= "$iNum"; + } + $sControls .= ""; + $sControls .= "   "; + $sControls .= "

"; } - $sControls .= ""; - $sControls .= "   "; - $sControls .= "

"; $iTotalEntries = $oObject->objectGetEntriesCount($this->bIsQueue, $this->bIsRejected); $iNumPages = ceil($iTotalEntries / $iItemsPerPage);