Mounts
| "; if($currentPage > 1) { $startItem = $perPage * ($currentPage-2); echo "« Previous"; } else echo "« Previous"; echo " | "; if(($currentPage != $pageCount) && !($viewAll)) { $startItem = $perPage * ($currentPage); echo "Next »"; } else echo "Next »"; echo " |
| "; if(!$viewAll) echo "Page $currentPage of $pageCount"; else echo "All Pages"; echo " | "; if ($pageCount != 1) { echo ""; if($pageCount > 15){ for($p=($currentPage<=5?1:$currentPage-5);$p<=($currentPage<=5?10:(($currentPage+5)>$pageCount?$pageCount:($currentPage+5)));$p++) { // get the startItem if this page is chosen $startItem = ($p > 1) ? $perPage * ($p-1) : 0; if($p == $currentPage) echo "$p | "; else echo "$p | "; } }else{ for($p=1;$p<=$pageCount;$p++) { // get the startItem if this page is chosen $startItem = ($p > 1) ? $perPage * ($p-1) : 0; if($p == $currentPage) echo "$p | "; else echo "$p | "; } } if (!$viewAll) echo "View All"; else echo "View All"; echo " | "; } } echo "
'; //************************************************************************** // PRINTING //************************************************************************** // If view all, show all items in array, else show only per page amount $sliced = array(); if (isset($entireDataStruct['items']) && !empty($entireDataStruct['items'])) { if($viewAll) { $sliced = $entireDataStruct['items']; } else { $sliced = array_slice($entireDataStruct['items'], $resultStartPosition, $perPage); } } ?>
| ";
if ($hasDetailLink) echo "";
echo " | ";
}
else { echo ""; } echo " | Manufacturer: ";
if ($hasDetailLink) echo "";
echo $slice['Manufacturer'];
if ($hasDetailLink) echo "";
echo " \n"; if ($slice['productName'] != 'Model Unspecified') { echo "Model: "; if ($hasDetailLink) echo ""; echo $slice['productName']; if ($hasDetailLink) echo ""; echo " \n"; } echo "" . $slice['summary'] . " | \n";
echo "\n";
}
?>