0){ include('404.php'); exit(); } $PageName = substr($PageName,strrpos($PageName,"/")+1); $QS = ""; if (strpos($PageName,"?")!==false){ $QS = substr($PageName,strpos($PageName,"?")+1); $Var = ""; $QS = explode("&",$QS); for($U=0;$U < count($QS);$U++){ if ($QS[$U]!="" and strpos($QS[$U],"=") > 0){ $SP = explode("=",$QS[$U]); $Var .= "$".$SP[0]." = \"".urldecode($SP[1])."\";\r\n"; } } if ($Var!="") eval($Var); $PageName = substr($PageName,0,strpos($PageName,"?")); //------ Remove Query String } //if(strpos($PageName,".")!==false) $PageName = substr($PageName,0,strrpos($PageName,".")); //------- Remove Extension //--------------------------------------------------------- $U = parse_url(@$_SERVER['HTTP_REFERER']); if (@$_SERVER['HTTP_REFERER']!="" and @$U['host']!="bestcustomtuxedo.com" and @$U['host']!="www.bestcustomtuxedo.com" and @$U['host']!=$_SERVER['HTTP_HOST']){ $Q = explode("&",$U['query']); $Ar = array(); for ($Ii=0; $Ii < count($Q);$Ii++){ $SP = explode("=",$Q[$Ii]); $Ar[$SP[0]] = urldecode($SP[1]); } $Keyword = ""; $Domain = $U['host']; if (@$_GET["Froogle"]!="") $Domain = 'Froogle'; $KwList = array("p","q","s","ovkey","keyword","key","query","qry","keywords","mt","ovraw","as_q","aqp","as_epq","ask","general","qkw","searchfor","search","str","term","websearch.field-keywords"); for ($Ii=0;$Ii < count($KwList);$Ii++){ if (isset($Ar[$KwList[$Ii]])){ $Keyword = $Ar[$KwList[$Ii]]; break; } } if ($Keyword!=""){ $url = urldecode($_SERVER['HTTP_REFERER']); $_SESSION['URL'] = $url; $_SESSION['Keyword'] = $Keyword; $_SESSION['Domain'] = $Domain; setcookie("URL",$url); setcookie("Keyword",$Keyword); setcookie("Domain",$Domain); } } //--------------------------------------------------------- if (!isset($Conn)) require('common/ConnMySQL.php'); $CID = 0; $Page = "ListCat.php"; $BeardCrumb = "Home"; $Title = "Best Formal Wear"; $MetaKeywords = "Ties for Men, Neck Ties, Men's Designer Ties, Mens Dress Ties"; $MetaDesc = "Giorgenti Offers a Great Selection of Beautiful Designer Ties in Regular and Extra Long Lengths."; if ($PageName=="Tuxedo-Accessories.php"){ $BeardCrumb .= " -> Tuxedo Accessories"; } else { $CategoryRs = mysqli_query($Conn,"SELECT * from Category Where URL Like '%".$PageName."%'"); if ($Category = mysqli_fetch_assoc($CategoryRs)){ $CID = $Category['ID']; $Title = $Category['Title']; $MetaKeywords = $Category['MetaKeywords']; $MetaDesc = $Category['MetaDescription']; $BeardCrumb .= " -> ".$Category['Name']; $Page = "List.php"; } else { $DocRs = mysqli_query($Conn,"SELECT * from Documents Where LinkText Like '%".$PageName."%'"); if ($Category = mysqli_fetch_assoc($DocRs)){ $ID = $Category['ID']; $CID = $Category['CategoryID']; $Title = $Category['PageTitle']; $MetaKeywords = $Category['MetaKeywords']; $MetaDesc = $Category['MetaDescription']; $BeardCrumb .= " -> Tuxedo Library"; $Page = "Tie-Library.php"; } else { $Page = "404.php"; } mysqli_free_result($DocRs); } mysqli_free_result($CategoryRs); } include($Page); ?>