require_once("database.php"); require_once("hoofding.php"); if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } $ByPage = "5"; if(empty($_GET[SubcategoryID])) { $q1 = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID where oneshop_producten.ItemCategory = '$_GET[CategoryID]' order by ItemName limit $Start, $ByPage"; $qnav = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID where oneshop_producten.ItemCategory = '$_GET[CategoryID]' "; } else { $q1 = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID where oneshop_producten.ItemCategory = '$_GET[CategoryID]' and oneshop_producten.ItemSubcategory = '$_GET[SubcategoryID]' order by ItemName limit $Start, $ByPage"; $qnav = "select oneshop_producten.*, oneshop_categories.*, devbg_subcategories.* from oneshop_producten left join oneshop_categories on oneshop_producten.ItemCategory = oneshop_categories.CategoryID left join devbg_subcategories on oneshop_producten.ItemSubcategory = devbg_subcategories.SubcategoryID where oneshop_producten.ItemCategory = '$_GET[CategoryID]' and oneshop_producten.ItemSubcategory = '$_GET[SubcategoryID]' "; } $r1 = mysql_query($q1) or die(mysql_error()); if(mysql_num_rows($r1) == '0') { $NoItems = "
$DisplayImage |
Klik voor meer info: $a1[ItemName]
Categorie: $a1[CategoryName]"; if(!empty($a1[SubcategoryID])) { $DisplayCategory .= ", $a1[SubcategoryName]"; } $DisplayCategory .= " Prijs: $MyPrice euro |
| "; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " $i2\n\t "; } elseif($PageStart < $rows) { $links[] = " $i2\n\t "; } } $links2 = implode(" | ", $links); $NextPrev .= $links2; $NextPrev .= "| | "; $NextPrev .= "\n