$query = "SELECT iid, itemtitel, tekst, tekst as inleiding FROM items WHERE status='1' AND sid='13' ORDER BY positie DESC LIMIT 1";
$result = mysql_query($query);
while ($row = mysql_fetch_object($result)) {
echo "
if(isset($_GET['art'])){
$query = "SELECT id, titel FROM product_categorie WHERE actief='1' AND id='".quote_smart($_GET['art'])."'";
$limit = "";
}
else{
$query = "SELECT id, titel FROM product_categorie WHERE actief='1' ORDER BY positie ASC";
$limit = "LIMIT 2";
}
$result = mysql_query($query);
if($result){
while ($row = mysql_fetch_object($result)) {
$categorietitel = $row->titel;
$catid = $row->id;
echo "$row->itemtitel
"; echo "$row->inleiding
$row->tekst
";
}
$query = "SELECT iid, itemtitel, tekst, tekst as inleiding FROM items WHERE status='1' AND sid='11' ORDER BY positie DESC LIMIT 1";
$result = mysql_query($query);
while ($row = mysql_fetch_object($result)) {
echo "$row->tekst
$row->itemtitel
"; echo "$row->inleiding
$row->tekst
";
}
?>
$row->tekst
$categorietitel
"; $query2 = "SELECT id, titel, beschrijving FROM product WHERE actief='1' AND categorie='$catid' ORDER BY positie ASC $limit"; $result2 = mysql_query($query2); if($result2){ while ($row2 = mysql_fetch_object($result2)) { $prod_cat_id = $row2->id; $query3 = "SELECT foto FROM product_fotos WHERE product='$prod_cat_id' AND status='1' ORDER BY positie ASC LIMIT 1"; $result3 = mysql_query($query3); $row3 = mysql_fetch_object($result3); $foto = $row3->foto; if($foto!=""){ $galtitel = $row2->titel; echo ""; } } echo "
"; if(!isset($_GET['art'])){ echo ""; } } } } ?>