$la_store_security"; exit; } include("header.inc.php"); //echo" //
//
//
//
//
//
//
//"; $cart = new Cart; include("subheader.inc.php"); include_once("menu.inc.php"); //include_once("menu02.inc.php"); // start border sb("100%","",$colour_1,$bg_colour); if($cat_format=="b") { $cat_span=$cat_rows*2; } else { $cat_span=$cat_rows; } $col_width= 100/$cat_rows; // if no category is selected display Top_Level categories // $la_store_select_cat $najnowszy=0; If (empty($cat_id) and(cat_id)<>5) {$cat_id=1;} //if (!empty($catname)) //{ If ($cat_id==4){$cat_id=217;} If ($cat_id==5){$cat_id=0;} If ($cat_id==7){$cat_id=1;} If ($cat_id==8){$cat_id=1;} If ($cat_id==9){$cat_id=1;} If (($cat_id==5)&&($catname==' ')) {$cat_id=0;} // } If (empty($cat_id)) { // $cat_id=2; // welcome note echo"
"; // ze 106 $welcome_note // ze 116 Latest Pictures echo""; $sql_select = mysql_query("SELECT * FROM ".$prefix."store_category where cat_father_id = '$najnowszy' order by $cat_order"); $cat_count = 0; while ($row = mysql_fetch_array($sql_select)) { $cat_count = $cat_count+1; $cat_image = $row["cat_image"]; $cat_id_list = $row["cat_id"]; $category = $row["category"]; if($cat_format=="i") { // image echo""; } if($cat_count==$cat_rows) { echo""; $cat_count = 0; } } if($cat_format=="t") { // text echo""; } if($cat_count==$cat_rows) { echo""; $cat_count = 0; } } if($cat_format=="b") { // text echo""; } if($cat_count==$cat_rows) { echo""; $cat_count = 0; } } } echo"
$category"; if($cat_count!==$cat_rows) { echo"
$category"; if($cat_count!==$cat_rows) { echo"
$category
$category"; if($cat_count!==$cat_rows) { echo"
"; } // display if category has been selected if (!empty($cat_id)) { // create navigation require ("link_navi.php"); $sql_select = mysql_query( "SELECT * FROM ".$prefix."store_category where cat_id='$cat_id' order by category"); while ($row = mysql_fetch_array($sql_select)) { $cat_image = $row["cat_image"]; $category = $row["category"]; } //PICTURE // if (($cat_image!='catnophoto.gif')&&($cat_format!=="t")) // { // echo"


"; // } echo ""; $myq="SELECT * FROM ".$prefix."store_category where cat_father_id = $cat_id order by category"; $sql_select = mysql_query( "SELECT * FROM ".$prefix."store_category where cat_father_id = $cat_id order by category"); $more_cat = MYSQL_NUM_ROWS($sql_select); $cat_count=0; while ($row = mysql_fetch_array($sql_select)) { $cat_count = $cat_count+1; $cat_image = $row["cat_image"]; $cat_id_list = $row["cat_id"]; $category = $row["category"]; $count_products = mysql_query( "select * from ".$prefix."store_inventory where cat_id='$cat_id_list'"); $totalprod = MYSQL_NUM_ROWS($count_products); $cat_format="b"; if($cat_format=="b") { // both // ================================== wstawka search ================================ if ($cat_id_list==4) { echo""; } if($cat_count==$cat_rows) { echo""; // echo "$cat_count == $cat_rows"; echo""; $cat_count = 0; } } } echo"
$category
$category"; } else // if ($cat_id_list!==4) { echo"
$category
$category"; } if ($totalprod!==0) {echo" ($totalprod)";} if($cat_count!==$cat_rows) { //echo "$cat_count <> $cat_rows"; echo"
"; // set limit value for number of records to be shown per page // query database to find total number of records to display $limit = $prod_limit; $ile_column=5; $query_count = " SELECT * FROM ".$prefix."store_inventory where cat_id='$cat_id' order by $prod_order"; $result_count = mysql_query($query_count); $totalitem = mysql_num_rows($result_count); $totalrows = ceil($result_count / $ile_column); if(empty($page)) $page = 1; $limitvalue = $page * $limit - ($limit); //$query = "SELECT * FROM ".$prefix."store_inventory where cat_id='$cat_id' order by $prod_order LIMIT $limitvalue, $limit"; $query = "SELECT * FROM ".$prefix."store_inventory where cat_id='$cat_id' order by RIGHT(product,15) desc LIMIT $limitvalue, $limit"; $result = mysql_query($query) or die("Error: " . mysql_error()); $count_result = mysql_num_rows($result); if((mysql_num_rows($result) == 0)and($more_cat==0)) echo("


$la_store_no_products


"); // Display links at the top to indicate current page and number of pages displayed $numofpages = ceil($totalitem / $limit ); //echo "order: $prod_order"; // echo "kolumn - $ile_column <-> items - $totalitem <-> count - $count_result <-> stron - $numofpages"; $from=$limit*$page-$limit+1; $to=$from + $count_result-1; echo "
";if($numofpages>1){echo"$la_store_showing $from - $to$la_store_go_to_page ($numofpages) ";} $upper_limit = $page + 3; $lower_limit = $page - 2; if($page != 1) { $pageprev = $page - 1; echo("$la_store_prev "); } $lower_dots = $page - $lowerlimit; if($lower_dots > 3) { echo("..."); } for($i = 1; $i <= $numofpages; $i++) { if($numofpages>1) { if($i == $page) { echo(" [".$i."] "); } if(($i != $page)&&($i < $upper_limit)&&($i >= $lower_limit)) { echo(" $i "); } } } $upper_dots = $numofpages - 2; if($page < $upper_dots) { echo("... "); } if(($totalrows - ($limit * $page)) > 0) { $pagenext = $page + 1; echo(" $la_store_next"); } echo"
"; // display products if there are any $ix=1; // echo "totr - $totalrows col- $ile_column it - $totalitem"; if ( $count_result <= $ile_column) { $ile_col=$to-$from+1; } //else { $ile_col=$ile_column; } if ( $count_result > $ile_column) { $ile_col=$ile_column; } if($totalitem>0) { echo"
"; // echo "totr - $totalrows col- $ile_column it - $totalitem"; $ix=1; while ($ix <= $ile_col) { // echo""; // echo""; $ix++; } echo""; } $bgcolour=$colour_4; $zdjecie_numer=0; while($row = mysql_fetch_array($result)) { $zdjecie_numer=$zdjecie_numer+1; $product=$row["product"]; $cat_iid=$row["cat_id"]; $description= $row["description"]; $price=$row["price"]; $sale_price=$row["sale_price"]; $image=$row["image"]; $title=$row["title"]; $title=stripslashes($title); $description=stripslashes($description); $description=substr($description,0,100); if ($bgcolour ==$colour_3) { $bgcolour =$colour_4; } elseif ($bgcolour ==$colour_4) { $bgcolour =$colour_3; } if (!file_exists("$site_dir/images/" . "thumb_$image")) { $thumb=new thumbnail("$site_dir/images/$image"); $thumb->size_auto(120); $thumb->jpeg_quality(100); $thumb->save("$site_dir/images/thumb_$image", $gd_version); } if ($zdjecie_numer==1) { $thumb_name="thumb_$image"; $thumb_no = "catnophoto.gif"; //echo $thumb_name; $sql_cot = "select * from ".$prefix."store_category where cat_id = '$cat_iid'"; // echo $title; $rez = mysql_query ($sql_cot); $lin = mysql_fetch_array($rez); $thumb_yes = $lin["cat_image"]; // echo "- $thumb_yes -"; if ($thumb_yes == $thumb_no) { // $sql_rep = "replace ".$prefix."store_category ( cat_image values ('$thumb_name'))"; // $rezu = mysql_query($sql_rep); $sql_upt = "update ".$prefix."store_category set cat_image='$thumb_name' where cat_id = '$cat_iid'"; $ret = mysql_query ($sql_upt); } } if ($kol >= $ile_column) { // http://forums.devshed.com/t50348/s.html echo""; $kol=1; } else { $kol++; } echo""; //echo "$kol -=- $ile_column"; //echo "els $kol - $ile_col"; // echo""; // } $kol=1; if($totalitem>0) { echo"
 $totalrows col- $ile_column

$title
Calculate price
//
$product //

"; } // Display links at the bottom to indicate current page and number of pages displayed echo "
";if($numofpages>1){echo"$la_store_go_to_page ($numofpages) ";} $upper_limit = $page + 3; $lower_limit = $page - 2; if($page != 1) { $pageprev = $page - 1; echo("$la_store_prev "); } $lower_dots = $page - $lowerlimit; if($lower_dots > 3) { echo("..."); } for($i = 1; $i <= $numofpages; $i++) { if($numofpages>1) { if($i == $page) { echo(" [".$i."] "); } if(($i != $page)&&($i < $upper_limit)&&($i >= $lower_limit)) { echo(" $i "); } } } $upper_dots = $numofpages - 2; if($page < $upper_dots) { echo("... "); } if(($totalrows - ($limit * $page)) > 0) { $pagenext = $page + 1; echo(" $la_store_next"); } else mysql_free_result($result); echo"


"; } // end border eb($bg_colour,$colour_1); // include product spotlight is enabled include("subfooter.inc.php"); // echo" // "; //echo" //"; include("footer.inc.php"); ?>