session_start(); /* if(isset($securepage) && $_SERVER['SERVER_PORT'] != 443) { header("HTTP/1.1 301 Moved Permanently"); header("Location: https://www.mjdtools.com".$_SERVER['REQUEST_URI']); exit(); }elseif(empty($securepage) && $_SERVER['SERVER_PORT'] != 80){ header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.mjdtools.com".$_SERVER['REQUEST_URI']); exit(); } if ($_SERVER['HTTP_HOST']!="www.mjdtools.com"){ if ($_SERVER['SERVER_PORT']== 443){ header("Location: https://www.mjdtools.com".$_SERVER['REQUEST_URI']); }else{ header("Location: http://www.mjdtools.com".$_SERVER['REQUEST_URI']); } } */ $_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI']; require 'includes/Connection.php'; $sid = session_id(); SetCartDB(); $SQL = "SELECT NAUCT_CODE FROM bids WHERE theSessionID='".$sid."' AND oid=''"; //select the home section $Bids = mysql_db_query($cartdbname, $SQL) or die("Failed Query of " . $SQL); //do the query $BCount = mysql_numrows($Bids); SetToolsDB(); if(isset($_GET["item"])){ $SQL = "SELECT NAUCT_CODE FROM auction WHERE NTL_IDNO=".$_GET["item"]." ORDER BY NAUCT_CODE,AUCT_NUMB;"; //select the home section $CheckAuctCode = mysql_db_query($dbname, $SQL) or die("Failed Query of " . $SQL); //do the query $_SESSION['AuctionCode']=mysql_result($CheckAuctCode,0,"NAUCT_CODE"); }elseif(isset($_GET['setAuction'])){ $_SESSION['AuctionCode']=$_GET['setAuction']; }elseif(!isset($_SESSION['AuctionCode']) && $_GET['Page']!="change"){ ?> //header( 'Location: CDBrowse.php?Page=change' ) ; } if (is_array($_POST["cat"])){ $_SESSION['cat'] = $_POST["cat"]; // store session data }elseif (strlen($_GET["Search"])>0){ $_SESSION['Search'] = $_GET["Search"]; } ?>