当前位置: 首页>>代码示例>>PHP>>正文


PHP BrandLink函数代码示例

本文整理汇总了PHP中BrandLink函数的典型用法代码示例。如果您正苦于以下问题:PHP BrandLink函数的具体用法?PHP BrandLink怎么用?PHP BrandLink使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了BrandLink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SetPanelSettings

		public function SetPanelSettings()
		{
			$output = "";

			// Get the number of brands
			$query = "select count(brandid) as num from [|PREFIX|]brands";
			$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
			$row = $GLOBALS['ISC_CLASS_DB']->Fetch($result);
			$num_brands = $row['num'];

			if($num_brands > 0) {
				// Get the 5 most popular brands
				$query = "select b.brandid, b.brandname, (select count(productid) from [|PREFIX|]products p where p.prodbrandid=b.brandid and p.prodvisible='1') as num from [|PREFIX|]brands b order by b.brandname asc";

				$result = $GLOBALS['ISC_CLASS_DB']->Query($query);

				while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
					$GLOBALS['BrandLink'] = BrandLink($row['brandname']);
					$GLOBALS['BrandName'] = isc_html_escape($row['brandname']);
					$output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem");
				}

				if($num_brands > 5) {
					$GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem");
				}

				$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
				$GLOBALS['SNIPPETS']['SideShopByBrandFullList'] = $output;
			}
			else {
				// Hide the panel
				$this->DontDisplay = true;
				$GLOBALS['HideSideShopByBrandFullPanel'] = "none";
			}
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:35,代码来源:SideShopByBrandFull.php

示例2: SetPanelSettings

 function SetPanelSettings()
 {
     $output = "";
     $GLOBALS['ISC_CategoryBrandCache'] = GetClass('ISC_CACHECATEGORYBRANDS');
     $cachedCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->getCategoryBrandsData();
     $mybrands = $GLOBALS['ISC_CategoryBrandCache']->GetBrands($cachedCategoryBrands);
     /*// Get the number of brands
     		$query = "select count(brandid) as num from [|PREFIX|]brands";
     		$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
     		$row = $GLOBALS['ISC_CLASS_DB']->Fetch($result);*/
     $num_brands = count($mybrands);
     if ($num_brands > 0) {
         // Get the 5 most popular brands
         /*$query = "select b.brandid, b.brandname, (select count(productid) from [|PREFIX|]products p where p.prodbrandid=b.brandid and p.prodvisible='1') as num from [|PREFIX|]brands b order by b.brandname asc";
         
         				$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
         */
         foreach ($mybrands as $brand) {
             $GLOBALS['BrandLink'] = BrandLink($brand['brandname']);
             $GLOBALS['BrandName'] = isc_html_escape($brand['brandname']);
             $output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem");
         }
         if ($num_brands > 5) {
             $GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem");
         }
         $output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
         $GLOBALS['SNIPPETS']['SideShopByBrandFullList'] = $output;
     } else {
         // Hide the panel
         $this->DontDisplay = true;
         $GLOBALS['HideSideShopByBrandFullPanel'] = "none";
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:33,代码来源:SideShopByBrandFull.php

示例3: SetPanelSettings

 function SetPanelSettings()
 {
     $output = "";
     $GLOBALS['ISC_CategoryBrandCache'] = GetClass('ISC_CACHECATEGORYBRANDS');
     $cachedCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->getCategoryBrandsData();
     //var_export($cachedCategoryBrands);
     $mybrands = $GLOBALS['ISC_CategoryBrandCache']->GetBrandsIndexpage($cachedCategoryBrands);
     //$mycategorys = $GLOBALS['ISC_CategoryBrandCache']->GetAllCategories($cachedCategoryBrands);
     //$mysubcategorys = $GLOBALS['ISC_CategoryBrandCache']->GetSubCategories($cachedCategoryBrands);
     //$myCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->GetCategoryBrands($cachedCategoryBrands);
     //var_dump($mycategorys);
     $path = GetConfig('ShopPath');
     // Get the link to the "all brands" page
     $GLOBALS['AllBrandsLink'] = BrandLink();
     //wirror20110328: show arrow image
     $GLOBALS['arrowimage'] = "<img src='{$path}/templates/default/images/imgHdrDropDownIcon.gif' border='0' id='brand_listimage'/>";
     /*// Get the 10 most popular brands
     		$query = "SELECT brandid, brandname, COUNT(*) AS num
     			FROM [|PREFIX|]brands b, [|PREFIX|]products p
     			WHERE p.prodbrandid = b.brandid
     			AND prodvisible=1
     			GROUP BY prodbrandid
     			ORDER BY brandname ASC
     			";
     		//$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit(0, 10+1);
     		$result = $GLOBALS['ISC_CLASS_DB']->Query($query);*/
     $extra_output = "";
     // for brands exceeding more than 10
     $x = 1;
     foreach ($mybrands as $brand) {
         //$GLOBALS['BrandLink'] = BrandLink($row['brandname']);
         $GLOBALS['BrandLink'] = $this->LeftBrandLink($brand['brandname']);
         //Added by Simha
         $GLOBALS['BrandName'] = isc_html_escape($brand['brandname']);
         if ($x <= 10) {
             $output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem");
         } else {
             $extra_output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem");
         }
         ++$x;
     }
     if ($x > 11) {
         $GLOBALS['FilterID'] = "brand";
         $GLOBALS['ExtraValues'] = $extra_output;
         $GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SideFilterMoreLink");
         //$GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem");
     }
     if (!$output) {
         $this->DontDisplay = true;
     }
     $output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
     $GLOBALS['SNIPPETS']['SideShopByBrandList'] = $output;
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:53,代码来源:SideShopByBrand.php

示例4: SetPanelSettings

 function SetPanelSettings()
 {
     // Do we need to show paging?
     if ($GLOBALS['ISC_CLASS_BRANDS']->GetNumProducts() > GetConfig('CategoryProductsPerPage')) {
         // Workout the paging data
         $GLOBALS['SNIPPETS']['PagingData'] = "";
         $num_pages_either_side_of_current = 5;
         $start = max($GLOBALS['ISC_CLASS_BRANDS']->GetPage() - $num_pages_either_side_of_current, 1);
         $end = min($GLOBALS['ISC_CLASS_BRANDS']->GetPage() + $num_pages_either_side_of_current, $GLOBALS['ISC_CLASS_BRANDS']->GetNumPages());
         for ($page = $start; $page <= $end; $page++) {
             if ($page == $GLOBALS['ISC_CLASS_BRANDS']->GetPage()) {
                 $snippet = "CategoryPagingItemCurrent";
             } else {
                 $snippet = "CategoryPagingItem";
             }
             $GLOBALS['PageLink'] = BrandLink($GLOBALS['ISC_CLASS_BRANDS']->GetBrandName(), array('page' => $page, 'sort' => $GLOBALS['ISC_CLASS_BRANDS']->GetSort()));
             $GLOBALS['PageNumber'] = $page;
             $GLOBALS['SNIPPETS']['PagingData'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet($snippet);
         }
         // Parse the paging snippet
         if ($GLOBALS['ISC_CLASS_BRANDS']->GetPage() > 1) {
             // Do we need to output a "Previous" link?
             $GLOBALS['PrevLink'] = BrandLink($GLOBALS['ISC_CLASS_BRANDS']->GetBrandName(), array('page' => $GLOBALS['ISC_CLASS_BRANDS']->GetPage() - 1, 'sort' => $GLOBALS['ISC_CLASS_BRANDS']->GetSort()));
             $GLOBALS['SNIPPETS']['CategoryPagingPrevious'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CategoryPagingPrevious");
         }
         if ($GLOBALS['ISC_CLASS_BRANDS']->GetPage() < $GLOBALS['ISC_CLASS_BRANDS']->GetNumPages()) {
             // Do we need to output a "Next" link?
             $GLOBALS['NextLink'] = BrandLink($GLOBALS['ISC_CLASS_BRANDS']->GetBrandName(), array('page' => $GLOBALS['ISC_CLASS_BRANDS']->GetPage() + 1, 'sort' => $GLOBALS['ISC_CLASS_BRANDS']->GetSort()));
             $GLOBALS['SNIPPETS']['CategoryPagingNext'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CategoryPagingNext");
         }
         $output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CategoryPaging");
         $output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
         $GLOBALS['SNIPPETS']['BrandPaging'] = $output;
     }
     // Should we show the compare button?
     if (GetConfig('EnableProductComparisons') == 0 || $GLOBALS['ISC_CLASS_BRANDS']->GetNumProducts() < 2) {
         $GLOBALS['HideCompareItems'] = "none";
     }
     // Parse the sort select box snippet
     if ($GLOBALS['ISC_CLASS_BRANDS']->GetNumProducts() > 1) {
         // Parse the sort select box snippet
         if ($GLOBALS['EnableSEOUrls'] == 1) {
             $GLOBALS['URL'] = BrandLink($GLOBALS['ISC_CLASS_BRANDS']->GetBrandName());
         } else {
             $GLOBALS['URL'] = $GLOBALS['ShopPath'] . "/brands.php";
             $GLOBALS['HiddenSortField'] = "<input type=\"hidden\" name=\"brand\" value=\"" . MakeURLSafe($GLOBALS['ISC_CLASS_BRANDS']->GetBrandName()) . "\" />";
         }
         $GLOBALS['SNIPPETS']['CategorySortBox'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CategorySortBox");
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:50,代码来源:BrandContent.php

示例5: GetBrands

 private function GetBrands()
 {
     header('Content-type: text/xml');
     echo '<?xml version="1.0"?>';
     echo '<results>';
     $hasBrands = false;
     $query = "SELECT * FROM [|PREFIX|]brands ORDER BY brandname ASC";
     $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
     while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
         echo sprintf('<result title="%s" icon="images/brand.gif">%s</result>', isc_html_escape($row['brandname']), BrandLink($row['brandname']));
         $hasBrands = true;
     }
     if (!$hasBrands) {
         echo "<error>" . GetLang('DevEditLinkerNoBrands') . "</error>";
     }
     echo '</results>';
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:17,代码来源:class.linker.php

示例6: SetPanelSettings

	public function SetPanelSettings()
	{
		$output = "";

		// Get the link to the "all brands" page
		$GLOBALS['AllBrandsLink'] = BrandLink();

		// Get the 10 most popular brands
		$query = "SELECT brandid, brandname, COUNT(*) AS num
			FROM [|PREFIX|]brands b, [|PREFIX|]products p
			WHERE p.prodbrandid = b.brandid
			AND prodvisible=1
			GROUP BY prodbrandid
			ORDER BY num DESC, brandname ASC
			";
		$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit(0, 11);
		$result = $GLOBALS['ISC_CLASS_DB']->Query($query);

		$x = 1;
		while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
			if($x <= 10) {
				$GLOBALS['BrandLink'] = BrandLink($row['brandname']);
				$GLOBALS['BrandName'] = isc_html_escape($row['brandname']);
				$output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem");
			}
			++$x;
		}

		if($x == 12) {
			$GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem");
		}

		if(!$output) {
			$this->DontDisplay = true;
		}

		$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
		$GLOBALS['SNIPPETS']['SideShopByBrandList'] = $output;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:39,代码来源:SideShopByBrand.php

示例7: getSubsectionUrl

	/**
	* Returns a url pointing to the subsection view for this model
	*
	* @return string
	*/
	public function getSubsectionUrl()
	{
		return BrandLink();
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:9,代码来源:class.sitemap.model.brands.php

示例8: SetPanelSettings


//.........这里部分代码省略.........
         }
         if ($GLOBALS['ISC_CLASS_PRODUCT']->GetFinalPrice() < $GLOBALS['ISC_CLASS_PRODUCT']->GetRetailPrice()) {
             $GLOBALS['RetailPrice'] = "<strike>" . CurrencyConvertFormatPrice($GLOBALS['ISC_CLASS_PRODUCT']->GetRetailPrice()) . "</strike>";
             // blessen
             //$GLOBALS['PriceLabel'] = GetLang('YourPrice');
             $GLOBALS['PriceLabel'] = GetLang('Price');
             $savings = $GLOBALS['ISC_CLASS_PRODUCT']->GetRetailPrice() - $GLOBALS['ISC_CLASS_PRODUCT']->GetFinalPrice();
             $GLOBALS['HideRRP'] = "none";
             //$GLOBALS['YouSave'] = "<span class=\"YouSave\">".sprintf(GetLang('YouSave'), "<span class=
             //'YouSaveAmount'>".CurrencyConvertFormatPrice($savings)."</span>")."</span>";
         } else {
             $GLOBALS['PriceLabel'] = GetLang('Price');
             $GLOBALS['HideRRP'] = "none";
         }
     } else {
         $GLOBALS['PriceLabel'] = GetLang('Price');
         $GLOBALS['HideShipping'] = 'none';
         if ($GLOBALS['ISC_CLASS_PRODUCT']->ArePricesHidden() || !GetConfig('ShowProductPrice')) {
             if ($GLOBALS['ISC_CLASS_PRODUCT']->GetProductCallForPricingLabel()) {
                 $GLOBALS['ProductPrice'] = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseGL($GLOBALS['ISC_CLASS_PRODUCT']->GetProductCallForPricingLabel());
             } else {
                 $GLOBALS['HidePrice'] = "display: none;";
             }
         } else {
             $GLOBALS['ProductPrice'] = $GLOBALS['ISC_CLASS_PRODUCT']->GetCalculatedPrice();
         }
         $GLOBALS['HideRRP'] = 'none';
         //To display not for sale message Added by Simha
         $GLOBALS['DisplayNotForSaleMsg'] = '';
     }
     // Is this product linked to a brand?
     if ($GLOBALS['ISC_CLASS_PRODUCT']->GetBrandName() != "" && GetConfig('ShowProductBrand')) {
         $GLOBALS['BrandName'] = isc_html_escape($GLOBALS['ISC_CLASS_PRODUCT']->GetBrandName());
         $GLOBALS['BrandLink'] = BrandLink($GLOBALS['ISC_CLASS_PRODUCT']->GetBrandName());
     } else {
         $GLOBALS['HideBrandLink'] = "none";
     }
     if ($GLOBALS['ISC_CLASS_PRODUCT']->GetProductType() == PT_PHYSICAL && GetConfig('ShowProductWeight')) {
         // It's a physical product
         $prodweight = $GLOBALS['ISC_CLASS_PRODUCT']->GetWeight();
         # Added to hide the weight lable while the value is 0.00 Baskaran
         if ($prodweight == '0.00 LBS') {
             $GLOBALS['HideWeight'] = "none";
         } else {
             $GLOBALS['ProductWeight'] = $GLOBALS['ISC_CLASS_PRODUCT']->GetWeight();
         }
     } else {
         // It's a digital product
         $GLOBALS['HideWeight'] = "none";
     }
     $product = $GLOBALS['ISC_CLASS_PRODUCT']->GetProduct();
     $dimensions = array('ProductHeight' => 'prodheight', 'ProductWidth' => 'prodwidth', 'ProductDepth' => 'proddepth');
     foreach ($dimensions as $global => $field) {
         if ($product[$field] > 0) {
             $GLOBALS[$global] = FormatWeight($product[$field], false);
             $hasDimensions = true;
         } else {
             $GLOBALS['Hide' . $global] = 'display: none';
         }
     }
     if (!isset($hasDimensions)) {
         $GLOBALS['HideDimensions'] = 'display: none';
     }
     // Are reviews disabled? Then don't show anything related to reviews
     if (GetConfig('EnableProductReviews') == 0) {
         $GLOBALS['HideReviewLink'] = "none";
开发者ID:nirvana-info,项目名称:old_bak,代码行数:67,代码来源:ProductDetails_30_11.php

示例9: buildSearchResultsHTML

		/**
		 * Build the searched item results HTML
		 *
		 * Method will build the searched item results HMTL. Method will work with the ISC_SEARCH class to get the results
		 * so make sure that the object is initialised and the DoSearch executed.
		 *
		 * @access public
		 * @return string The search item result HTML on success, empty string on error
		 */
		static public function buildSearchResultsHTML()
		{
			if (!isset($GLOBALS["ISC_CLASS_SEARCH"]) || !is_object($GLOBALS["ISC_CLASS_SEARCH"])) {
				return "";
			}

			$totalRecords = $GLOBALS["ISC_CLASS_SEARCH"]->GetNumResults("brand");

			if ($totalRecords == 0) {
				return "";
			}

			$results = $GLOBALS["ISC_CLASS_SEARCH"]->GetResults("brand");
			$resultHTML = array();

			if (!array_key_exists("results", $results) || !is_array($results["results"])) {
				return "";
			}

			foreach ($results["results"] as $brand) {
				if (!is_array($brand) || !array_key_exists("brandid", $brand)) {
					continue;
				}

				$resultHTML[] = "<a href=\"" . BrandLink($brand["brandname"]) . "\">" . isc_html_escape($brand["brandname"]) . "</a>";
			}

			$resultHTML = implode(", ", $resultHTML);
			$resultHTML = trim($resultHTML);
			return $resultHTML;
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:40,代码来源:class.brands.php

示例10: SetPanelSettings

    function SetPanelSettings()
    {
        $output = "";
        $all_makes = array('CHEVROLET', 'GMC', 'FORD', 'DODGE', 'TOYOTA', 'NISSAN', 'HONDA', 'JEEP', 'HYUNDAI', 'CHRYSLER', 'INFINITI', 'LEXUS');
        $colours = array('Red', 'Navy', 'Green', 'Brown', 'Black', 'Silver', 'Dark Gray', 'Tan', 'White');
        $prod_make = array();
        $prod_model = array();
        $prod_submodel = array();
        $prod_year = array();
        $prod_price = array();
        $prod_categoryid = array();
        $count_categoryid = array();
        $brand_id = array();
        $make_link = "";
        $model_link = "";
        $model_flag_link = 0;
        $submodel_link = "";
        $year_link = "";
        $sub_modelrow = array();
        $GLOBALS['SITEPATH'] = GetConfig('ShopPath');
        // Get the link to the "all brands" page
        $GLOBALS['AllBrandsLink'] = BrandLink();
        $params = $this->searchterms;
        if (empty($params)) {
            $params['dynfilters'] = array();
        }
        /*--- Here when brand series is searched directly , brand series is set in seesion to be accessed in other pages --- */
        if (isset($params['series']) && !empty($params['series'])) {
            $_SESSION['absearchterms']['series'] = $params['series'];
        }
        // Build the search query using our terms & the fields we want
        $column_concat = " p.productid , p.prodcode , group_concat(DISTINCT c.categoryid separator '~') as categoryid, group_concat(DISTINCT prodbrandid separator '~') as prodbrandid ";
        $column_concat .= " , group_concat(DISTINCT v.prodmake separator '~') as prodmake , group_concat(DISTINCT v.prodmodel separator '~') as prodmodel , group_concat(DISTINCT v.prodsubmodel separator '~') as prodsubmodel , group_concat(v.prodstartyear separator '~') as prodstartyear , group_concat(v.prodendyear separator '~') as prodendyear ";
        if (isset($params['catuniversal']) && $params['catuniversal'] == 1) {
            // this condition has been added as universal category shd be shown only PQ's
            $column_names = $GLOBALS['p_cols'];
            for ($j = 0; $j < count($column_names); $j++) {
                if (isset($GLOBALS['visible_pqvq'][$column_names[$j]]) && $GLOBALS['visible_pqvq'][$column_names[$j]] == 1) {
                    $column_concat .= " , group_concat(DISTINCT " . $column_names[$j] . " separator '~') as  " . $column_names[$j];
                }
            }
        } else {
            if (isset($params['make']) && !empty($params['make']) && (isset($params['model']) && !empty($params['model']) && (!isset($params['model_flag']) || $params['model_flag'] == 1)) && isset($params['year']) && !empty($params['year']) && isset($GLOBALS['ISC_SRCH_CATG_ID'])) {
                $column_names = array_merge($GLOBALS['v_cols'], $GLOBALS['p_cols']);
                for ($j = 0; $j < count($column_names); $j++) {
                    if (stristr($column_names[$j], 'VQbedsize')) {
                        $column_names[$j] = 'VQbedsize';
                    }
                    if (stristr($column_names[$j], 'VQcabsize')) {
                        $column_names[$j] = 'VQcabsize';
                    }
                    if (isset($GLOBALS['visible_pqvq'][$column_names[$j]]) && $GLOBALS['visible_pqvq'][$column_names[$j]] == 1) {
                        if (eregi('^(vq)', $column_names[$j])) {
                            // the below 2 cases are added for checking only in bedsize and cabsize
                            if ($column_names[$j] == 'VQbedsize' or $column_names[$j] == 'VQcabsize') {
                                if (strcasecmp($column_names[$j], 'VQbedsize') == 0) {
                                    $column_concat .= " , group_concat( DISTINCT if( v.bedsize_generalname != '', v.bedsize_generalname, v.VQbedsize ) separator '~' ) as  " . $column_names[$j];
                                } else {
                                    $column_concat .= " , group_concat( DISTINCT if( v.cabsize_generalname != '', v.cabsize_generalname, v.VQcabsize ) separator '~' ) as  " . $column_names[$j];
                                }
                            } else {
                                $column_concat .= " , group_concat(DISTINCT v." . $column_names[$j] . " separator '~') as  " . $column_names[$j];
                            }
                        } else {
                            if (eregi('^(pq)', $column_names[$j])) {
                                $column_concat .= " , group_concat(DISTINCT " . $column_names[$j] . " separator '~') as  " . $column_names[$j];
                            }
                        }
                    }
                }
            }
        }
        $searchQueries = BuildProductSearchQuery($this->searchterms);
        $searchQueries['query'] = str_replace('USE INDEX (categoryid)', 'USE INDEX (PRIMARY)', $searchQueries['query']);
        //$searchQueries['query'] = str_replace('temp.*',$column_concat,$searchQueries['query']);
        $searchQueries['query'] = str_replace($GLOBALS['srch_where'], $column_concat, $searchQueries['query']);
        // lguan_20100513: If in product detail page, and search terms is empty, should use product id to limit the queries for brand, the original
        //              query was killing the performance
        $showOtherBrandForDetail = false;
        if ($this->searchterms == '') {
            $searchQueries['query'] .= isset($GLOBALS['ISC_CLASS_PRODUCT']) && $GLOBALS['ISC_CLASS_PRODUCT']->_product['prodcatids'] ? ' AND c.categoryid IN (' . $GLOBALS['ISC_CLASS_PRODUCT']->_product['prodcatids'] . ')' : '';
            $showOtherBrandForDetail = true;
        }
        $searchQueries['query'] .= " group by p.productid ";
        $searchQueries['query'] .= $GLOBALS['having_query'];
        $Search_Result1 = $GLOBALS['ISC_CLASS_DB']->Query($searchQueries['query']);
        $numrows = @(int) $GLOBALS['ISC_CLASS_DB']->CountResult($Search_Result1);
        $flag = 0;
        // this flag is used to avoid executing query again and again for submodels
        $filterdata = array();
        $countfilterdata = array();
        $sku = array();
        $count_model = array();
        $count_submodel['all']['count'] = 0;
        $sub_model_flag = 0;
        $sub_catg = "";
        if (!isset($params['model_flag']) || isset($params['model_flag']) && $params['model_flag'] == 1) {
            $model_flag_link = 1;
        }
        $strtocheck = '^(vq|pq)';
//.........这里部分代码省略.........
开发者ID:nirvana-info,项目名称:old_bak,代码行数:101,代码来源:AbSideProductFilters(20-10-10).php

示例11: LoadProductsToCompare

 public function LoadProductsToCompare()
 {
     $count = 0;
     $output = "";
     $tOutput = "";
     $products = array();
     // First row - the "Remove" link
     $GLOBALS['SNIPPETS']['TD1'] = "";
     $GLOBALS['SNIPPETS']['TD2'] = "";
     $GLOBALS['SNIPPETS']['TD3'] = "";
     $GLOBALS['SNIPPETS']['TD4'] = "";
     $GLOBALS['SNIPPETS']['TD5'] = "";
     $GLOBALS['SNIPPETS']['TD6'] = "";
     $GLOBALS['SNIPPETS']['TD7'] = "";
     $GLOBALS['SNIPPETS']['TD8'] = "";
     $GLOBALS['SNIPPETS']['TD9'] = "";
     $GLOBALS['SNIPPETS']['TD10'] = "";
     $GLOBALS['SNIPPETS']['TD11'] = "";
     // Do we need to sort?
     if ($this->_comparesort != "") {
         $sort = sprintf("order by %s", $this->_comparesort);
     } else {
         $sort = "";
     }
     $product_ids = $this->GetProductIds();
     if (empty($product_ids)) {
         return;
     }
     $productids_array = explode('/', $this->GetIds());
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         $GLOBALS['BaseCompareLink'] = CompareLink($productids_array) . '?';
     } else {
         $GLOBALS['BaseCompareLink'] = CompareLink($productids_array) . '&amp;';
     }
     $compareWidth = 100 - 20;
     $compareWidth = floor($compareWidth / count($this->_compareproducts));
     $GLOBALS['CompareWidth'] = $compareWidth . "%";
     $GLOBALS['CompareHeadWidth'] = 100 - $compareWidth * count($this->_compareproducts) . "%";
     $query = "\n\t\t\t\tSELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, imageisthumb, imagefile, " . GetProdCustomerGroupPriceSQL() . ",\n\t\t\t\t(SELECT brandname FROM [|PREFIX|]brands WHERE brandid=prodbrandid) AS brand,\n\t\t\t\t(select count(fieldid) from [|PREFIX|]product_customfields where fieldprodid=p.productid) as numcustomfields,\n\t\t\t\t(select count(reviewid) from [|PREFIX|]reviews where revproductid=p.productid and revstatus='1') AS numreviews\n\t\t\t\tFROM [|PREFIX|]products p\n\t\t\t\tLEFT JOIN [|PREFIX|]product_images pi ON (p.productid=pi.imageprodid)\n\t\t\t\tWHERE p.prodvisible='1' AND p.productid IN (" . $product_ids . ") AND (pi.imageisthumb=1 OR ISNULL(pi.imageisthumb))\n\t\t\t\t" . GetProdCustomerGroupPermissionsSQL() . "\n\t\t\t" . $sort;
     $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
     while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
         $GLOBALS['ProductNumber'] = $count++;
         if ($row['brand'] != "") {
             $GLOBALS['ProductBrand'] = sprintf("<a href='%s'>%s</a>", BrandLink($row['brand']), isc_html_escape($row['brand']));
         } else {
             $GLOBALS['ProductBrand'] = GetLang('NA');
         }
         // Build the page title
         $this->_comparetitle .= sprintf("%s %s ", isc_html_escape($row['prodname']), GetLang('VS'));
         $GLOBALS['ProductId'] = $row['productid'];
         $GLOBALS['ProductName'] = isc_html_escape($row['prodname']);
         $GLOBALS['ProductLink'] = ProdLink($row['prodname']);
         $GLOBALS['NumReviews'] = $row['numreviews'];
         if ($row['numreviews'] == 0) {
             $GLOBALS['HideComparisonReviewLink'] = "none";
         } else {
             $GLOBALS['HideComparisonReviewLink'] = "";
         }
         $GLOBALS['ProductThumb'] = ImageThumb($row['imagefile'], ProdLink($row['prodname']));
         // Determine the price of this product
         $GLOBALS['ProductPrice'] = CalculateProductPrice_retail($row);
         if ($row['prodavailability'] != "") {
             $GLOBALS['ProductAvailability'] = isc_html_escape($row['prodavailability']);
         } else {
             $GLOBALS['ProductAvailability'] = GetLang('NA');
         }
         $compare_ids = array_diff($this->_compareproducts, array($row['productid']));
         if (count($compare_ids) == 1) {
             $GLOBALS['RemoveCompareLink'] = "javascript:alert('%%LNG_CompareTwoProducts%%');";
         } else {
             $GLOBALS['RemoveCompareLink'] = CompareLink($compare_ids);
             if (!empty($this->_comparesort)) {
                 $GLOBALS['RemoveCompareLink'] .= '?sort=' . $_GET['sort'];
             }
         }
         $GLOBALS['ProductRating'] = (int) $row['prodavgrating'];
         if ($row['proddesc'] != "") {
             // Strip out HTML from the description first
             $row['proddesc'] = strip_tags($row['proddesc']);
             if (isc_strlen($row['proddesc']) > 200) {
                 $GLOBALS['ProductSummary'] = isc_substr($row['proddesc'], 0, 200) . "...";
             } else {
                 $GLOBALS['ProductSummary'] = $row['proddesc'];
             }
         } else {
             $GLOBALS['ProductSummary'] = GetLang('NA');
         }
         // Are there any custom fields?
         if ($row['numcustomfields'] > 0) {
             $GLOBALS['CustomFields'] = "";
             // Get the custom fields for this product
             $query = sprintf("select * from [|PREFIX|]product_customfields where fieldprodid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($row['productid']));
             $cResult = $GLOBALS['ISC_CLASS_DB']->Query($query);
             while ($cRow = $GLOBALS['ISC_CLASS_DB']->Fetch($cResult)) {
                 $GLOBALS['CustomFieldName'] = isc_html_escape($cRow['fieldname']);
                 $GLOBALS['CustomFieldValue'] = $cRow['fieldvalue'];
                 $GLOBALS['CustomFields'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CompareProductCustomField");
             }
         } else {
             $GLOBALS['CustomFields'] = GetLang('NA');
//.........这里部分代码省略.........
开发者ID:nirvana-info,项目名称:old_bak,代码行数:101,代码来源:class.compare.php

示例12: _SetBrandData

 public function _SetBrandData()
 {
     // Retrieve the query string variables. Can't use the $_GET array
     // because of SEO friendly links in the URL
     SetPGQVariablesManually();
     // Grab the page sort details
     $GLOBALS['URL'] = implode("/", $GLOBALS['PathInfo']);
     $this->SetSort();
     if (isset($_REQUEST['brand'])) {
         $brand = $_REQUEST['brand'];
     } else {
         if (isset($GLOBALS['PathInfo'][1])) {
             $brand = preg_replace('#\\.html\\??.*$#i', "", $GLOBALS['PathInfo'][1]);
         } else {
             $brand = '';
         }
     }
     $brand = MakeURLNormal($brand);
     // Get the link to the "all brands" page
     $GLOBALS['AllBrandsLink'] = BrandLink();
     // Get the Id of the brand
     $query = sprintf("select * from [|PREFIX|]brands where brandname='%s'", $GLOBALS['ISC_CLASS_DB']->Quote($brand));
     $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
     if ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
         // Store the brand name
         $this->SetBrand($brand);
         $this->SetBrandName($row['brandname']);
         // Store the brand Id
         $this->SetId($row['brandid']);
         $this->SetBrandPageTitle($row['brandpagetitle']);
         // Store brand meta details
         $this->SetMetaKeywords($row['brandmetakeywords']);
         $this->SetMetaDesc($row['brandmetadesc']);
     }
     $this->SetNumProducts();
     $this->SetPage();
     $this->SetStart();
     $this->SetNumPages();
     // Load the products for the brand
     $this->LoadProductsForBrand();
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:41,代码来源:class.brands.php

示例13: ManageBannersGrid

		private function ManageBannersGrid(&$numBanners)
		{
			$GLOBALS['BannerGrid'] = '';
			$GLOBALS['Nav'] = '';
			$searchURL = '';

			if (isset($_GET['searchQuery'])) {
				$query = $_GET['searchQuery'];
				$GLOBALS['Query'] = isc_html_escape($query);
				$searchURL .= '&amp;searchQuery='.urlencode($query);
			} else {
				$query = "";
				$GLOBALS['Query'] = "";
			}

			if (isset($_GET['sortOrder']) && $_GET['sortOrder'] == 'desc') {
				$sortOrder = 'desc';
			} else {
				$sortOrder = "asc";
			}

			$sortLinks = array(
				"Name" => "name",
				"Location" => "page",
				"Date" => "datecreated",
				"Status" => "status"
			);

			if (isset($_GET['sortField']) && in_array($_GET['sortField'], $sortLinks)) {
				$sortField = $_GET['sortField'];
				SaveDefaultSortField("ManageBanners", $_REQUEST['sortField'], $sortOrder);
			}
			else {
				list($sortField, $sortOrder) = GetDefaultSortField("ManageBanners", "name", $sortOrder);
			}

			if (isset($_GET['page'])) {
				$page = (int)$_GET['page'];
			} else {
				$page = 1;
			}

			$sortURL = sprintf("&sortField=%s&sortOrder=%s", $sortField, $sortOrder);
			$GLOBALS['SortURL'] = $sortURL;

			// Get the results for the query
			$bannerResult = $this->_GetBannerList($query, $sortField, $sortOrder, $numBanners);

			if(!$numBanners) {
				return '';
			}

			$GLOBALS['SearchQuery'] = isc_html_escape($query);
			$GLOBALS['SortField'] = $sortField;
			$GLOBALS['SortOrder'] = $sortOrder;

			BuildAdminSortingLinks($sortLinks, "index.php?ToDo=viewBanners&amp;".$searchURL."&amp;page=".$page, $sortField, $sortOrder);


			$GLOBALS['NameSortUpLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&&sortField=name&sortOrder=asc", $query);
			$GLOBALS['NameSortDownLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&sortField=name&sortOrder=desc", $query);

			$GLOBALS['LocationSortUpLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&&sortField=page&sortOrder=asc", $query);
			$GLOBALS['LocationSortDownLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&sortField=page&sortOrder=desc", $query);

			$GLOBALS['DateSortUpLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&&sortField=datecreated&sortOrder=asc", $query);
			$GLOBALS['DateSortDownLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&sortField=datecreated&sortOrder=desc", $query);

			$GLOBALS['StatusSortUpLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&&sortField=status&sortOrder=asc", $query);
			$GLOBALS['StatusSortDownLink'] = sprintf("index.php?ToDo=viewBanners&searchQuery=%s&sortField=status&sortOrder=desc", $query);

			while ($banner = $GLOBALS["ISC_CLASS_DB"]->Fetch($bannerResult)) {
				$GLOBALS['BannerId'] = (int) $banner['bannerid'];
				$GLOBALS['Name'] = isc_html_escape($banner['name']);

				$GLOBALS['Location'] = "";

				switch ($banner['page']) {
					case "home_page": {
						$GLOBALS['Location'] = sprintf("<a target='_blank' href='../'>%s</a>", GetLang('BannerHomePage'));
						break;
					}
					case "category_page": {
						$GLOBALS['Location'] = sprintf("<a target='_blank' href='%s'>%s %s</a>", CatLink($banner['catorbrandid'], $banner["location_name"]), $banner['name'], GetLang('BannerCategory'));
						break;
					}
					case "brand_page": {
						$GLOBALS['Location'] = sprintf("<a target='_blank' href='%s'>%s %s</a>", BrandLink($banner['location_name']), $banner["location_name"], GetLang('ProductsPage'));
						break;
					}
					case "search_page": {
						$GLOBALS['Location'] = sprintf("<a target='_blank' href='../search.php?mode=advanced'>%s</a>", GetLang('SearchResultsPage'));
						break;
					}
				}

				if ($banner['location'] == "top") {
					$GLOBALS['Location'] .= sprintf(" (%s)", GetLang('BannerTopOfPage'));
				}
				else {
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:class.banners.php

示例14: SetPanelSettings

		public function SetPanelSettings()
		{
			$count = 0;
			$output = "";
			$products = array();

			$GLOBALS['BrandsMessage'] = '';

			// If we're showing the "All brands" page then we to display a list of all the brands
			if($GLOBALS['ISC_CLASS_BRANDS']->ShowingAllBrands()) {

				// Output sub-categories
				$GLOBALS['SNIPPETS']['SubBrands'] = "";
				$result = $GLOBALS['ISC_CLASS_DB']->Query("SELECT * FROM [|PREFIX|]brands ORDER BY brandname ASC");

				if($GLOBALS['ISC_CLASS_DB']->CountResult($result) > 0) {

					// Check to see if we need to add in place holder images or if we are just displaying text
					if (!($rtn = $GLOBALS['ISC_CLASS_DB']->Fetch($GLOBALS['ISC_CLASS_DB']->Query("SELECT COUNT(*) AS Total FROM [|PREFIX|]brands WHERE brandimagefile != ''"))) || !$rtn['Total']) {
						$useImages = false;
					} else {
						$useImages = true;
						if (GetConfig('BrandDefaultImage') !== '') {
							$defaultImage = GetConfig('ShopPath') . '/' . GetConfig('BrandDefaultImage');
						} else {
							$defaultImage = $GLOBALS['IMG_PATH'].'/BrandDefault.gif';
						}
					}

					for ($i=1; ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)); $i++) {
						$GLOBALS['SubBrandName'] = isc_html_escape($row['brandname']);
						$GLOBALS['SubBrandLink'] = BrandLink($row['brandname']);
						if ($useImages) {
							if ($row['brandimagefile'] !== '') {
								$GLOBALS['SubBrandImage'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $row['brandimagefile'];
							} else {
								$GLOBALS['SubBrandImage'] = $defaultImage;
							}

							$GLOBALS['ISC_CLASS_TEMPLATE']->assign('width', getConfig('BrandImageWidth'));
							$GLOBALS['ISC_CLASS_TEMPLATE']->assign('height', getConfig('BrandImageHeight') + 50);

							$GLOBALS['SNIPPETS']['SubBrands'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubBrandItemImage");

							if ($i%GetConfig('BrandPerRow') === 0) {
								$GLOBALS['SNIPPETS']['SubBrands'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('SubBrandDivider');
							}
						} else {
							$GLOBALS['SNIPPETS']['SubBrands'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubBrandItem");
						}
					}

					if ($useImages) {
						$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubBrandsGrid");
					} else {
						$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubBrands");
					}

					$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);
					$GLOBALS['BrandsMessage'] = $output;

				} else {
					$GLOBALS['BrandsMessage'] = GetLang('ViewAllBrandsInstructions');
				}

				$GLOBALS['BrandProductListing'] = "<li>&nbsp;</li>";
				$GLOBALS['HideBrandProductListing'] = "none";
				return;
			}

			// Load the products into the reference array
			$GLOBALS['ISC_CLASS_BRANDS']->GetProducts($products);
			$GLOBALS['BrandProductListing'] = "";

			if($GLOBALS['BrandName'] == "") {
				// We're on the 'All Brands' page and the brands list is on the right
				$GLOBALS['ChooseBrandFromList'] = sprintf(GetLang('ChooseBrandFromList'), GetLang('Right'));
				$GLOBALS['BrandProductListing'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BrandMainPageMessage");
			}
			else {
				// Show products for a specific brand
				if(!GetConfig('ShowProductRating')) {
					$GLOBALS['HideProductRating'] = "display: none";
				}

				$GLOBALS['AlternateClass'] = '';
				foreach($products as $row) {
					$this->setProductGlobals($row);
					$GLOBALS['BrandProductListing'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BrandProductsItem");
				}

				if($GLOBALS['ISC_CLASS_BRANDS']->GetNumProducts() == 0) {
					// There are no products in this category
					$GLOBALS['BrandsMessage'] = GetLang('NoProductsInBrand');
					$GLOBALS['BrandProductListing'] = "<li>&nbsp;</li>";
					$GLOBALS['HideBrandProductListing'] = "none";
				}
			}
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:99,代码来源:BrandProductListing.php

示例15: SetPanelSettings

    function SetPanelSettings()
    {
        $output = "";
        $all_makes = array('CHEVROLET', 'GMC', 'FORD', 'DODGE', 'TOYOTA', 'NISSAN', 'HONDA', 'JEEP', 'HYUNDAI', 'CHRYSLER', 'INFINITI', 'LEXUS');
        $colours = array('Red', 'Navy', 'Green', 'Brown', 'Black', 'Silver', 'Dark Gray', 'Tan', 'White');
        $prod_make = array();
        $prod_model = array();
        $prod_year = array();
        $prod_price = array();
        $prod_categoryid = array();
        $count_categoryid = array();
        $brand_id = array();
        $make_link = "";
        $model_link = "";
        $model_flag_link = 0;
        $submodel_link = "";
        $year_link = "";
        $sub_modelrow = array();
        $GLOBALS['SITEPATH'] = GetConfig('ShopPath');
        // Get the link to the "all brands" page
        $GLOBALS['AllBrandsLink'] = BrandLink();
        $params = $this->searchterms;
        if (empty($params)) {
            $params['dynfilters'] = array();
        }
        /*--- Here when brand series is searched directly , brand series is set in seesion to be accessed in other pages --- */
        if (isset($params['brand_series']) && !empty($params['brand_series'])) {
            $_SESSION['searchterms']['brand_series'] = $params['brand_series'];
        }
        // Build the search query using our terms & the fields we want
        $column_concat = " p.productid , p.prodcode , group_concat(DISTINCT c.categoryid separator '~') as categoryid, group_concat(DISTINCT prodbrandid separator '~') as prodbrandid ";
        $column_concat .= " , group_concat(DISTINCT v.prodmake separator '~') as prodmake , group_concat(DISTINCT v.prodmodel separator '~') as prodmodel , group_concat(DISTINCT v.prodsubmodel separator '~') as prodsubmodel , group_concat(v.prodstartyear separator '~') as prodstartyear , group_concat(v.prodendyear separator '~') as prodendyear ";
        if (isset($params['catuniversal']) && $params['catuniversal'] == 1) {
            // this condition has been added as universal category shd be shown only PQ's
            $column_names = $GLOBALS['p_cols'];
            for ($j = 0; $j < count($column_names); $j++) {
                $column_concat .= " , group_concat(DISTINCT " . $column_names[$j] . " separator '~') as  " . $column_names[$j];
            }
        } else {
            if (isset($params['make']) && !empty($params['make']) && (isset($params['model']) && !empty($params['model']) && (!isset($params['model_flag']) || $params['model_flag'] == 1)) && isset($params['year']) && !empty($params['year']) && isset($GLOBALS['ISC_SRCH_CATG_ID'])) {
                $column_names = array_merge($GLOBALS['v_cols'], $GLOBALS['p_cols']);
                for ($j = 0; $j < count($column_names); $j++) {
                    if (stristr($column_names[$j], 'VQbedsize')) {
                        $column_names[$j] = 'VQbedsize';
                    }
                    if (stristr($column_names[$j], 'VQcabsize')) {
                        $column_names[$j] = 'VQcabsize';
                    }
                    if (eregi('^(vq)', $column_names[$j])) {
                        // the below 2 cases are added for checking only in bedsize and cabsize
                        if ($column_names[$j] == 'VQbedsize' or $column_names[$j] == 'VQcabsize') {
                            if (strcasecmp($column_names[$j], 'VQbedsize') == 0) {
                                $column_concat .= " , group_concat( DISTINCT if( v.bedsize_generalname != '', v.bedsize_generalname, v.VQbedsize ) separator '~' ) as  " . $column_names[$j];
                            } else {
                                $column_concat .= " , group_concat( DISTINCT if( v.cabsize_generalname != '', v.cabsize_generalname, v.VQcabsize ) separator '~' ) as  " . $column_names[$j];
                            }
                        } else {
                            $column_concat .= " , group_concat(DISTINCT v." . $column_names[$j] . " separator '~') as  " . $column_names[$j];
                        }
                    } else {
                        if (eregi('^(pq)', $column_names[$j])) {
                            $column_concat .= " , group_concat(DISTINCT " . $column_names[$j] . " separator '~') as  " . $column_names[$j];
                        }
                    }
                }
            }
        }
        $searchQueries = BuildProductSearchQuery($this->searchterms);
        $searchQueries['query'] = str_replace('USE INDEX (categoryid)', 'USE INDEX (PRIMARY)', $searchQueries['query']);
        //$searchQueries['query'] = str_replace('temp.*',$column_concat,$searchQueries['query']);
        $searchQueries['query'] = str_replace($GLOBALS['srch_where'], $column_concat, $searchQueries['query']);
        $searchQueries['query'] .= " group by p.productid ";
        $Search_Result1 = $GLOBALS['ISC_CLASS_DB']->Query($searchQueries['query']);
        $numrows = $GLOBALS['ISC_CLASS_DB']->CountResult($Search_Result1);
        $flag = 0;
        // this flag is used to avoid executing query again and again for submodels
        $filterdata = array();
        $countfilterdata = array();
        $sku = array();
        $count_model['all']['count'] = 0;
        $sub_model_flag = 0;
        $sub_catg = "";
        if (!isset($params['model_flag']) || isset($params['model_flag']) && $params['model_flag'] == 1) {
            $model_flag_link = 1;
        }
        $strtocheck = '^(vq|pq)';
        if (isset($_REQUEST['sub_category'])) {
            $sub_catg = "&sub_category=" . $_REQUEST['sub_category'];
        }
        if (isset($params['brand_series'])) {
            $sub_catg .= "&brand_series=" . $params['brand_series'];
        }
        while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($Search_Result1)) {
            $temp_prod_year = array();
            $grp_make = explode("~", $row['prodmake']);
            $grp_model = explode("~", $row['prodmodel']);
            if ($row['prodsubmodel'] != '~') {
                $grp_submodel = explode("~", $row['prodsubmodel']);
            } else {
                $grp_submodel = "";
//.........这里部分代码省略.........
开发者ID:nirvana-info,项目名称:old_bak,代码行数:101,代码来源:SideProductFilters_Nov03.php


注:本文中的BrandLink函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。