";
echo"
";
if((isset($_GET['g']))&&$_GET['g']!=0){
$g=" AND pGeslacht='".$_GET['g']."'";
}else{
$g="";
}
if((isset($_GET['m']))&&$_GET['m']!=0){
$m=" AND pMerk='".$_GET['m']."'";
}else{
$m="";
}
//query overzicht
$rproduct=mysql_query("SELECT * FROM product WHERE pCategorie='".$categorienr."'".$g.$m." ORDER BY pPop DESC");
$aantal=mysql_num_rows($rproduct);
//antaal afbeeldingen per pagina
$range=12;
if(isset($_GET['page'])){
$bottomnum =(($_GET['page']-1)*$range)+1;
$topnum = $_GET['page']*$range;
}
$pages=ceil($aantal/$range);
$i=1;
/*page selector*/
$getg="&g=".$_GET['g'];
$getm="&m=".$_GET['m'];
if($pages!=1){
echo"";
while($i <= $pages){
if($i!=$_GET['page']){
echo"".$i." ";
}else{
echo $i." ";
}
$i++;
}
echo"
";
}
$i=0;
$k=1;
$j=1;
while($product=mysql_fetch_array($rproduct)){
if(($k>=$bottomnum) && ($k<=$topnum)){
echo"
";
if($product['pPromo']=="1"){
echo"";
}
if($product['pNieuw']=="1"){
echo"";
}
echo"
";
if($i<2){
echo"
";
}
$i++;
if($i>2&&$j<$range){
echo"";
$i=0;
}
$j++;
}
$k++;
}
$pages=ceil($aantal/$range);
$i=1;
/*page selector*/
$getg="&g=".$_GET['g'];
$getm="&m=".$_GET['m'];
if($pages!=1){
echo"\n";
echo"
";
//echo"";
//echo"";
echo"";
echo"
";
while($i <= $pages){
if($i!=$_GET['page']){
echo"".$i." ";
}else{
echo $i." ";
}
$i++;
}
echo"
";
}
}
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*PRODUCTINFO-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
if($_GET['v']&&$_GET['c']&&!$_GET['b']){
$rcategorie = mysql_query("SELECT * FROM categorie WHERE cNr='".$_GET['c']."'");
while($categorie=mysql_fetch_array($rcategorie)){
$categorienaam=$categorie[1];
$categorienr=$categorie[0];
}
$rproduct=mysql_query("SELECT * FROM product WHERE pNr='".$_GET['v']."'");
while($product=mysql_fetch_array($rproduct)){
$productnr = $product[0];
$productnaam = $product[1];
$productmerk = $product[5];
$productinfo = $product[11];
$productgeslacht = $product[7];
$productkoffer = $product[10];
$productkoffernr = $product[12];
$productopmactive = $product[15];
$productopmerking = $product[14];
}
$rmerk=mysql_query("SELECT * FROM merk WHERE mNr='".$productmerk."'");
while($merk = mysql_fetch_array($rmerk)){
$merknaam=$merk[1];
}
$rmaat= mysql_query("SELECT DISTINCT pkmMaatnr FROM productkleurmaat WHERE pkmProductnr='".$productnr."' ORDER BY pkmMaatnr ASC");
$maatcount= mysql_num_rows($rmaat);
$maten="";
$i=0;
while($maat=mysql_fetch_array($rmaat)){
$rmaatnaam=mysql_query("SELECT * FROM maten WHERE maNr='".$maat[0]."'");
while($maatnaam=mysql_fetch_array($rmaatnaam)){
$maten=$maten.$maatnaam[1];
}
$i++;
if($i < $maatcount){
$maten=$maten.", ";
}
}
echo"
".$categorienaam.": ".$productnaam."
";
echo"
";
if($_SESSION['active'][$_SESSION['pcheck']]=="yes"){
$rqdrukgroep=mysql_query("SELECT pDrukgroep FROM product WHERE pNr='".$_SESSION['p'][$_SESSION['pcheck']]."'");
while($qdrukgroep=mysql_fetch_array($rqdrukgroep)){
$drukgroepactive=$qdrukgroep[0];
}
}else{
$rsdrukgroep=mysql_query("SELECT pDrukgroep FROM product WHERE pNr='".$_GET['v']."'");
while($sdrukgroep=mysql_fetch_array($rsdrukgroep)){
$drukgroepactive=$sdrukgroep[0];
}
}
$rsdrukgroep=mysql_query("SELECT pDrukgroep FROM product WHERE pNr='".$_GET['v']."'");
while($sdrukgroep=mysql_fetch_array($rsdrukgroep)){
$drukgroepproduct=$sdrukgroep[0];
}
echo"";
echo"
productomschrijving
".$productinfo."
";
if($productopmactive==1){
echo"
".$productinfo."
opmerking
"; echo "".$productopmerking.""; echo"
";
}
echo"
"; echo "".$productopmerking.""; echo"
merk
".$merknaam."
".$merknaam."
maten
".$maten."
".$maten."
prijs per stuk
vanaf "; $vartel=0; $rvarprijs=mysql_query("SELECT * FROM varprijsproduct WHERE vppProductnr='".$productnr."' ORDER BY vppPrijs ASC"); $checkvarprijs=""; while(($varprijs=mysql_fetch_array($rvarprijs))&&$vartel<1){ echo komma($varprijs[4])." EUR (ex BTW)"; $checkvarprijs=$varprijs[4]; $vartel++; } if($checkvarprijs==""){ $tel=0; $rprijsproduct=mysql_query("SELECT * FROM prijsproduct WHERE ppProductnr='".$productnr."' ORDER BY ppPrijs ASC"); while(($prijsproduct=mysql_fetch_array($rprijsproduct))&&($tel<1)){ echo komma($prijsproduct[3])." EUR"; $tel++; } } echo"
vanaf "; $vartel=0; $rvarprijs=mysql_query("SELECT * FROM varprijsproduct WHERE vppProductnr='".$productnr."' ORDER BY vppPrijs ASC"); $checkvarprijs=""; while(($varprijs=mysql_fetch_array($rvarprijs))&&$vartel<1){ echo komma($varprijs[4])." EUR (ex BTW)"; $checkvarprijs=$varprijs[4]; $vartel++; } if($checkvarprijs==""){ $tel=0; $rprijsproduct=mysql_query("SELECT * FROM prijsproduct WHERE ppProductnr='".$productnr."' ORDER BY ppPrijs ASC"); while(($prijsproduct=mysql_fetch_array($rprijsproduct))&&($tel<1)){ echo komma($prijsproduct[3])." EUR"; $tel++; } } echo"