當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MakeURLSafe函數代碼示例

本文整理匯總了PHP中MakeURLSafe函數的典型用法代碼示例。如果您正苦於以下問題:PHP MakeURLSafe函數的具體用法?PHP MakeURLSafe怎麽用?PHP MakeURLSafe使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了MakeURLSafe函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: SetPanelSettings

		public function SetPanelSettings()
		{
			$GLOBALS['ISC_CLASS_CATEGORY'] = GetClass('ISC_CATEGORY');

			// Output breadcrumb trail
			$GLOBALS['SNIPPETS']['CatTrail'] = "";

			if ($GLOBALS['EnableSEOUrls'] == 1) {
				$baseLink = sprintf("%s/categories", $GLOBALS['ShopPath']);
			} else {
				$baseLink = sprintf("%s/categories.php?category=", $GLOBALS['ShopPath']);
			}

			$count = 0;
			$catPath = '';

			foreach($GLOBALS['CatTrail'] as $trail) {
				// if it's the root category and not friendly url, don't add / in front
				if ($count==0 && $GLOBALS['EnableSEOUrls'] != 1) {
					$baseLink .= MakeURLSafe($trail[1]);
				} else {
					$baseLink .= "/" . MakeURLSafe($trail[1]);
				}
				$catPath = MakeURLSafe($trail[1]);
				$GLOBALS['CatTrailName'] = isc_html_escape($trail[1]);
				$GLOBALS['CatTrailLink'] = $baseLink."/";

				if($count++ == count($GLOBALS['CatTrail'])-1) {
					$GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItemCurrent");
				}
				else {
					$GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem");
				}
			}
		}
開發者ID:hungnv0789,項目名稱:vhtm,代碼行數:35,代碼來源:CategoryBreadcrumb.php

示例2: LeftBrandLink

 /**
  * @desc Create Brand links
  * @params Brandname
  */
 function LeftBrandLink($BrandName)
 {
     $NewLink = '';
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         $NewLink = sprintf("%s/%s", GetConfig('ShopPath'), MakeURLSafe(strtolower($BrandName)));
     } else {
         $NewLink = sprintf("%s/search.php?search_query=%s", GetConfig('ShopPath'), MakeURLSafe($BrandName));
     }
     return $NewLink;
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:14,代碼來源:SideShopByBrand.php

示例3: SetPanelSettings

 public function SetPanelSettings()
 {
     // Output breadcrumb trail
     $GLOBALS['SNIPPETS']['CatTrail'] = "";
     $baseLink = sprintf("%s/categories", $GLOBALS['ShopPath']);
     $count = 0;
     foreach ($GLOBALS['CatTrail'] as $trail) {
         $baseLink .= "/" . MakeURLSafe($trail[1]);
         $GLOBALS['CatTrailName'] = $trail[1];
         $GLOBALS['CatTrailLink'] = $baseLink;
         $GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem");
     }
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:13,代碼來源:PriceBreadcrumb.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: ShowSearchPage


//.........這裏部分代碼省略.........
             /* ------------ ends ---------- */
             /* --- this below patch is for getting alternate keywords as per client request ---- starts ---*/
             $GLOBALS['NewSuggestQuery'] = "";
             foreach ($changed_words as $key => $value) {
                 $words = explode(",", $value);
                 for ($i = 0; $i < count($words); $i++) {
                     $words[$i] = trim($words[$i]);
                     $GLOBALS['NewSuggestQuery'][] = "<a href='" . $GLOBALS['ShopPathNormal'] . "/search.php?search_query=" . urlencode($words[$i]) . "&search_key=1'>" . $words[$i] . "</a>";
                 }
             }
             if (!empty($GLOBALS['NewSuggestQuery'])) {
                 $GLOBALS['NewSuggestQuery'] = implode(" , ", $GLOBALS['NewSuggestQuery']);
             }
             /* ------ ends ----- */
             $GLOBALS['ShowSearchSuggestion'] = "";
         } else {
             // No search suggestion
             $GLOBALS['ShowSearchSuggestion'] = "none";
         }
         // Load up a list of results which the panel will take care of displaying
         $this->DoSearch($start, $GLOBALS['SearchResults'], $this->_numresults);
         //NI CLOUD
         //filter for single cat or brand
         if ($GLOBALS['ISC_CLASS_DB']->CountResult($GLOBALS['SearchResults']) == 1) {
             $sresult = $GLOBALS['ISC_CLASS_DB']->Query($GLOBALS['DoSearchQuery']);
             $row = $GLOBALS['ISC_CLASS_DB']->Fetch($sresult);
             if (!isset($row["prodcode"])) {
                 if (isset($row["parentcatname"])) {
                     $query = "SELECT b.* FROM [|PREFIX|]brands b, [|PREFIX|]brand_series bs  WHERE b.brandid = bs.brandid and bs.seriesid = " . $row["brandseriesid"];
                     $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
                     if ($GLOBALS['ISC_CLASS_DB']->CountResult($result) > 0) {
                         $crow = $GLOBALS['ISC_CLASS_DB']->Fetch($result);
                         if ($crow["displayproducts"] == '1') {
                             header("Location:" . $GLOBALS["ShopPath"] . $_SERVER["REQUEST_URI"] . "/series/" . MakeURLSafe($row["seriesname"]));
                         }
                     }
                 } else {
                     $query = "SELECT * FROM [|PREFIX|]categories c WHERE c.categoryid = (SELECT catparentid FROM [|PREFIX|]categories where categoryid = " . $row["categoryid"] . ")";
                     $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
                     if ($GLOBALS['ISC_CLASS_DB']->CountResult($result) > 0) {
                         $crow = $GLOBALS['ISC_CLASS_DB']->Fetch($result);
                         if (strtolower($crow["displayproducts"]) == 'on') {
                             header("Location:" . $GLOBALS["ShopPath"] . $_SERVER["REQUEST_URI"] . "/subcategory/" . MakeURLSafe($row["catname"]));
                         }
                     } else {
                         $query = "(SELECT * FROM [|PREFIX|]categories where categoryid = " . $row["categoryid"] . ")";
                         $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
                         $crow = $GLOBALS['ISC_CLASS_DB']->Fetch($result);
                         if (strtolower($crow["displayproducts"]) == 'on') {
                             header("Location:" . $GLOBALS["ShopPath"] . $_SERVER["REQUEST_URI"] . "/subcategory/" . MakeURLSafe($row["catname"]));
                         }
                     }
                 }
             }
         }
         // Log the search result
         if ($start == 0) {
             //wirror_20100913: filter the request from yahoo,google,msn & baidu
             if (isset($_SERVER['HTTP_USER_AGENT'])) {
                 $userAgent = $_SERVER['HTTP_USER_AGENT'];
                 $webSpiders = array('Yahoo! Slurp', 'Baiduspider', 'Googlebot', 'msnbot');
                 $noSpider = true;
                 foreach ($webSpiders as $spider) {
                     if (strpos($userAgent, $spider) !== false) {
                         $noSpider = false;
                         break;
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:67,代碼來源:class.search.php

示例6: SearchStatsPerformanceGrid

 function SearchStatsPerformanceGrid()
 {
     $query = sprintf("select distinct(searchtext), searchurl, UPPER(ifnull( prodmaker , '' )) AS maker, ifnull( prodyear , '' ) AS year, UPPER(ifnull( prodmodel , '' )) AS model, max(numresults) as numresults, count(searchid) as numsearches, max(searchdate) as lastperformed\n\t\t\t\t\t\t\t\tfrom [|PREFIX|]searches_extended\n\t\t\t\t\t\t\t\twhere numresults > 0\n\t\t\t\t\t\t\t\tand clickthru='%d'\n\t\t\t\t\t\t\t\tand searchdate >= '%d' and searchdate <= '%d'\n\t\t\t\t\t\t\t\tgroup by searchtext, searchurl, maker, year, model\n\t\t\t\t\t\t\t\torder by numsearches desc", $this->clickwhere, $this->from_date, $this->to_date);
     $result = $GLOBALS['ISC_CLASS_DB']->Query($query);
     header("Content-Type: text/csv");
     if ($this->clickwhere == 1) {
         header("Content-Disposition: attachment; filename=SearchStatsBestPerformingKeywords.csv");
     } else {
         header("Content-Disposition: attachment; filename=SearchStatsWorstPerformingKeywords.csv");
     }
     header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
     header('Expires:0');
     header('Pragma:public');
     if ($this->clickwhere == 1) {
         echo 'Search statistics for best performing keywords';
     } else {
         echo 'Search statistics for worst performing keywords';
     }
     echo "\n\n";
     if (isset($this->from_date) && $this->from_date != 0) {
         echo 'Start Date:,' . date("Y-m-d H:i:s", $this->from_date) . ', ,';
     }
     if (isset($this->to_date) && $this->to_date != 0) {
         echo 'End Date:,' . date("Y-m-d H:i:s", $this->to_date) . "\n\n";
     }
     if ($GLOBALS['ISC_CLASS_DB']->CountResult($result) > 0) {
         echo "Search Terms,Search Text,Year,Make,Model,Number of Searches,Number of Results,Search Last Performed \n";
         while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
             echo (isset($row['searchurl']) && $row['searchurl'] !== '' ? $GLOBALS["ShopPath"] . $row['searchurl'] : $GLOBALS["ShopPath"] . "/search/" . MakeURLSafe($row['searchtext']) . (isset($row['year']) && $row['year'] != "" ? "/year/" . $row['year'] : '') . (isset($row['maker']) && $row['maker'] != "" ? "/make/" . MakeURLSafe($row['maker']) : '') . (isset($row['model']) && $row['model'] != "" ? "/model/" . MakeURLSafe($row['model']) : '')) . ',' . isc_html_escape($row['searchtext']) . ',' . $row['year'] . ',' . $row['maker'] . ',' . $row['model'] . ',' . number_format($row['numsearches'], 0, '', '') . ',' . number_format($row['numresults'], 0, '', '') . ',' . isc_date(GetConfig('DisplayDateFormat'), $row['lastperformed']);
             echo "\n";
         }
         echo "\nTotal Results: " . $GLOBALS['ISC_CLASS_DB']->CountResult($result);
     } else {
         echo "Total Results: 0";
     }
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:36,代碼來源:class.export.search.statistic.php

示例7: _generalYMM

 private function _generalYMM($prodIds)
 {
     $prodIds = implode(',', $prodIds);
     $arrYears = range(1995, 2010);
     $arrMakes = array('Chevrolet', 'GMC', 'Ford', 'Dodge', 'Toyota', 'Nissan', 'Honda', 'Jeep', 'Hyundai', 'Chrysler', 'Infiniti', 'Lexus');
     $arrYMM = array();
     foreach ($arrYears as $year) {
         foreach ($arrMakes as $make) {
             $ymm_qry = "SELECT distinct prodmodel \n\t\t\t\t\t\tFROM [|PREFIX|]products p \n\t\t\t\t\t\tLEFT JOIN [|PREFIX|]import_variations AS v ON v.productid = p.productid \n\t\t\t\t\t\tWHERE p.prodvisible='1'\n\t\t\t\t\t\tAND p.productid IN({$prodIds}) \n\t\t\t\t\t\tAND('{$year}' between prodstartyear and prodendyear OR prodstartyear = 'all' )\n\t\t\t\t\t\t";
             //AND prodmake='$make'
             $ymm_res = $GLOBALS['ISC_CLASS_DB']->Query($ymm_qry);
             while ($ymm_row = $GLOBALS['ISC_CLASS_DB']->Fetch($ymm_res)) {
                 if ($GLOBALS['EnableSEOUrls'] == 1) {
                     $yearTmp = "/year/{$year}";
                     $makeTmp = "/make/" . strtolower($make);
                     $modelTmp = "/model/" . MakeURLSafe(strtolower($ymm_row['prodmodel']));
                 } else {
                     $yearTmp = "&year={$year}";
                     $makeTmp = "&make=" . strtolower($make);
                     $modelTmp = "&model=" . MakeURLSafe(strtolower($ymm_row['prodmodel']));
                 }
                 $arrYMM[] = "{$yearTmp}{$makeTmp}{$modelTmp}";
             }
         }
     }
     return $arrYMM;
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:27,代碼來源:sitemap_generator.php

示例8: SetPanelSettings

		public function SetPanelSettings()
		{
			$GLOBALS['ISC_CLASS_CATEGORY'] = GetClass('ISC_CATEGORY');

			// Output breadcrumb trail
			$GLOBALS['SNIPPETS']['CatTrail'] = "";

			if ($GLOBALS['EnableSEOUrls'] == 1) {
				$baseLink = sprintf("%s/categories", $GLOBALS['ShopPath']);
			} else {
				$baseLink = sprintf("%s/categories.php?category=", $GLOBALS['ShopPath']);
			}

			$count = 0;
			$catPath = '';
			if (isset($GLOBALS['CatTrail']) && is_array($GLOBALS['CatTrail'])) {
				foreach($GLOBALS['CatTrail'] as $trail) {
					$baseLink .= "/" . MakeURLSafe($trail[1]);
					$catPath .= MakeURLSafe($trail[1])."/";

					$GLOBALS['CatTrailName'] = isc_html_escape($trail[1]);
					$GLOBALS['CatTrailLink'] = $baseLink;

					if($count++ == count($GLOBALS['CatTrail'])-1) {
						$GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItemCurrent");
					}
					else {
						$GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem");
					}
				}
			}

			$catPath = rtrim($catPath, "/");

			// Output sub-categories
			$GLOBALS['SNIPPETS']['SubCategories'] = "";
			$query = sprintf("select * from [|PREFIX|]categories where catparentid='%d' and catvisible=1 order by catsort asc, catname asc", $GLOBALS['ISC_CLASS_DB']->Quote($GLOBALS['CatId']));
			$result = $GLOBALS['ISC_CLASS_DB']->Query($query);

			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|]categories WHERE catparentid='" . (int)$GLOBALS['CatId'] . "' AND catimagefile != ''"))) || !$rtn['Total']) {
					$useImages = false;
				} else {
					$useImages = true;
					if (GetConfig('CategoryDefaultImage') !== '') {
						$defaultImage = GetConfig('ShopPath') . '/' . GetConfig('CategoryDefaultImage');
					} else {
						$defaultImage = $GLOBALS['IMG_PATH'].'/CategoryDefault.gif';
					}
				}

				$i = 0;
				while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
					$i++;
					if (!CustomerGroupHasAccessToCategory($row['categoryid'])) {
						continue;
					}

					$GLOBALS['SubCatName'] = isc_html_escape($row['catname']);
					$GLOBALS['SubCatLink'] = CatLink($row['categoryid'], $row['catname']);
					if ($useImages) {
						if ($row['catimagefile'] !== '') {
							$GLOBALS['SubCatImage'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $row['catimagefile'];
						} else {
							$GLOBALS['SubCatImage'] = $defaultImage;
						}

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

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

						if ($i % GetConfig('CategoryPerRow') == 0) {
							$GLOBALS['SNIPPETS']['SubCategories'] .= '<li class="RowDivider" style="float:none; clear:both;"></li>';
						}

					} else {
						$GLOBALS['SNIPPETS']['SubCategories'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubCatItem");
					}
				}

				if ($useImages) {
					if ($i % GetConfig('CategoryPerRow') > 0) {
						$GLOBALS['SNIPPETS']['SubCategories'] .= '<li style="float: none; clear: both;"/>';
					}
					$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubCategoriesGrid");
				} else {
					$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SubCategories");
				}

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

			if($GLOBALS['ISC_CLASS_CATEGORY']->GetNumProducts() > 1) {
				// Parse the sort select box snippet
				$queryStringAppend = array();
				if(!empty($_GET['price_min'])) {
//.........這裏部分代碼省略.........
開發者ID:hungnv0789,項目名稱:vhtm,代碼行數:101,代碼來源:CategoryHeading.php

示例9: GetClearFilterlink

 /**
  * @desc Create filters below paramters into links
  * @params search paramsters, qualifier title
  * $mmy = 1 -> clear all filters below other than mmy
  * $mmy = 0 -> clear mmy filters
  */
 function GetClearFilterlink($params, $mmy)
 {
     $NewLink = '';
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         if ($mmy == 1) {
             if (isset($params['make']) && !empty($params['make'])) {
                 $NewLink .= "/make/" . MakeURLSafe(strtolower($params['make']));
             }
             if (isset($params['model']) && !empty($params['model'])) {
                 $NewLink .= "/model/" . MakeURLSafe(strtolower($params['model']));
             }
             if (isset($params['model_flag']) && $params['model'] == 0) {
                 $NewLink .= "/model_flag/" . $params['model_flag'];
             }
             if (isset($params['year']) && !empty($params['year'])) {
                 $NewLink .= "/year/" . $params['year'];
             }
             if ($NewLink == "") {
                 $NewLink = "/";
             }
         } else {
             // for clear mmy filters
             /*if(isset($GLOBALS['ISC_SRCH_CATG_NAME']))
             			$NewLink .= "/".MakeURLSafe(strtolower($GLOBALS['ISC_SRCH_CATG_NAME']));
             		else if(isset($GLOBALS['ISC_SRCH_BRAND_NAME']))
             			$NewLink .= "/".MakeURLSafe(strtolower($GLOBALS['ISC_SRCH_BRAND_NAME']));*/
             $NewLink .= "/" . MakeURLSafe(strtolower($GLOBALS['PathInfo'][1]));
             if (isset($params['brand']) && $params['brand'] != "" && $NewLink != $params['brand']) {
                 $NewLink .= "/brand/" . MakeURLSafe(strtolower($params['brand']));
             }
             if (isset($params['series']) && $params['series'] != "") {
                 $NewLink .= "/series/" . MakeURLSafe(strtolower($params['series']));
             }
             if (isset($params['subcategory']) && $params['subcategory'] != "") {
                 $NewLink .= "/subcategory/" . MakeURLSafe(strtolower($params['subcategory']));
             }
             if ($NewLink != "") {
                 $NewLink .= "";
             } else {
                 $NewLink .= "/";
             }
         }
     } else {
         if ($mmy == 1) {
             $addLink = "/search.php?search_query=categories";
             if (isset($params['make']) && !empty($params['make'])) {
                 $NewLink .= "&make=" . MakeURLSafe(strtolower($params['make']));
             }
             if (isset($params['model']) && !empty($params['model'])) {
                 $NewLink .= "&model=" . MakeURLSafe(strtolower($params['model']));
             }
             if (isset($params['model_flag']) && $params['model'] == 0) {
                 $NewLink .= "&model_flag=" . $params['model_flag'];
             }
             if (isset($params['year']) && !empty($params['year'])) {
                 $NewLink .= "&year=" . $params['year'];
             }
             if ($NewLink != "") {
                 $NewLink = $addLink . $NewLink;
             } else {
                 $NewLink = "/";
             }
         } else {
             // for clear mmy filters
             $addLink = "/search.php?search_query=";
             if (isset($GLOBALS['ISC_SRCH_CATG_NAME'])) {
                 $NewLink .= MakeURLSafe(strtolower($GLOBALS['ISC_SRCH_CATG_NAME']));
             } else {
                 if (isset($GLOBALS['ISC_SRCH_BRAND_NAME'])) {
                     $NewLink .= MakeURLSafe(strtolower($GLOBALS['ISC_SRCH_BRAND_NAME']));
                 }
             }
             if (isset($params['brand']) && $params['brand'] != "" && $NewLink != $params['brand']) {
                 $NewLink .= "&brand=" . MakeURLSafe($params['brand']);
             }
             if (isset($params['series']) && $params['series'] != "") {
                 $NewLink .= "&series=" . MakeURLSafe($params['series']);
             }
             if (isset($params['subcategory']) && $params['subcategory'] != "") {
                 $NewLink .= "&subcategory=" . MakeURLSafe($params['subcategory']);
             }
             if ($NewLink != "") {
                 $NewLink .= "";
                 $NewLink = $addLink . $NewLink;
             } else {
                 $NewLink .= "/";
             }
         }
     }
     return $NewLink;
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:97,代碼來源:AbSideProductFilters(20-10-10).php

示例10: ProdAudioLink

 /**
  * Generate the link to a product audio.
  *
  * @param string The name of the product to generate the link to.
  * @return string The generated link to the product.
  */
 function ProdAudioLink($prod)
 {
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         return sprintf("%s/%s/%s.html", GetConfig('ShopPath'), PRODUCTAUDIO_LINK_PART, MakeURLSafe($prod));
     } else {
         return sprintf("%s/productaudio.php?product_id=%s", GetConfig('ShopPath'), MakeURLSafe($prod));
     }
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:14,代碼來源:ProductDetails_9_2.php

示例11: PageLink

function PageLink($pageid, $pagetitle, $vendor = array())
{
    $link = GetConfig('ShopPathNormal') . '/';
    if (!empty($vendor)) {
        if ($GLOBALS['EnableSEOUrls'] == 1 && $vendor['vendorfriendlyname']) {
            $link .= 'vendors/' . $vendor['vendorfriendlyname'] . '/' . MakeURLSafe($pagetitle) . '.html';
        } else {
            $link .= 'vendors.php?vendorid=' . (int) $vendor['vendorid'] . '&pageid=' . (int) $pageid;
        }
    } else {
        if ($GLOBALS['EnableSEOUrls'] == 1) {
            $link .= 'pages/' . MakeURLSafe($pagetitle) . '.html';
        } else {
            $link .= 'pages.php?pageid=' . (int) $pageid;
        }
    }
    return $link;
}
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:18,代碼來源:general.php

示例12: GetYMMLinks

 /**
  * @desc Create YMM links
  * @params search paramsters
  */
 function GetYMMLinks($params)
 {
     $NewLink = '';
     if ($GLOBALS['EnableSEOUrls'] == 1) {
         if (isset($params['make']) && !empty($params['make'])) {
             $NewLink .= "/make/" . MakeURLSafe(strtolower($params['make']));
         }
         if (isset($params['model']) && !empty($params['model'])) {
             $NewLink .= "/model/" . MakeURLSafe(strtolower($params['model']));
         }
         if (isset($params['model_flag']) && $params['model_flag'] == 0) {
             $NewLink .= "/model_flag/" . $params['model_flag'];
         }
         if (isset($params['submodel']) && !empty($params['submodel'])) {
             $NewLink .= "/submodel/" . MakeURLSafe(strtolower($params['submodel']));
         }
         if (isset($params['year']) && !empty($params['year'])) {
             $NewLink .= "/year/" . $params['year'];
         }
     } else {
         if (isset($params['make']) && !empty($params['make'])) {
             $NewLink .= "&make=" . MakeURLSafe($params['make']);
         }
         if (isset($params['model']) && !empty($params['model'])) {
             $NewLink .= "&model=" . MakeURLSafe($params['model']);
         }
         if (isset($params['model_flag']) && $params['model_flag'] == 0) {
             $NewLink .= "&model_flag=" . $params['model_flag'];
         }
         if (isset($params['submodel']) && !empty($params['submodel'])) {
             $NewLink .= "&submodel=" . MakeURLSafe($params['submodel']);
         }
         if (isset($params['year']) && !empty($params['year'])) {
             $NewLink .= "&year=" . $params['year'];
         }
     }
     return $NewLink;
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:42,代碼來源:ClearanceList.php

示例13: SetPanelSettings

 public function SetPanelSettings()
 {
     $_SESSION['you_save'] = 0;
     //blessen
     $GLOBALS['SNIPPETS']['CartItems'] = "";
     $count = 0;
     $subtotal = 0;
     $_SESSION['CHECKOUT'] = array();
     // Get a list of all products in the cart
     $GLOBALS['ISC_CLASS_CART'] = GetClass('ISC_CART');
     $GLOBALS['ISC_CLASS_CART']->api->RemoveGoogleCheckoutCouponFlag();
     // Added for google cehckout remove link
     $product_array = $GLOBALS['ISC_CLASS_CART']->api->GetProductsInCart();
     $GLOBALS['AdditionalCheckoutButtons'] = '';
     // Go through all the checkout modules looking for one with a GetSidePanelCheckoutButton function defined
     $ShowCheckoutButton = false;
     if (!empty($product_array)) {
         foreach (GetAvailableModules('checkout', true, true) as $module) {
             if (isset($module['object']->_showBothButtons) && $module['object']->_showBothButtons) {
                 $ShowCheckoutButton = true;
                 $GLOBALS['AdditionalCheckoutButtons'] .= $module['object']->GetCheckoutButton();
             } elseif (method_exists($module['object'], 'GetCheckoutButton')) {
                 $GLOBALS['AdditionalCheckoutButtons'] .= $module['object']->GetCheckoutButton();
             } else {
                 $ShowCheckoutButton = true;
             }
         }
     }
     $GLOBALS['HideMultipleAddressShipping'] = 'display: none';
     if (gzte11(ISC_MEDIUMPRINT) && $GLOBALS['ISC_CLASS_CART']->api->GetNumPhysicalProducts() > 1 && $ShowCheckoutButton && GetConfig("MultipleShippingAddresses")) {
         $GLOBALS['HideMultipleAddressShipping'] = '';
     }
     $GLOBALS['HideCheckoutButton'] = '';
     if (!$ShowCheckoutButton) {
         $GLOBALS['HideCheckoutButton'] = 'display: none';
         $GLOBALS['HideMultipleAddressShippingOr'] = 'display: none';
     }
     $wrappingOptions = $GLOBALS['ISC_CLASS_DATA_STORE']->Read('GiftWrapping');
     if (empty($wrappingOptions)) {
         $publicWrappingOptions = false;
     } else {
         $publicWrappingOptions = true;
     }
     if (!GetConfig('ShowThumbsInCart')) {
         $GLOBALS['HideThumbColumn'] = 'display: none';
         $GLOBALS['ProductNameSpan'] = 2;
     } else {
         $GLOBALS['HideThumbColumn'] = '';
         $GLOBALS['ProductNameSpan'] = 1;
     }
     $wrappingAdjustment = 0;
     $itemTotal = 0;
     $comptotal = 0;
     # To get all the complementary product total -- Baskaran
     $compprice = 0;
     foreach ($product_array as $k => $product) {
         $GLOBALS['CartItemId'] = (int) $product['cartitemid'];
         // If the item in the cart is a gift certificate, we need to show a special type of row
         if (isset($product['type']) && $product['type'] == "giftcertificate") {
             $GLOBALS['GiftCertificateName'] = isc_html_escape($product['data']['prodname']);
             $GLOBALS['GiftCertificateAmount'] = CurrencyConvertFormatPrice($product['giftamount']);
             $GLOBALS['GiftCertificateTo'] = isc_html_escape($product['certificate']['to_name']);
             $GLOBALS["Quantity" . $product['quantity']] = 'selected="selected"';
             $GLOBALS['ProductPrice'] = CurrencyConvertFormatPrice($product['giftamount']);
             $GLOBALS['ProductTotal'] = CurrencyConvertFormatPrice($product['giftamount'] * $product['quantity']);
             $itemTotal += $product['giftamount'] * $product['quantity'];
             $GLOBALS['SNIPPETS']['CartItems'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CartItemGiftCertificate");
         } else {
             //					$GLOBALS['ProductLink'] = ProdLink($product['data']['prodname']);
             //                    echo $GLOBALS['ProductLink'];exit;
             if ($GLOBALS['EnableSEOUrls'] == 1) {
                 $symbol = '/';
                 $make = '';
                 $model = '';
                 $year = '';
                 if ($product['make'] != '' or $product['make'] != '' or $product['make'] != '') {
                     if ($product['make'] != '') {
                         $make = "make=" . MakeURLSafe($product['make']) . $symbol;
                     }
                     if ($product['model'] != '') {
                         $model = "model=" . MakeURLSafe($product['model']);
                     }
                     if ($product['year'] != '') {
                         $year = "year=" . $product['year'] . $symbol;
                     }
                     $GLOBALS['ProductLink'] = ProdLink($product['data']['prodname']) . $symbol . "refer=true" . $symbol . $year . $make . $model;
                 } else {
                     $GLOBALS['ProductLink'] = ProdLink($product['data']['prodname']);
                 }
             } else {
                 $symbol = '&';
                 $make = '';
                 $model = '';
                 $year = '';
                 if ($product['make'] != '' or $product['make'] != '' or $product['make'] != '') {
                     if ($product['make'] != '') {
                         $make = "make=" . MakeURLSafe($product['make']) . $symbol;
                     }
                     if ($product['model'] != '') {
                         $model = "model=" . MakeURLSafe($product['model']);
//.........這裏部分代碼省略.........
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:101,代碼來源:CartContent.php

示例14: GetYmmsForMiddleInPage

 public function GetYmmsForMiddleInPage()
 {
     $ymmtype = strtolower(MakeURLNormal(isset($_GET['ymmtype']) ? $_GET['ymmtype'] : ""));
     $year = strtolower(MakeURLNormal(isset($_GET['year']) ? $_GET['year'] : ""));
     $make = strtolower(MakeURLNormal(isset($_GET['make']) ? $_GET['make'] : ""));
     $model = strtolower(MakeURLNormal(isset($_GET['model']) ? $_GET['model'] : ""));
     $productId = isset($_GET['productId']) ? (int) $_GET['productId'] : 0;
     $isProductDetail = isset($_GET['isProductDetail']) ? (int) $_GET['isProductDetail'] : 0;
     $output = "";
     $array_str = $impvaritions = array();
     if ($productId) {
         $impvaritions = ISC_PRODUCT::GetImpVariationForYMM($productId, $ymmtype, $year, $make, $model);
     }
     foreach (array('make', 'model', 'year') as $column) {
         $array_str[$column] .= "<option value='' selected>--select {$column}--</option>";
         $ymms_array = $this->getResultArray($column, $year, $make, $model);
         if ($column == 'model' and empty($ymms_array)) {
             $ymms_array = $this->getResultArray($column, "", $make, $model);
         }
         //alandy_2012-2-16 add.unique model.
         if ($column == 'model' && !empty($ymms_array)) {
             $ymms_array = array_unique(array_map('strtoupper', $ymms_array));
         }
         foreach ($ymms_array as $value) {
             $selected = "";
             if (${$column} == strtolower($value)) {
                 $selected = "selected";
             }
             if (!empty($impvaritions) && !ISC_PRODUCT::CheckYMMUseVariation($value, $impvaritions, $column)) {
                 continue;
             }
             $array_str[$column] .= "<option value='" . MakeURLSafe(strtolower($value)) . "' {$selected}>{$value}</option>";
         }
         // KATE CHANGE: 2/29/2012
         //alandy_2012-2-20 add redirct option.
         if ($isProductDetail == 1) {
             $array_str[$column] .= "<option value=1>My " . ucwords($column) . " Not Showing Here</option>";
         }
     }
     if ($ymmtype == "make") {
         $output = $array_str['model'] . '~' . $array_str['year'];
     } elseif ($ymmtype == "year") {
         $output = $array_str['make'] . '~' . $array_str['model'];
     } elseif ($ymmtype == "model") {
         $output = $array_str['year'];
     } else {
     }
     return $output;
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:49,代碼來源:class.ymms.php

示例15: array

 $field = array();
 $query2 = "select qn.qid,qn.column_name  from isc_qualifier_associations qa join isc_qualifier_names qn  on qn.qid  = qa.qualifierid where categoryid = " . $categoryid . " ";
 $result2 = mysql_query($query2);
 while ($row2 = mysql_fetch_array($result2)) {
     if ($row2['column_name'] != "") {
         $pqvqlist .= "iv." . $row2['column_name'] . ",";
         $header .= ucfirst($row2['column_name']) . ",";
         $field[$row2['qid']] = $row2['column_name'];
     }
 }
 $header = "Start Year,End Year,Make,Model,Submodel, SKU,Price,Brand , Series , Category , Subcategory , Product URL ," . $header . " Bedsize Generalname, Cabsize Generalname \n";
 $query = " select p.prodname , iv.prodstartyear,iv.prodendyear,iv.prodmake,iv.prodmodel,iv.prodsubmodel," . $pqvqlist . " iv.bedsize_generalname, iv.cabsize_generalname,b.brandname,\niv.prodcode,pf.prodfinalprice,b.brandname , c.catname ,bs.seriesname\nfrom isc_products p \nleft join isc_product_finalprice pf on pf.productid = p.productid \nleft join isc_brands b on p.prodbrandid = b.brandid\nleft join isc_brand_series bs on bs.brandid = b.brandid\nleft join isc_categoryassociations ca on ca.productid = p.productid \nleft join isc_categories c on ca.categoryid = c.categoryid \nleft join isc_import_variations iv on iv.productid = p.productid \nwhere  " . $brandquery . " c.categoryid IN ({$subids})";
 $result = mysql_query($query);
 while ($row = mysql_fetch_array($result)) {
     $data .= $row['prodstartyear'] . "," . $row['prodendyear'] . "," . $row['prodmake'] . "," . $row['prodmodel'] . "," . $row['prodsubmodel'] . ",";
     $data .= $row['prodcode'] . "," . $row['prodfinalprice'] . "," . $row['brandname'] . "," . $row['seriesname'] . "," . $parentname . "," . $row['catname'] . " , " . $theurltype . MakeURLSafe($row['prodname']) . ".html, ";
     foreach ($field as $k => $v) {
         $query2 = "select displayname  from isc_qualifier_associations  where categoryid = " . $categoryid . " and qualifierid =  " . $k;
         $result2 = mysql_query($query2);
         $row2 = mysql_fetch_array($result2);
         $displayname = $row2['displayname'];
         if ($displayname == "" and $catparentid != 0) {
             $query2 = "select displayname  from isc_qualifier_associations  where categoryid = " . $catparentid . " and qualifierid =  " . $k;
             $result2 = mysql_query($query2);
             $row2 = mysql_fetch_array($result2);
             $displayname = $row2['displayname'];
         }
         if ($displayname == "") {
             $displayname = substr($row[$v], 0, 2) . strtolower(substr($row[$v], 2));
         }
         $data .= $displayname . ",";
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:31,代碼來源:writecsv.php


注:本文中的MakeURLSafe函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。