']; foreach($invalid_vals as $key => $val) { if(stristr($requestURI, $val)) { // "; echo ""; }*/ //if ($thumbnail_slider == 1 && ($thumbnail_display == 'N' || stristr($requestURI, URL_SHOP_ALIAS_ITEM) !== false)) { if ($thumbnail_slider == 1 || $item_rating == 'Y') { if ($itemid != ''){ $product_images_rs = mysql_query_("SELECT image_id FROM product_images WHERE image_product_id='{$itemid}'"); if(mysql_num_rows_($product_images_rs) < $no_thumbnail_to_display){ $no_thumbnail_to_display = mysql_num_rows_($product_images_rs); } } $thumbnail_slider_width = ($no_thumbnail_to_display*$pixel_width_thumbnail)+30; if($pixel_height_thumbnail == 0){ $thumbnail_slider_height = "'auto'"; } else { $thumbnail_slider_height = $pixel_height_thumbnail+7; } echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } ############## For mobile Settings ############## $mobile_view = false; $table_width = '100%'; $thumbnail_total_columns = $thumbnail_total_columns == 0 ? 1 : $thumbnail_total_columns; //$thumbnail_total_columns = '3'; $http_user_agent = userAgent($_SERVER['HTTP_USER_AGENT']); if($mobile_version_enable != 'N' && $http_user_agent != 'desktop'){ $category_separator = 'dropdownOnly'; $item_sort = 'N'; if($http_user_agent == 'mobile'){ $symbian= strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'symbian'); //Search for symbian as on http://ready.mobi/ Low-tier phone if ($symbian) { $thumbnail_total_columns = 1; $display_subcategory_link_thumbnail_column = 1; } else { $thumbnail_total_columns = 1; $display_subcategory_link_thumbnail_column = 2; $table_width = '96%'; } } else{ if($tablet_layout == 1) { $thumbnail_total_columns = 1; $display_subcategory_link_thumbnail_column = 1; } else { $thumbnail_total_columns = 3; $display_subcategory_link_thumbnail_column = 3; } } $mobile_view = true; } ################################################# if($add_to_cart_per_page == "Y"){ global $url_start; $add_item_per_page_header = $add_item_per_page_footer = ""; $add_item_per_page_header .= "
"; $add_item_per_page_header .= ""; $add_item_per_page_footer .= ""; $add_item_per_page_footer .= ""; if($addtocart_as_image == "Y") { if(preg_match("/^http:\/\//", $addcartimagename, $addcartimagename_matches) || preg_match("/^https:\/\//", $addcartimagename, $addcartimagename_matches)){ $add_item_per_page_footer .= ""; } else { $add_item_per_page_footer .= ""; } //this is for fixing the x. and y. problem in the image $add_item_per_page_footer .= ""; } else { $add_item_per_page_footer .= ""; } $add_item_per_page_footer .= ""; $add_item_per_page_footer .= "
"; } #START HTML before category links option $pos_category_id = strpos($html_before_category_links, "##category number##"); $pos_category_name = strpos($html_before_category_links, "##category name##"); if($pos_category_id === false || $pos_category_name === false){ $searchbotArray = (DetectBrowserInfo()); $searchbot = $searchbotArray[0]; if($searchbot != ""){ //$html_before_category_links = "##category name##"; $html_before_category_links = "##category name##"; } else{ $html_before_category_links = "##category name##"; } } else { $searchbotArray = (DetectBrowserInfo()); $searchbot = $searchbotArray[0]; if($searchbot != ""){ //$category_name_display = showCategoryName($cat); //$html_before_category_links = stripslashes(str_replace("cat=##", "cat=##",$html_before_category_links)); if ($keywords){ $html_before_category_links = stripslashes(str_replace("?cat=##", "##",$html_before_category_links)); // URL friendly links } else{ if($rec){ $html_before_category_links = stripslashes(str_replace("./?cat=##", URL_SHOP_ALIAS_CATEGORY."##",$html_before_category_links)); // URL friendly links } else{ $html_before_category_links = stripslashes(str_replace("?cat=##", "##",$html_before_category_links)); // URL friendly links } } } else{ $html_before_category_links = stripslashes(str_replace("cat=##", "cart=".$cart."&cat=##",$html_before_category_links)); } } #END HTML before category links option //NOW CAPTURE SHOP THUMBNAIL DETAILS $strThumbDisplay = $thumbnail_display; $strThumbTitleDisplay = $thumbnail_title_display; $strThumbSkuDisplay = $thumbnail_sku_display; $strThumbPriceDisplay = $thumbnail_price_display; $intThumbColumns = $thumbnail_total_columns; $rec = ($rec == "" || $rec < 1) ? 0 : $rec; if(isset($_SESSION['card_number'])){ // use for WGC $strThumbDisplay = 'N'; } if ($goback) $rec = $rec - $itemsperpage - $itemsperpage; if ($itemid != '' && !$displaycatlinks_item_page) { $add_item_per_page_header = isset($add_item_per_page_header) ? "".$add_item_per_page_header : ""; if($catalog3col == 4){ echo ""; } else{ echo "
", $add_item_per_page_header, '
'; } if($display_breadcrumbs_list == 'B' && $catalog3col != 6){ echo ""; } if($display_parent_category_link == 'Y' && $catalog3col != 6){ echo ""; } if($catalog3col == 6){ echo ""; } echo "
"; if(isset($_SESSION['breadcrumbs_catid']) && ($_SERVER['HTTP_REFERER'] != '')) { $catid = $_SESSION['breadcrumbs_catid']; } else { $catid = mysql_result_(mysql_query_("SELECT category_pc_id FROM product_category WHERE product_pc_id='$itemid' AND category_pc_id<>0 ORDER BY category_pc_id asc"),0); } echo "
    "; echo breadcrumbsList($catid, $nested=1); echo "
"; echo "
"; displayParentCategoryLink($itemid, $url_start, $custom_text_parent_category); echo "
"; } if ($stockcontrolmode != 4){ if ($thumbval){ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } } else{ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } } } else { $prodcount = 0; $qry_getproductoption = mysql_query_("SELECT sum(stockqty) as qtysum FROM productoption WHERE productid = '{$itemid}'"); list ($qtysum) = mysql_fetch_row_($qry_getproductoption); if ($qtysum > 0){ if ($thumbval){ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } } else{ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } } } } $add_item_per_page_footer = isset($add_item_per_page_footer) ? "
".$add_item_per_page_footer : ""; if($catalog3col == 6){ echo "
", $add_item_per_page_footer; } else { ?>
"; if($displaycatlinks && !$globalcats){ $CATEGORYIDs = getParentCategoryIDs($cat); $CatSet = array_reverse(array_unique($CATEGORYIDs)); if($searchbot != ""){ for ($a=1; $a < count($CatSet); $a++){ $category_name_display = showCategoryNameDisplay($CatSet[$a]); $html_before_category_links_text = str_replace("##category number##", "$category_name_display-".$CatSet[$a], $html_before_category_links); $html_before_category_links_text = str_replace("##category name##", showCategoryName($CatSet[$a]), $html_before_category_links_text); $html_before_category_links_text = str_replace("##cart##", $cart, $html_before_category_links_text); $html_before_category_links_text = str_replace("?cart=", "",$html_before_category_links_text); $html_before_category_links_text = str_replace("$cart", "",$html_before_category_links_text); $html_before_category_links_text = str_replace("&cat=", "",$html_before_category_links_text); if($index_string == "./"){ $html_before_category_links_text = str_replace("./", URL_SHOP_ALIAS_CATEGORY,$html_before_category_links_text); } //echo $html_before_category_links_text, " » "; } // for } else{ for ($a=1; $a < count($CatSet); $a++) { $html_before_category_links_text = str_replace("##category number##", $CatSet[$a], $html_before_category_links); $html_before_category_links_text = str_replace("##category name##", showCategoryName($CatSet[$a]), $html_before_category_links_text); $html_before_category_links_text = str_replace("##cart##", $cart, $html_before_category_links_text); echo $html_before_category_links_text, " » "; } } $singleColTr = true; } } ?>
>
0) { $sel = explode(":",$_REQUEST['ddCats']); $sel = $sel[0]; }else{ $sel = $cat; } echo "
"; echo ""; echo ""; if(($globalcats AND $displaycatlinks) || (!$globalcats AND $displaycatlinks)) { $GetCategories = mysql_query_("SELECT id, name, parentcatid FROM category WHERE is_deleted='N' AND category_list='Y' ORDER BY sequence ASC"); if($GetCategories AND mysql_num_rows_($GetCategories)>0) { if($mobile_view){ echo "
Shop by Category
"; } echo ""; } } elseif($globalcats AND $displaycatlinks != true) { $SubCategories = mysql_query_("SELECT * FROM category WHERE parentcatid <=1 AND category_list='Y' AND is_deleted='N' ORDER BY sequence"); if($SubCategories AND mysql_num_rows_($SubCategories)>0) { echo ""; } } echo "
"; } if($category_separator=='dropdownOnly') { if(isset($_POST['ddCats']) AND strlen($_POST['ddCats']) >0 ) { $sel = explode(":",$_POST['ddCats']); # at 0 index cat id exists at 1 index cart id $sel = $sel[0]; }else{ $sel = $cat; } echo "
"; echo ""; echo ""; if(($globalcats AND $displaycatlinks) || (!$globalcats AND $displaycatlinks)) { $GetCategories = mysql_query_("SELECT id, name, parentcatid FROM category WHERE is_deleted='N' AND category_list='Y' ORDER BY sequence ASC"); if($GetCategories AND mysql_num_rows_($GetCategories)>0) { if($mobile_view){ echo "
Shop by Category
"; } else { echo "  "; } echo ""; mysql_free_result_($GetCategories); } } elseif($globalcats AND $displaycatlinks != true) { $SubCategories = mysql_query_("SELECT * FROM category WHERE parentcatid <=1 AND is_deleted='N' AND category_list='Y' ORDER BY sequence"); if($SubCategories AND mysql_num_rows_($SubCategories)>0) { echo ""; mysql_free_result_($SubCategories); } } echo "
"; } ?> 1)){ ?> "; } } // end if display_breadcrumbs_list?> 0) AND $show_category_html) echo ""; elseif(!(isset($keywords) AND strlen(trim($keywords))>0) AND $show_category_html) echo ""; } if(isset($_REQUEST['submit_custom_search'])){ $custom_search_qry = ""; foreach($_REQUEST as $key => $val){ if($val != '0' && $val != "" && $key != 'submit_custom_search'){ if(strpos($val,"-") === false){ $custom_search_qry .= " AND product.{$key} = '{$val}' "; } else{ $val = str_replace("-", "AND" , $val); $custom_search_qry .= " AND product.{$key} BETWEEN {$val} "; } } } $keywords = "submit_custom_search"; } elseif(isset($_REQUEST['submit_custom_search_hidden'])){ $custom_search_qry = stripslashes($_POST['custom_search_qry']); $keywords = "submit_custom_search"; } $order_by_item = " product_category.seq_pc_number "; $order_by = " product.name,pc.category_pc_id "; if($item_sort == "Y" && $enable_sort_feature == "Y" && $itemid == ""){ $array_item_sort_featues = explode("|",$item_sort_features); $no_sort_features = count($array_item_sort_featues); if($no_sort_features > 1){ echo ""; } } ?>0 ORDER BY $order_by_item LIMIT {$rec}, {$itemsperpage}"; } //echo $StockModeSQL; if($displaycatlinks_item_page && $itemid != ""){ $add_item_per_page_header = isset($add_item_per_page_header) ? "".$add_item_per_page_header : ""; if($catalog3col == 4){ echo "
"; echo "
    "; echo breadcrumbsList($cat, $nested=1); echo "
"; echo "
", $category_html ,"
", $category_html, "
"; echo ""; echo "Sort By:  "; if($keywords == "submit_custom_search"){ echo ""; echo ""; } echo ""; echo "
"; } else{ echo "
", $add_item_per_page_header, "
"; } if($display_breadcrumbs_list == 'B' && $catalog3col != 6){ echo ""; } if($display_parent_category_link == 'Y' && $catalog3col != 6){ echo ""; } if($catalog3col == 6){ echo ""; } #echo "
"; if(isset($_SESSION['breadcrumbs_catid']) && ($_SERVER['HTTP_REFERER'] != '')) { $catid = $_SESSION['breadcrumbs_catid']; } else { $catid = mysql_result_(mysql_query_("SELECT category_pc_id FROM product_category WHERE product_pc_id='$itemid' AND category_pc_id<>0 ORDER BY category_pc_id asc"),0); } echo "
    "; echo breadcrumbsList($catid, $nested=1); echo "
"; echo "
"; displayParentCategoryLink($itemid, $url_start, $custom_text_parent_category); echo "
"; } if ($stockcontrolmode != 4){ if ($thumbval){ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } } else{ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } } } else { $prodcount = 0; $qry_getproductoption = mysql_query_("SELECT sum(stockqty) as qtysum FROM productoption WHERE productid = '{$itemid}'"); list ($qtysum) = mysql_fetch_row_($qry_getproductoption); if ($qtysum > 0){ if ($thumbval){ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N',$thumbval,$showFullImage); } } else{ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode,'Y','N'); } } } } $add_item_per_page_footer = isset($add_item_per_page_footer) ? "
".$add_item_per_page_footer : ""; if($catalog3col == 6){ echo "
", $add_item_per_page_footer; if(!$globalcats && !$displaycatlinks){ echo $add_item_per_page_footer; } else{ echo "
", $add_item_per_page_footer; } } else{ if(!$keywords){ if($thumbnail_display =='Y' || !$numprods) $add_item_per_page_header = ""; } $add_item_per_page_header = ($add_item_per_page_header) ? "".$add_item_per_page_header : ""; if($catalog3col == 4){ echo "", $add_item_per_page_header, "", ""; } else{ echo "
", $add_item_per_page_header, "", ""; } // new line below by ken 2/26 //echo ""; } //else{ if($catalog3col == 4 && mysql_num_rows_($qry_showproducts) > 0){ /*echo ""; echo ""; echo ""; echo ""; echo ""; echo "";*/ $_SESSION['list_option_loop'] = 0; } if($stockcontrolmode != 4) { while (list($product, $isgiftcert) = mysql_fetch_row_($qry_showproducts)){ if($catalog3col == 6){ $prod = showproduct_custom_layout($product,$shop,$cat,$cart,$stockcontrolmode); } else{ $prod = showproduct($product,$shop,$cat,$cart,$stockcontrolmode); } $prod++; $_SESSION['list_option_loop']++; } } else { while (list($product, $isgiftcert, $qtysum) = mysql_fetch_row_($qry_showproducts)){ if($catalog3col == 6){ $prod = showproduct_custom_layout($product,$shop,$cat,$cart,$stockcontrolmode); } else{ $prod = showproduct($product,$shop,$cat,$cart,$stockcontrolmode); } $prod++; $_SESSION['list_option_loop']++; } } //}// end else #} elseif($keywords == '' && $calledfrom == '' && $strThumbDisplay == "Y") { } elseif($keywords == '' || ($keywords == '' && $calledfrom == '' && $strThumbDisplay == "Y")) { $qry_showproducts = mysql_query_($StockModeSQL); unset($StockModeSQL); $prod = 0; $j = ""; $k = 0; $NewHeight = '100'; //TD height which contains thumbnail if($stockcontrolmode != 4) { #MAKE ARRAY HAVING HEIGHT VAL OF ALL ITEMS PRIOR TO DISPLAY #SO THAT MAX HEIGHT CAN BE CAUGHT WHICH WILL BE APPLIED ON #EACH ROW ACCORDINGLY $ArrHeightMain = array(); #THIS WILL CONTAIN ALL ARRAYS CONTAINING HEIGHT VALS OF EACH ROW $intThumbColumnsStart = $intThumbColumns; while (list($product,$isgiftcert) = mysql_fetch_row_($qry_showproducts)) { if ($k == 0){ $ArrHeightChild = array(); #THIS WILL CONTAIN HEIGHT VALS OF EACH } $k = $k + 1; $ArrHeightChild[] = GetImageHeight($product); if ($k >= $intThumbColumns){ $ArrHeightMain[$intThumbColumnsStart] = $ArrHeightChild; $intThumbColumnsStart = ($intThumbColumnsStart * 2); $k = 0; } } #IF PRODUCT(S) ARE FOUND LESSER THAN $intThumbColumns OR COME IN SINGLE ROW if(mysql_num_rows_($qry_showproducts) < $intThumbColumns){ $ArrHeightChild = isset($ArrHeightChild) ? $ArrHeightChild : ""; $ArrHeightMain[$intThumbColumns] = $ArrHeightChild; } @mysql_data_seek_($qry_showproducts,0); $intThumbColumnsStart = $intThumbColumns; if($subCategoryExist && ($display_subcategory_link_thumbnail=='Y' || ($display_subcategory_link_thumbnail=='M' && $parentid != 0) || ($display_subcategory_link_thumbnail=='T' && $parentid == 0))){ echo ""; } ################### Category HTML between subcategory and items ################### $show_category_html = false; if(trim($category_html_between) != ""){ $searchbotArray = (DetectBrowserInfo()); $searchbot = $searchbotArray[0]; if($searchbot != ""){ $category_html_between = str_replace("##cartid##","",$category_html_between); } else{ $category_html_between = str_replace("##cartid##","&cart=$cart",$category_html_between); } $category_html_between = replaceTextAndAffiliates($category_html_between); $show_category_html = true; } if($category_html_between != ""){ if(isset($keywords) AND (isset($searchCat) AND is_numeric($searchCat) AND $searchCat>0) AND $show_category_html) echo ""; elseif(!(isset($keywords) AND strlen(trim($keywords))>0) AND $show_category_html) echo ""; } ################### Category HTML between subcategory and items ################### //else{ $loop_val = 1; $j = 0; while (list($product,$isgiftcert) = mysql_fetch_row_($qry_showproducts)) { if ($j == 0) echo ""; $j = $j + 1; if(is_array($ArrHeightMain[$intThumbColumnsStart])) rsort($ArrHeightMain[$intThumbColumnsStart]); $prod = showproduct_thumbnail($product,$shop,$cat,$cart,$stockcontrolmode,'','Y','','','',$ArrHeightMain[$intThumbColumnsStart][0],$keywords, $loop_val); if ($j >= $intThumbColumns){ echo ""; $j = 0; $intThumbColumnsStart = ($intThumbColumnsStart * 2); } $prod++; $loop_val++; } // }// end else unset($ArrHeightMain); } else { $ArrHeightMain = array(); $intThumbColumnsStart = $intThumbColumns; $k = 0; while (list($product,$isgiftcert,$qtysum) = mysql_fetch_row_($qry_showproducts)) { if ($k == 0){ $ArrHeightChild = array(); } $k = $k + 1; $ArrHeightChild[] = GetImageHeight($product); if ($k >= $intThumbColumns){ $ArrHeightMain[$intThumbColumnsStart] = $ArrHeightChild; $intThumbColumnsStart = ($intThumbColumnsStart * 2); $k = 0; } } if(mysql_num_rows_($qry_showproducts) < $intThumbColumns){ $ArrHeightMain[$intThumbColumns] = $ArrHeightChild; } @mysql_data_seek_($qry_showproducts,0); $intThumbColumnsStart = $intThumbColumns; if($subCategoryExist && ($display_subcategory_link_thumbnail=='Y' || ($display_subcategory_link_thumbnail=='M' && $parentid != 0) || ($display_subcategory_link_thumbnail=='T' && $parentid == 0))){ echo ""; } // else{ $loop_val = 1; $j=0; while (list($product,$isgiftcert,$qtysum) = mysql_fetch_row_($qry_showproducts)) { if ($j == 0) echo ""; $j = $j + 1; if(is_array($ArrHeightMain[$intThumbColumnsStart])) rsort($ArrHeightMain[$intThumbColumnsStart]); $prod = showproduct_thumbnail($product,$shop,$cat,$cart,$stockcontrolmode,'','Y','','','',$ArrHeightMain[$intThumbColumnsStart][0],$keywords, $loop_val); if ($j >= $intThumbColumns){ echo ""; $j = 0; $intThumbColumnsStart = ($intThumbColumnsStart * 2); } $prod++; $loop_val++; } // } // end else unset($ArrHeightMain); } } elseif($keywords == '' && $calledfrom == "thumb" && $strThumbDisplay == "Y"){ if($catalog3col == 6){ showproduct_custom_layout($itemid,$shop,$cat,$cart,$stockcontrolmode); } else{ showproduct($itemid,$shop,$cat,$cart,$stockcontrolmode); } //showproduct_thumbnail($itemid,$shop,$cat,$cart,$stockcontrolmode); $CSpan = $intThumbColumns+1; $searchbotArray = (DetectBrowserInfo()); $searchbot = $searchbotArray[0]; if($searchbot != ""){ //echo ""; $category_name_display = showCategoryNameDisplay($cat); echo ""; } else { echo ""; } } else { $sqlkeywordsarray = array(); if(!isset($searchCat)) $searchCat = ""; if(!isset($searchCatName)) $searchCatName = ""; /************************************************************************************************ Start of the search code comes here /************************************************************************************************/ if ($display_category_in_searchbox == 'Y') { if ($searchCat == 'All' || $searchCat == '') { $searchCatName = 'All'; $searchCat = 0; } else { $rscatname = mysql_query_("SELECT name FROM category WHERE id = '{$searchCat}' AND is_deleted = 'N' AND category_list = 'Y' "); if($rscatname && mysql_num_rows_($rscatname)){ list($searchCatName) = mysql_fetch_row_($rscatname); mysql_free_result_($rscatname); } } } //if search is made used custom header search form //slashes have to remove if(strpos($keywords,"\\\\") !==false){ $keywords = stripslashes($keywords); } //if a search has two quotes like "Abraham Lincoln" or Abraham "Lincoln" //then have them disregard $keywords = stripslashes(DisregardQuotes($keywords)); $search_text_keywords = $keywords; $keywords = str_ireplace("'s","",$keywords); $sqlkeywords = KeyWordCleaner($keywords); $invalidCharacter = 0; if($sst == 'alphabetic'){ if (!preg_match("/^[a-zA-Z0-9 -.]+$/", $keywords)) { //echo "A match was found."; $sqlkeywords = 'bannned'; $invalidCharacter = 1; } else { //echo "A match was not found."; $sqlkeywords = KeyWordCleaner($keywords); } } elseif($sst == 'never' && $showSR == ''){ $sqlkeywords = 'bannned'; } else{ $sqlkeywords = KeyWordCleaner($keywords); } $sqlkeywords = str_replace("'","'",$sqlkeywords); $keywords = KeyWordCleaner('',$keywords); $MatchCriteria = ""; if(!isset($match_criteria)) $match_criteria = 'all'; if(isset($match_criteria) AND $match_criteria == '') $match_criteria = 'all'; if(isset($match_criteria) AND $match_criteria == 'all') { $MatchCriteria = "(matching all words)"; $sqlkeywordsarray = explode(" ",$sqlkeywords); } if(isset($match_criteria) AND $match_criteria == 'whole') { $MatchCriteria = "(matching whole words only)"; $sqlkeywordsarray = explode(" ",$sqlkeywords); } elseif(isset($match_criteria) AND $match_criteria == 'any'){ $MatchCriteria = "( matching any word ) "; $sqlkeywordsarray = split(" ",$sqlkeywords); } //****************************************************** // Code added to put the keyword in the log for the keyword. //****************************************************** if(!isset($search)) $search = ""; if(trim($keywords) != ''){ if ($searchCat == 'All' || $searchCat == '') $searchCat=0; ($searchCat != '') ? putKeyword(mysql_real_escape_string_($keywords), $match_criteria, $searchCat) : putKeyword(mysql_real_escape_string_($keywords), $match_criteria); } //****************************************************** ################################################################################## #Code to remove trailing 's' from all words # AK, GRTteam # changing to remove 's' only for words longer than 8 chars # if(sizeof($sqlkeywordsarray)>=1){ for($i= 0; $i< sizeof($sqlkeywordsarray); $i++){ if (strtolower(substr($sqlkeywordsarray[$i],-2)) != "ss" && strtolower(substr($sqlkeywordsarray[$i],-1)) == "s" && $match_criteria !='whole' && (strlen($sqlkeywordsarray[$i]) > 8)){ $sqlkeywordsarray[$i] = substr_replace($sqlkeywordsarray[$i],'',-1); } } } ################################################################################## //$sqlkeywords = implode(" ",$sqlkeywordsarray); $search_string_name =""; $search_string_description = ""; $search_string_sku = ""; $search_string_productoption_desc = ""; $j = (sizeof($sqlkeywordsarray) - 1); for($i= 0; $i< sizeof($sqlkeywordsarray); $i++) { if ($match_criteria == 'whole'){ $Search_String_Name .= "FIND_IN_SET('$sqlkeywordsarray[$i]', REPLACE(product.name,' ',','))>0 OR "; $Search_String_Description .= "FIND_IN_SET('$sqlkeywordsarray[$i]', REPLACE(product.description,' ',','))>0 OR "; $Search_String_SKU .= "FIND_IN_SET('$sqlkeywordsarray[$i]', REPLACE(product.sku_pno,' ',','))>0 OR "; $Search_String_ProductOption_Description .= "FIND_IN_SET('$sqlkeywordsarray[$i]', REPLACE(productoption.description,' ',','))>0 OR "; }else{ $search_string_name .= $sqlkeywordsarray[$i]; $search_string_description .= $sqlkeywordsarray[$i]; $search_string_sku .= $sqlkeywordsarray[$i]; $search_string_productoption_desc .= $sqlkeywordsarray[$i]; } if($i < $j){ if ($match_criteria == "all"){ $search_string_name .= "%' AND product.name LIKE '%"; $search_string_description .= "%' AND product.description LIKE '%"; $search_string_sku .= "%' AND sku_pno LIKE '%"; $search_string_productoption_desc .= "%' AND productoption.description LIKE '%"; } elseif ($match_criteria == "whole"){ } else { $search_string_name .= "%' OR product.name LIKE '%"; $search_string_description .= "%' OR product.description LIKE '%"; $search_string_sku .= "%' OR sku_pno LIKE '%"; $search_string_productoption_desc .= "%' OR productoption.description LIKE '%"; } } } if ($searchCat != 0 && intval($searchCat)){ $searchCat = intval($searchCat); $sub_cat_list = listCatTree($searchCat); $search_cat_list = $sub_cat_list.$searchCat; $appendCat = " AND pc.category_pc_id IN($search_cat_list) AND pc.product_pc_id = product.id"; } else { $appendCat = " AND product.id=product_pc_id"; } if($stockcontrolmode != 4) { if($keywords == "submit_custom_search"){ $query = "SELECT DISTINCT product.id AS id FROM "; $query .= ($appendCat=='')?'':" product_category pc, "; $query .= " product LEFT JOIN productoption ON product.id = productoption.productid WHERE (is_deleted='N') {$custom_search_qry} AND display_product_in_cart = 'Y' ".$appendCat; $query .= " AND pc.product_pc_id=product.id "; $query .= "GROUP BY pc.product_pc_id,pc.category_pc_id"; } else{ if (isset($match_criteria) AND $match_criteria != 'whole') { $query = "SELECT DISTINCT product.id AS id FROM "; $query .= ($appendCat=='')?'':" product_category pc, "; $query .= " category, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') AND (product.name LIKE '%".$search_string_name."%'"; if($itemsperpage < 35 || 1) { $query .=" OR product.description LIKE '%".$search_string_description."%' "; } $query .=" OR sku_pno LIKE '%". $search_string_sku."%' OR productoption.description LIKE '%".$search_string_productoption_desc."%') AND category.id=category_pc_id AND category.is_deleted='N' AND category.category_list = 'Y' AND display_product_in_cart = 'Y' ".$appendCat; $query .= " AND pc.product_pc_id=product.id "; $query .= "GROUP BY pc.product_pc_id,pc.category_pc_id"; } else { $WHOLE_KEY_WORDS = substr($Search_String_Name.$Search_String_Description.$Search_String_SKU.$Search_String_ProductOption_Description,0,-3); $query = "SELECT DISTINCT product.id AS id FROM "; $query .= ($appendCat=='')?'':" product_category pc, "; $query .= " product LEFT JOIN productoption ON product.id = productoption.productid WHERE (is_deleted='N') AND ($WHOLE_KEY_WORDS) AND display_product_in_cart = 'Y' ".$appendCat; $query .= " AND pc.product_pc_id=product.id "; $query .= "GROUP BY pc.product_pc_id,pc.category_pc_id"; } } $qry_countproducts = mysql_query_($query); if($qry_countproducts) { $numprods = $reccount = mysql_num_rows_($qry_countproducts); unset($query); mysql_free_result_($qry_countproducts); } } else { $prodcount = 0; $prodlist = ""; $ProductArray = array(); if(isset($match_criteria) AND $match_criteria == 'whole') { $search_string_name = $sqlkeywords; $search_string_description = $sqlkeywords; $search_string_sku = $sqlkeywords; $search_string_productoption_desc = $sqlkeywords; $WHOLE_KEY_WORDS = substr($Search_String_Name.$Search_String_Description.$Search_String_SKU.$Search_String_ProductOption_Description,0,-3); $query = "SELECT DISTINCT product.id AS id, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos FROM product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (is_deleted='N') AND ($WHOLE_KEY_WORDS) AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` ". $appendCat ." {$show_one_result_per_sku_query} ORDER BY pos "; } else { $query = "SELECT DISTINCT product.id AS id, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos FROM product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (is_deleted='N') AND (name LIKE '%".$search_string_name."%' "; if($itemsperpage < 35 || 1) { $query .= " OR product.description LIKE '%".$search_string_description."%'"; } $query .= " OR sku_pno LIKE '%".$search_string_sku."%' OR productoption.description LIKE '%".$search_string_productoption_desc."%') AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` ". $appendCat ." {$show_one_result_per_sku_query} ORDER BY pos "; } $qry_countproducts = mysql_query_($query); while (list ($prodid) = mysql_fetch_row_($qry_countproducts)){ $qry_getproductoption = mysql_query_("SELECT sum(stockqty) as qtysum FROM productoption WHERE productid=$prodid"); list ($qtysum) = mysql_fetch_row_($qry_getproductoption); if ($qtysum > 0){ $prodcount++; $ProductArray[] = $prodid; } } if(sizeof($ProductArray)){ $ProductArray = array_unique($ProductArray); $prodlist = implode(',',$ProductArray); unset($ProductArray); } unset($query); mysql_free_result_($qry_countproducts); $numprods = $reccount = $prodcount; } if(isset($match_criteria) && $match_criteria == 'all' && $numprods == 0 && str_word_count($keywords) > 4) { $keywords_new = str_word_count($keywords, 1); $no_of_keywords = ceil(count($keywords_new) / 2); $keywords_new = array_slice($keywords_new, 0, $no_of_keywords); $keywords = implode(' ', $keywords_new); $_SESSION['close_match'] = 1; $new_sarch_url = str_replace("/shop/", SEARCH_ALIAS, $url_start); $new_sarch_url = $new_sarch_url.urlencode($keywords); header("Location: $new_sarch_url"); die; } $srch_query = ""; if ($stockcontrolmode != 4){ $search_link_categories = "Y"; if($search_link_categories == "Y" && !strpos($requestURI,"/searchCat/") && $reccount > $limit_link_categories){ $show_one_result_per_sku_query=" GROUP BY pc.category_pc_id "; $itemsperpage = "10000"; $order_by = " category.name"; } if(isset($match_criteria) AND $match_criteria == "all") { if($item_sort == "Y" || $reccount > $limit_link_categories){ $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos FROM category, product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') AND (product.name LIKE '%".$search_string_name."%'"; if($itemsperpage < 35 || 1) { $srch_query .= " OR product.description LIKE '%".$search_string_description."%'"; } $srch_query .= " OR sku_pno LIKE '%".$search_string_sku."%' OR productoption.description LIKE '%".$search_string_productoption_desc."%') AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY $order_by LIMIT $rec, $itemsperpage"; } else { if( $search_item_name_first == 'N' || $full_search == 'Y'){ $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos, IF(product.name LIKE '%".$search_string_name."%', 1, 0 ) AS one, IF(product.description LIKE '%".$search_string_description."%', 1, 0 ) AS two, IF(sku_pno LIKE '%".$search_string_sku."%', 1, 0 ) AS three, IF(productoption.description LIKE '%".$search_string_productoption_desc."%', 1, 0 ) AS four FROM category, product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') AND (product.name LIKE '%".$search_string_name."%' OR product.description LIKE '%".$search_string_description."%' OR sku_pno LIKE '%".$search_string_sku."%' OR productoption.description LIKE '%".$search_string_productoption_desc."%') AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY one desc, two desc, three desc, four desc LIMIT $rec, $itemsperpage"; } else { $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos, IF(product.name LIKE '%".$search_string_name."%', 1, 0 ) AS one FROM category, product_category pc, product WHERE (product.is_deleted='N') AND (product.name LIKE '%".$search_string_name."%' OR product.description LIKE '%".$search_string_description."%' OR sku_pno LIKE '%".$search_string_sku."%') AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY one desc LIMIT $rec, $itemsperpage"; } } } elseif(isset($match_criteria) AND $match_criteria == "whole") { $WHOLE_KEY_WORDS = substr($Search_String_Name.$Search_String_Description.$Search_String_SKU.$Search_String_ProductOption_Description,0,-3); $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos FROM category, product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') AND ($WHOLE_KEY_WORDS) AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY $order_by LIMIT $rec, $itemsperpage"; } elseif(isset($match_criteria) AND $match_criteria == "any") { $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywordsarray[0]') IN lower(product.name)) ,'0','1000') AS pos FROM category, product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') AND (product.name LIKE '%".$search_string_name."%'"; if($itemsperpage < 35 || 1) { $srch_query .= " OR product.description LIKE '%".$search_string_description."%'"; } $srch_query .= " OR sku_pno LIKE '%".$search_string_sku."%' OR productoption.description LIKE '%".$search_string_productoption_desc."%') AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY $order_by LIMIT $rec, $itemsperpage"; } } else { if(!empty($prodlist)) { $srch_query_param = ''; if(!empty($prodlist)) { $srch_query_param = "AND product.id IN ($prodlist)"; } } $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos FROM category, product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') {$srch_query_param} AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY $order_by LIMIT $rec, $itemsperpage"; } if($keywords == "submit_custom_search"){ $srch_query = "SELECT DISTINCT product.id AS id, pc.category_pc_id AS categoryid, REPLACE(position(lower('$sqlkeywords') IN lower(product.name)),'0','1000') AS pos FROM category, product_category pc, product LEFT JOIN productoption ON product.id = productoption.productid WHERE (product.is_deleted='N') {$custom_search_qry} AND display_product_in_cart = 'Y' AND pc.`product_pc_id` = product.`id` AND category.id=category_pc_id AND category.is_deleted='N' AND (category.category_list = 'Y' OR category.category_list = 'C') " .$appendCat . " {$show_one_result_per_sku_query} ORDER BY $order_by LIMIT $rec, $itemsperpage"; } //echo $srch_query; $qry_showproducts = mysql_query_($srch_query); if($keywords == "submit_custom_search") { $reccount = mysql_num_rows_($qry_showproducts); } /*********************************************************************************************** End of search code ************************************************************************************************/ if( $strThumbDisplay != "Y") $CSpan = 5; else $CSpan = $intThumbColumns+1; if($keywords != "submit_custom_search"){ if($sst == 'alphabetic' && $invalidCharacter == 1){ echo ""; } elseif($sst == 'never'){ echo ""; } else{ echo ""; } } /*if(($search_item_name_first == 'Y' || $full_search == 'N') && $reccount < 10) { echo ""; }*/ if ($reccount == 0 && $match_criteria != 'whole' && !isset($_REQUEST['submit_custom_search'])){ echo ""; } else { if($search_link_categories == "Y" && !strpos($requestURI,"/searchCat/") && $reccount > $limit_link_categories){ echo ""; } } if($display_celldividerbar == 'Y') echo "
"; echo ""; //////////////////// START CATEGORY LINK ///////////////////// if($search_link_categories == "Y" && !strpos($requestURI,"/searchCat/")){ $qry_showproducts1 = mysql_query_($srch_query); while (list($product,$mycat,$pos) = mysql_fetch_row_($qry_showproducts1)){ $srch_query_new = str_replace("GROUP BY pc.category_pc_id","AND pc.category_pc_id = $mycat GROUP BY product.id",$srch_query); $category_products[$mycat] = mysql_num_rows_(mysql_query_($srch_query_new)); } } if($search_link_categories == "Y" && !strpos($requestURI,"/searchCat/") && $reccount > $limit_link_categories){ $search_categories_url = str_replace("/shop/",SEARCH_ALIAS,$url_start); echo ""; if ($mobile_view) { $td_search_category = 2; } else { $td_search_category = ($category_columns <= 0 ) ? 3 : $category_columns; } echo ""; } //////////////////// END CATEGORY LINK /////////////////////// else{ //SHOW TOP PAGING if($show_top_pager == "Y"){ if ($numprods > $itemsperpage){ $numpages = intval($numprods / $itemsperpage); if ($numpages != ($numprods / $itemsperpage)) $numpages = $numpages +1; $currpage = ($rec == 0) ? 1 : ($rec / $itemsperpage) + 1; if ($numprods > $itemsperpage){ echo ""; } } } //END SHOW TOP PAGING $k=0; $NewHeight = '100'; //TD height which contains thumbnail $ArrHeightMain = array(); $intThumbColumnsStart = $intThumbColumns; while (list($product,$mycat,$pos) = mysql_fetch_row_($qry_showproducts)) { if ($k == 0){ $ArrHeightChild = array(); } $k = $k + 1; $ArrHeightChild[] = GetImageHeight($product); if ($k >= $intThumbColumns){ $ArrHeightMain[$intThumbColumnsStart] = $ArrHeightChild; $intThumbColumnsStart = ($intThumbColumnsStart * 2); $k = 0; } } if(mysql_num_rows_($qry_showproducts) < $intThumbColumns){ $ArrHeightMain[$intThumbColumns] = $ArrHeightChild; } @mysql_data_seek_($qry_showproducts,0); $intThumbColumnsStart = $intThumbColumns; $j=0; $loop_val = 1; while (list($product,$mycat,$pos) = mysql_fetch_row_($qry_showproducts)){ if ($stockcontrolmode != 4){ if( $strThumbDisplay == "Y" AND ($search_displayfull =='Y'|| $search_displayfull =='B')) { if ($j == 0) echo ""; $j = $j + 1; if(is_array($ArrHeightMain[$intThumbColumnsStart])) rsort($ArrHeightMain[$intThumbColumnsStart]); $prod = showproduct_thumbnail($product,$shop,$cat,$cart,$stockcontrolmode,$search_displayfull,'Y','','','',$ArrHeightMain[$intThumbColumnsStart][0],$keywords, $j, $loop_val); if ($j >= $intThumbColumns) { echo ""; $j = 0; $intThumbColumnsStart = ($intThumbColumnsStart * 2); } $prod++; $loop_val++; } else { if($catalog3col == 6 && ($search_displayfull =='Y' || $search_displayfull =='B')){ showproduct_custom_layout($product,$shop,$mycat,$cart,$stockcontrolmode,$search_displayfull); } else{ showproduct($product,$shop,$mycat,$cart,$stockcontrolmode,$search_displayfull); } } } else { $prodcount = 0; $qry_getproductoption = mysql_query_("SELECT sum(stockqty) as qtysum FROM productoption WHERE productid='{$product}'"); list ($qtysum) = mysql_fetch_row_($qry_getproductoption); if ($qtysum > 0) { if( $strThumbDisplay == "Y" AND ($search_displayfull =='Y' || $search_displayfull =='B')) { if ($j == 0) echo ""; $j = $j + 1; if(is_array($ArrHeightMain[$intThumbColumnsStart])) rsort($ArrHeightMain[$intThumbColumnsStart]); $prod = showproduct_thumbnail($product,$shop,$mycat,$cart,$stockcontrolmode,'','Y','','','',$ArrHeightMain[$intThumbColumnsStart][0],$keywords, $loop_val); if ($j >= $intThumbColumns) { echo ""; $j = 0; $intThumbColumnsStart = ($intThumbColumnsStart * 2); } $prod++; $loop_val++; } else { if($catalog3col == 6){ showproduct_custom_layout($product,$shop,$mycat,$cart,$stockcontrolmode,$search_displayfull); } else{ showproduct($product,$shop,$mycat,$cart,$stockcontrolmode,$search_displayfull); } } } } } unset($_SESSION['breadcrumbs_catid']); unset($ArrHeightMain); } } // end else } if (isset($keywords) AND strlen(trim($keywords)) > 0) { $qry_search_pages = "SELECT page_name, page_url FROM pages WHERE page_name LIKE '%$keywords' OR page_url LIKE '%$keywords' OR page_html LIKE '%$keywords' OR page_title_tag LIKE '%$keywords' OR page_description_tag LIKE '%$keywords' OR page_keywords LIKE '%$keywords'"; $rs_search_pages = mysql_query_($qry_search_pages); if (!empty($rs_search_pages->num_rows)) { while(list($page_name, $page_url) = mysql_fetch_array_($rs_search_pages)) { $page_name = (trim($page_name) != '') ? $page_name : $page_url; echo ""; } } } # removed by ken 2/18/08 echo "
"; $parentid = mysql_result_(mysql_query_("Select parentcatid From category Where id=$cat"),0); if($keywords == '' && ($strThumbDisplay == "N" || $strThumbDisplay == "" || is_null($strThumbDisplay))) { $qry_showproducts = mysql_query_($StockModeSQL); unset($StockModeSQL); $prod = 0; if($subCategoryExist && ($display_subcategory_link_thumbnail=='Y' || ($display_subcategory_link_thumbnail=='M' && $parentid != 0) || ($display_subcategory_link_thumbnail=='T' && $parentid == 0))){ //echo "
"; echo "
"; showcategory_thumbnail($cat, $display_subcategory_link_thumbnail_column); echo "
"; showcategory_thumbnail($cat, $display_subcategory_link_thumbnail_column); echo "
", $category_html_between ,"
", $category_html_between, "
"; showcategory_thumbnail($cat, $display_subcategory_link_thumbnail_column); echo "
Back
Back
Back
$customizableFields[212]
$customizableFields[212]
$customizableFields[213]", str_replace("\\","",GetFilterizedHMTLEntities(html_entity_decode($search_text_keywords,ENT_QUOTES))), "  "; if(!isset($_SESSION['close_match'])) { echo GetFilterizedHMTLEntities($MatchCriteria); echo str_replace("\\","",htmlspecialchars($searchCatName)), " "; } echo "
Also search the description, SKU, and dropdowns etc.
$customizableFields[216]"; if($display_celldividerbar == 'Y') echo "
"; echo "
"; } else{ if(isset($_SESSION['close_match'])) { echo "
No exact matches found. Close matches are listed below:"; unset($_SESSION['close_match']); } else { echo "
$customizableFields[214] ", GetFilterizedHMTLEntities($reccount), " $customizableFields[215]";//
"; echo $text_link_categories = str_replace('[xx]',$reccount,stripslashes($text_link_categories)); echo "
"; $j = 0; while (list($product,$mycat,$pos) = mysql_fetch_row_($qry_showproducts)) { if ($j == 0) echo ""; $j = $j + 1; $cat_name = showCategoryNameDisplay($mycat); $display_cat_name = getCatName($mycat); if($display_cat_name!= ""){ echo ""; } if ($j >= $td_search_category){ echo ""; $j = 0; } } echo "
"; //echo "".$display_cat_name.""; $url_start_without_shop = str_replace("/shop/", "", $url_start); $catname = showCategoryNameDisplay($mycat); echo "".$display_cat_name.""; echo " ($category_products[$mycat] items found)"; echo "

"; include("pager.php"); echo "
$page_name
", $item_fit_in_page = ($numprods % $thumbnail_total_columns); if (($numprods > $itemsperpage) || !$item_fit_in_page) echo "
";//echo ""; else echo ""; if($thumbnail_display =='Y' || !$numprods) $add_item_per_page_footer = ""; echo $add_item_per_page_footer = ($add_item_per_page_footer) ? "
".$add_item_per_page_footer."
" : ""; echo ""; ?>  ", ""; if ($_GET['giftadded'] == 1) echo "$customizableFields[240]"; else echo "$customizableFields[241]"; $searchbotArray = (DetectBrowserInfo()); $searchbot = $searchbotArray[0]; if($searchbot != ""){ echo " $customizableFields[242] ", "$customizableFields[208]", ""; } else{ echo " $customizableFields[242] ", "$customizableFields[208]", ""; } } ?> $limit_link_categories){ // nothing } else{ if ($numprods > $itemsperpage){ ?>
"; // Paging $numpages = intval($numprods / $itemsperpage); if ($numpages != ($numprods / $itemsperpage)) $numpages = $numpages +1; $currpage = ($rec == 0) ? 1 : ($rec / $itemsperpage) + 1; if ($numprods > $itemsperpage){ ?>

"; echo ""; } ?> "; } ?> 0 ) { ?>    ($rec + $itemsperpage)){ ?>
0) AND $show_category_html) echo "", $category_html_below ,""; elseif(!(isset($keywords) AND strlen(trim($keywords))>0) AND $show_category_html) echo "", $category_html_below, ""; } ################### Category HTML below items listing ################### } ?>$page_html"; }?> "; } if(stristr($_SERVER['HTTP_REFERER'],"facebook")){ sendOKacknowledgement(); } unset($background, $dividercellcolor, $displaycatlinks, $itemsperpage, $search_displayfull, $show_top_pager, $display_category_in_searchbox, $thumbnail_display, $thumbnail_title_display, $thumbnail_price_display, $thumbnail_total_columns, $display_celldividerbar, $main_category_separator, $main_category_columns, $category_separator, $category_columns, $totalMainCategories, $totalCategories, $display_items_alignment); $footer = showfooter($shop,$cart,$usecustom=1,$tableWidth="100%", $cat, $itemtitle); //$footer = str_replace("", "", $footer); echo $footer; echo ""; mysql_close_($mysql_link); $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = ($endtime - $starttime); if($_SERVER['SERVER_NAME'] == "clarionworld.precisionweb.net" ) echo "This page was created in ".$totaltime." seconds"; ?>