rootTpl = 'buildYourOwnRing.tpl'; $html->display(); exit(); } if (!(($_GET['section'] == "account") and in_array($_GET['task'], array('login', 'logout', 'registration')))){ if(!(strpos($_SERVER['QUERY_STRING'],"mini=1"))) $_SESSION['linkAfterLogin'] = MAIN_URL . ((!empty($_SERVER['QUERY_STRING'])) ? "?" .$_SERVER['QUERY_STRING'] : "" );} if ($_GET['section'] == 'account' and $_GET['task'] == 'logout') { unset ($_SESSION['userId']); unset ($_SESSION['shoppingCart']); //urlRedirect((!empty($_SESSION['linkAfterLogin']) ? $_SESSION['linkAfterLogin'] : MAIN_URL)); urlRedirect(MAIN_URL); } //if ($_POST['xajax']) require_once "postconfig.xajax.php"; if (isset($_GET['page'])) $_GET['section'] = 'pages'; if (isset($_GET['section']) and isset($_sections[$_GET['section']])) { $moduleName = $_sections[$_GET['section']]['module']; } else { $moduleName = $_GET['section']; } if (!empty($moduleName)) { $sectionModuleFile = ''; $sectionFileFound = false; if ($moduleName != false) { $sectionModulePath = DIR_MODULES . $_modules[$moduleName]['folder']. DS; if (is_file($sectionModulePath . "index.php")) { $tplName = $_GET['section']. ".tpl"; include($sectionModulePath . "index.php"); } elseif($_GET['section'] == 'error') { $_GET['section'] = -1; $tplName = 'errorPage.tpl'; } elseif ($_GET['section'] == 'giftCard') { /** * special section. should display it's own tpl */ $tplName = 'giftcard.tpl'; $customcss="withBG"; $smarty->assign('purpose','giftCard'); $smarty->assign('purposeTitle','Gift Card'); $smarty->assign('customcss',$customcss); } elseif ($_GET['section'] == 'designyourown') { /** * special section. should display it's own tpl */ $tplName = 'designyourown.tpl'; $customcss="withBG"; $smarty->assign('purpose','giftCard'); $smarty->assign('purposeTitle','Gift Card'); $smarty->assign('customcss',$customcss); $hideLeftSideBlock = true; $hideRightSideBlock = true; } else { $_GET['section'] = 'home'; $tplName = 'home.tpl'; } } unset($sectionFileFound); unset($sectionModuleFile); } else { $query="select videos1 FROM `featuredHome`"; $dbResult = mysql_query($query) ;//or dieEx(mysql_error()); if (mysql_num_rows($dbResult)>0) { while($dbArray = mysql_fetch_assoc($dbResult)) $dataTempArray[] = $dbArray ; } $smarty->assign('indexFlash',$dataTempArray); $_GET['section'] = 'home'; $tplName = 'home.tpl'; include "home.php"; } $smarty->assign('hideG',0); if(($_GET['task']=='searchResults')&&empty($_GET['group'])) $smarty->assign('hideG',1); $hideLeftSideBlock = true; $hideRightSideBlock = true; $hidep = true; if($_GET['task'] == 'details'){ $hidep = false; } if($_GET['section'] == 'shoppingCart'){ $hidep = false; } if($_GET['section'] == 'wishlist'){ $hidep = false; } if(isset($_GET['frame'])&&$_GET['frame']==0){ $hidep = true; } if($_GET['mini']==1){ $smarty->assign('mini',1); $hidep=false; } $smarty->assign('hidep', $hidep); include "pages.php"; if(($_GET['section'])=='jewelry'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(($_GET['section'])=='designCollection'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(($_GET['section'])=='timePieces'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(($_GET['section'])=='designer'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(($_GET['section'])=='bridal'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(($_GET['section'])=='featuredgallery'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(($_GET['section'])=='gifts'){ $hideLeftSideBlock = true; if(isset($_GET['group'])) $hideLeftSideBlock = false; else if(($_GET['task'])=='searchResults') $hideLeftSideBlock = false; } if(isset($_GET['frame'])){ $hideLeftSideBlock = true; } if ($moduleName != false) { if (in_array($moduleName, array("diamonds"))) { $hideLeftSideBlock = true; $hideRightSideBlock = true; } } if(($_GET['section'] == 'contactUs')&&($_GET['purpose']=="sales")){ $smarty->assign('purpose',$_GET['purpose']); $smarty->assign('purposeTitle','Sales and Events'); $tplName = 'salesandevents.tpl';} if (!$hideLeftSideBlock) include "leftSide.php"; if (!$hideRightSideBlock) include "rightSide.php"; $smarty->assign('hideLeftSideBlock', $hideLeftSideBlock); $smarty->assign('hideRightSideBlock', $hideRightSideBlock); $smarty->assign('tisserImage',IMG_TEASER); $smarty->assign('section',$_GET['section']); $smarty->assign('task',$_GET['task']); $smarty->assign('userId',$_SESSION["userId"]); $smarty->assign('tplName',$tplName); //if ($tplName == 'home.tpl') $html->addBodyAttributes('id="homeBody"'); //$time_end = microtime(true); //$time = $time_end - $time_start; //$mainOut .= "executed on server in " .$time. " seconds
"; //$mainOut .= "current memory fill: " .number_format((memory_get_usage()/1024), 2, ",", " "). " Kb"; $html->display(); if($_SERVER['REMOTE_ADDR'] == '82.117.197.142'){ //echo 'Load in ' . (microtime(true) - $start) . ' seconds.'; } exit(0); ?>