0) { $menu = ""; $menu .= "
Winkelwagentje  
".$items." item(s).".t('View')."
"; } } // start the menu.. continued on listing and end in template.php $menu .= '

Menu

'; $menu .= ''; tmpl(); } // CATALOGUE // if (!isset($_GET['p'])) { $type = 'brands'; $stype = 'brd'; $title = t('Welcome'); $content = "

:: ".t(217)." ::

"; $q = " select distinct(brands.name),brands.* from brands,products where brands.active=1 and brands.id=products.brd order by wgt"; # brands have weight $cps = "select id from products where active=1 or ".$stype; if (isset($_GET['brd']) && !isset($_GET['cat'])) { $q = "select name from brands where id=".$_GET['brd']." limit 1"; $q = mysql_query($q)or sql_err(mysql_error()); $q = mysql_fetch_assoc($q); $type = $stype = 'cat'; $title = $q['name']; $content = "

:: ".t('187')." ::

"; if ($_GET['brd'] == 0) { # display all categories of all $q = " select distinct(cat.id),cat.* from cat,products,pcat where cat.active=1 and cat.id=pcat.c and products.id=pcat.p"; $cps = "select products.id from products,pcat where products.active=1 and pcat.c"; } else { $q = " select distinct(cat.id),cat.* from cat,products,pcat where cat.active=1 and products.brd='".$_GET['brd']."' and cat.id=pcat.c and products.id=pcat.p"; $cps = "select products.id from products,pcat where products.active=1 and products.brd='".$_GET['brd']."' and pcat.c"; } } #if (isset($_GET['cat']) && !isset($_GET['sex'])) { #$type = $stype = 'sex'; ##$title = t('191'); ##$content = "

:: ".t('192')." ::

"; #$title = $content = ''; #$q = "select * from ".$type." where active=1 order by id"; #$cps = "select id from products where active=1 and brd='".$_GET['brd']."' and cat='".$_GET['cat']."' and ".$stype; #} #if (isset($_GET['sex'])) { if (isset($_GET['cat'])) { $q = "select cat.name from cat where cat.id=".$_GET['cat']." limit 1"; $q = mysql_query($q)or sql_err(mysql_error()); $q = mysql_fetch_assoc($q); $cat = $q['name']; if ($_GET['brd'] != 0) { $q = "select brands.name from brands where brands.id=".$_GET['brd']." limit 1"; $q = mysql_query($q)or sql_err(mysql_error()); $q = mysql_fetch_assoc($q); $brd = $q['name']; } else { $brd = t('All brands'); } $type = 'products'; $title = $cat.' ('.$brd.')'; $content = "

:: ".t('Make a choice')." ::

"; if ($_GET['brd'] == 0) { # display all products of this cat $q = "select products.* from products,pcat where products.active=1 and pcat.c='".$_GET['cat']."' and products.id=pcat.p order by name"; $cps = "select products.id from products,pcat where products.active=1 and pcat.c='".$_GET['cat']."' and products.sex="; } else { $q = "select products.* from products,pcat where products.active=1 and pcat.c='".$_GET['cat']."' and products.brd='".$_GET['brd']."' and products.id=pcat.p order by name"; $cps = "select products.id from products,pcat where products.active=1 and products.brd='".$_GET['brd']."' and pcat.c='".$_GET['cat']."' and products.sex="; } } $menu .= '
  • '.$title.'
  • '; if (!isset($_GET['p'])) { $content .= " \n"; } } else { $content = t(15); } # no list ? tmpl(); ?>