Esempio n. 1
0
         echo '<a href="category.php?catID=' . $subCat->getCatID() . '">';
         echo '<img src="' . $subCat->getImage() . '" width="200" />';
         echo "</a>";
         echo "<br />";
         echo "<br />";
     }
 } else {
     $Part = new happpi\Part();
     echo "<h2>Parts</h2>";
     $i = 0;
     $perPage = 10;
     $page = 1;
     if (isset($_GET['page'])) {
         $page = $_GET['page'];
     }
     $totalPages = $Part->getCategoryPartsCount($_GET['catID']) / $perPage;
     echo "Page: ";
     while ($i < $totalPages) {
         $i++;
         echo '<a href="category.php?catID=' . $_GET['catID'] . '&page=' . $i . '">';
         echo $i . "";
         echo "</a>";
         echo " ";
     }
     foreach ($Part->getCategoryParts($_GET['catID'], $page, $perPage) as $part) {
         echo "<h2>" . $part->getShortDesc() . "</h2>";
         echo '<img src="' . $part->getPartImage("a", "Grande") . '" width="150" />';
         echo "<span style='color:orange; font-size:25px;' >Price:</span>" . $part->getListPrice() . "";
         echo "<h3>Product Specifications</h3>";
         echo "<ul>";
         foreach ($part->getAttributes() as $attr) {