"-Nincs rendezés kiválasztva-","price_asc"=>"Ár (növekvő)", "price_desc"=>"Ár (csökkenő)", "name_asc"=>"Név (növekvő)","name_desc"=>"Név (csökkenő)"); if($producer_filter!=""){ $where[] = " `producer` = '".$producer_filter."'"; } if(($price_filter_from!=0)&&($price_filter_to!=0)){ $where[] = " `price` BETWEEN ".$price_filter_from." AND ".$price_filter_to; } else if($price_filter_from!=0){ $where[] = " `price` > ".$price_filter_from; } else if($price_filter_to!=0){ $where[] = " `price` < ".$price_filter_to; } switch ($sorting_filter) { case "price_asc": $sorting_filter = "ORDER BY `price` ASC"; break; case "price_desc": $sorting_filter = "ORDER BY `price` DESC"; break; case "name_asc": $sorting_filter = "ORDER BY `product_name` ASC"; break; case "name_desc": $sorting_filter = "ORDER BY `product_name` DESC"; break; default:""; $sorting_filter = ""; } if(!empty($where)){ $where_clause = "AND ".implode(' AND ', $where); } else {$where_clause ="";} /*filter end*/ /*pager*/ $pager_sql = "SELECT * FROM `termekek` WHERE `category`= '$product_category' $where_clause AND `status`= 1 $sorting_filter"; $db->exec("set names utf8"); $PDO_pager=$db->prepare($pager_sql); $PDO_pager->execute(); $rec_limit = 20; $rec_count = $row[0]; if( isset($_GET['page'] ) ) { $page = $_GET{'page'} ;//+ 1; $offset = $rec_limit * ($page-1) ; } else { $page = 1; $offset = 0; } $left_rec = $rec_count - ($page * $rec_limit); /*pager end*/ /*query*/ $sql = "SELECT * FROM `termekek` WHERE `category`= '$product_category' $where_clause AND `status`= 1 $sorting_filter LIMIT $offset, $rec_limit "; $db->exec("set names utf8"); $PDO=$db->prepare($sql); $PDO->execute(); $sql__product_filter= "SELECT DISTINCT `producer` FROM `termekek` WHERE `category`= '$product_category' AND `status`= 1 $sorting_filter"; $PDO_product_filter=$db->prepare($sql__product_filter); $PDO_product_filter->execute(); /*query end*/ ?> Kandalloarak.hu | <?php echo $page_title?>


→
→
→

method='get' class='filter_form'>

Ft-tól

'; } else{ echo '

Ft-tól

'; } if($price_filter_to){ echo '

Ft-ig

'; } else{ echo '

Ft-ig

'; } ?>

rowCount();?> db termék

rowCount() / 20)+1; $next= $page + 1 ; $previous = $page - 1; if($last_page!=1){ if( $page == 1 )//Első oldal { echo "".($page)." |"; if( ( $next <= $last_page ) && ( $last_page >= 1 ) ){ echo "". $next ." |"; } if(( ($next+1) <= $last_page ) &&($last_page >= 2) ){ echo "". ($next+1) ." |"; } if((($page+3) != $last_page)&&($last_page >= 3) ){ echo "..."; } echo "Következő |"; echo "Utolsó"; // teszt echo "pager: ". $page; } else//Többi oldal { echo "Első |"; echo "Előző |"; if($page > 2)//... { echo "..."; } echo "".$previous." |"; echo "".($page)." |"; if($page < $last_page){ echo "".$next." |"; } if(($page >= 2) && $page<($last_page-2))//... { echo "..."; } if($page<$last_page){ echo "Következő |"; } if($page<$last_page){ echo "Utolsó"; } } } /*pager*/ ?>
fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) { $counter++; echo '
'; echo '
'; echo '
'; echo '

'. $row[2] .'

'; echo '

Gyártó: '. $row[3] .'

'; if ($row[6]!=0){ if($row[5]==0){ echo '

Ár: '.substr($row[6],0,-3).' '.substr($row[6],-3).' Ft

'; } else { echo '

Ár: '.substr($row[6],0,-3).' '.substr($row[6],-3).' Ft

'; echo '

Új: '.substr($row[5],0,-3).' '.substr($row[5],-3).' Ft

'; } } else echo '

Kérjen ajánlatot!

'; if(strlen($row[8])!=0) $second_picture = '
'; else $second_picture=''; echo '

'.$row[9].$second_picture.'

'; if( (strlen($row[9])>137) || (strlen($second_picture)>0) ){ echo ''; } else echo ''; echo '
'; echo '
'; } if(!$counter){ echo '

Nincs találat! Kérem pontosítson a termékek szűrésen!

'; } $PDO = null; } catch (PDOException $e) { print $e->getMessage(); } ?>
rowCount() / 20)+1; $next= $page + 1 ; $previous = $page - 1; if($last_page!=1){ if( $page == 1 )//Első oldal { echo "".($page)." |"; if( ( $next <= $last_page ) && ( $last_page >= 1 ) ){ echo "". $next ." |"; } if(( ($next+1) <= $last_page ) &&($last_page >= 2) ){ echo "". ($next+1) ." |"; } if((($page+3) != $last_page)&&($last_page >= 3) ){ echo "..."; } echo "Következő |"; echo "Utolsó"; } else//Többi oldal { echo "Első |"; echo "Előző |"; if($page > 2)//... { echo "..."; } echo "".$previous." |"; echo "".($page)." |"; if($page < $last_page){ echo "".$next." |"; } if(($page >= 2) && $page<($last_page-2))//... { echo "..."; } if($page<$last_page){ echo "Következő |"; } if($page<$last_page){ echo "Utolsó"; } } } /*pager alsó*/ ?>