0) { $burst = $matches[0]; $terms = explode($burst,$keywords); $boolean = TRUE; $split = "AND"; } else if (preg_match("/\sOR\s/i",$keywords,$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$keywords); $boolean = TRUE; $split = "OR"; } else if (preg_match("/\sNOT\s/i",$keywords,$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$keywords); $boolean = TRUE; $split = "NOT"; } if ($boolean==TRUE&&$split=="OR") $query = "SELECT * FROM nash_auctions WHERE MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?$terms[0]." ":"").((trim($terms[1])!="")?$terms[1]." ":"").((trim($terms[2])!="")?$terms[2]." ":"").((trim($terms[3])!="")?$terms[3]." ":"").((trim($terms[4])!="")?$terms[4]." ":"").((trim($terms[5])!="")?$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="AND") $query = "SELECT * FROM nash_auctions WHERE MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"+".$terms[0]." ":"").((trim($terms[1])!="")?"+".$terms[1]." ":"").((trim($terms[2])!="")?"+".$terms[2]." ":"").((trim($terms[3])!="")?"+".$terms[3]." ":"").((trim($terms[4])!="")?"+".$terms[4]." ":"").((trim($terms[5])!="")?"+".$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="NOT") $query = "SELECT * FROM nash_auctions WHERE MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"-".$terms[0]." ":"").((trim($terms[1])!="")?"-".$terms[1]." ":"").((trim($terms[2])!="")?"-".$terms[2]." ":"").((trim($terms[3])!="")?"-".$terms[3]." ":"").((trim($terms[4])!="")?"-".$terms[4]." ":"").((trim($terms[5])!="")?"-".$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else $query = "SELECT * FROM nash_auctions WHERE MATCH(keywords) AGAINST ('".$keywords."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; } else if ($_REQUEST['exactany']=="exact"||$_REQUEST['exactany_hp']=="exact") { $query = "SELECT * FROM nash_auctions WHERE keywords LIKE '%".$keywords."%' AND deleted!='1' AND active='1' AND saveforlater='0'"; } $croot = $_REQUEST['category']; $cntr = 0; while ($croot>0) { $crw = getSqlRow("user","SELECT id,parent FROM nash_categories WHERE id='".$croot."'"); if ($cntr==0) { $catname = $c_lang[$crw['id']]; } else { if ($crw['parent']!=$croot) $catname = $c_lang[$crw['id']]." : ".$catname; } $cntr++; $croot = $crw['parent']; } $catname = trim($catname); if ($catname!=""&&$_REQUEST['category']>0) { while(list($cat_array_id,$cat_array_details) = each($cat_array)) { list($cat_array_name,$userid) = $cat_array_details; $strResult = strpos($cat_array_name,$catname); if (trim($strResult)=="0") $cat_id[$catcnt++] = $cat_array_id; } $all_subcats = implode(",",$cat_id); $query .= " AND (category IN (".$all_subcats.") OR addlcategory IN (".$all_subcats.")) "; } else { $query .= ""; } if (trim($_REQUEST['itemcurrency'])!="all"&&trim($_REQUEST['itemcurrency'])!="") $query .= " AND currency='".$_REQUEST['itemcurrency']."'"; if ($_REQUEST['idvitems']=="yes") $query .= " AND isverify='Y'"; if ($_REQUEST['nonidvitems']=="yes") $query .= " AND isverify='N'"; if ($_REQUEST['paypalonly']=="yes") $query .= " AND acceptdirectpayment=1"; if ($_REQUEST['nonpaypal']=="yes") $query .= " AND acceptdirectpayment=0"; if ($_REQUEST['freeshiponly']=="yes") $query .= " AND postage_costs=0 AND postage_costs_ww=0 AND postage_costs_ww_specific=0 AND postage_costs_ww_country=''"; if ($_REQUEST['bnonly']=="yes") $query .= " AND bn='Y'"; if ($_REQUEST['rponly']=="yes") $query .= " AND rp='Y'"; if ($_REQUEST['format']=="standardonly") $query .= " AND auctiontype='standard'"; if ($_REQUEST['format']=="dutchonly") $query .= " AND auctiontype='dutch'"; if ($_REQUEST['format']=="reverseonly") $query .= " AND auctiontype='reverse'"; if ($_REQUEST['format']=="reverseadvonly") $query .= " AND auctiontype='reverseadv'"; if ($_REQUEST['format']=="crazyonly") $query .= " AND auctiontype='standard' AND crazy_auctiontype='1'"; if ($_REQUEST['format']=="halfpriceonly") $query .= " AND auctiontype='halfprice'"; if ($_REQUEST['format']=="classifiedonly") $query .= " AND auctiontype='classified'"; if ($_REQUEST['dollaronly']=="yes") $query .= " AND bidstart<1.01"; if ($_REQUEST['results']==2) $query .= " AND".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'"); if ($_REQUEST['results']==3) $query .= " AND closed='1'"; if (trim($_REQUEST['country'])!="all"&&trim($_REQUEST['country'])!="") $query .= " AND country='".$_REQUEST['country']."'"; else if (trim($_REQUEST['country_hp'])!="all"&&trim($_REQUEST['country_hp'])!="") $query .= " AND country='".$_REQUEST['country_hp']."'"; if ($_REQUEST['listin']=="auction") $query .= " AND listin='auction'"; else if ($_REQUEST['listin']=="store") $query .= " AND listin='store'"; else if ($_REQUEST['listin']=="both") $query .= ""; if ($_REQUEST['region']!=0) $query .= " AND main_region='".$_REQUEST['region']."'"; if (trim($_REQUEST['itemCity'])!="") $query .= " AND itemCity LIKE '%".$_REQUEST['itemCity']."%'"; if (trim($_REQUEST['zip'])!="") $query .= " AND zip LIKE '%".$_REQUEST['zip']."%'"; if (trim($_REQUEST['minpirce'])!=""&&trim($_REQUEST['maxpirce'])!=""&&$_REQUEST['minpirce']<$_REQUEST['maxpirce']) $query .= " AND bidstart>'".($_REQUEST['minpirce']-0.01)."' AND bidstart<'".($_REQUEST['maxpirce']+0.01)."' AND maxbid<'".($_REQUEST['maxpirce']+0.01)."'"; if (!$_REQUEST['orderField']) { if ($_REQUEST['sortby']==1) { $orderField = "enddate"; $orderType = "ASC"; } if ($_REQUEST['sortby']==2) { $orderField = "startdate"; $orderType = "DESC"; } if ($_REQUEST['sortby']==3) { $orderField = "bidstart"; $orderType = "ASC"; }} } else if (isset($_REQUEST['usersearchok'])||$_REQUEST['advsrc']=="usersearch"||$_REQUEST['usersearchok']=="Search") { $advsrc = "usersearch"; if ($keywords!="") { $keywords = preg_replace(array('/\045/'),array('percent'),$keywords); $keywords = stripslashes($keywords); $keywords = trim($keywords); if ($setts['boolean_operator']=="AND") $keywords = preg_replace(array('/\s/'),array(' AND '),$keywords); else if ($setts['boolean_operator']=="OR") $keywords = preg_replace(array('/\s/'),array(' OR '),$keywords); else if ($setts['boolean_operator']=="NOT") $keywords = preg_replace(array('/\s/'),array(' NOT '),$keywords); } else { $keywords = ""; } if (preg_match("/\sAND\s/i",$keywords,$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$keywords); $boolean = TRUE; $split = "AND"; } else if (preg_match("/\sOR\s/i",$keywords,$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$keywords); $boolean = TRUE; $split = "OR"; } else if (preg_match("/\sNOT\s/i",$keywords,$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$keywords); $boolean = TRUE; $split = "NOT"; } if ($boolean==TRUE&&$split=="OR") $query = "SELECT DISTINCT auct.* FROM nash_users AS users, nash_auctions AS auct WHERE MATCH(users.username) AGAINST ('".((trim($terms[0])!="")?$terms[0]." ":"").((trim($terms[1])!="")?$terms[1]." ":"").((trim($terms[2])!="")?$terms[2]." ":"").((trim($terms[3])!="")?$terms[3]." ":"").((trim($terms[4])!="")?$terms[4]." ":"").((trim($terms[5])!="")?$terms[5]:"")."' IN BOOLEAN MODE) AND users.id=auct.ownerid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0'"; else if ($boolean==TRUE&&$split=="AND") $query = "SELECT DISTINCT auct.* FROM nash_users AS users, nash_auctions AS auct WHERE MATCH(users.username) AGAINST ('".((trim($terms[0])!="")?"+".$terms[0]." ":"").((trim($terms[1])!="")?"+".$terms[1]." ":"").((trim($terms[2])!="")?"+".$terms[2]." ":"").((trim($terms[3])!="")?"+".$terms[3]." ":"").((trim($terms[4])!="")?"+".$terms[4]." ":"").((trim($terms[5])!="")?"+".$terms[5]:"")."' IN BOOLEAN MODE) AND users.id=auct.ownerid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0'"; else if ($boolean==TRUE&&$split=="NOT") $query = "SELECT DISTINCT auct.* FROM nash_users AS users, nash_auctions AS auct WHERE MATCH(users.username) AGAINST ('".((trim($terms[0])!="")?"-".$terms[0]." ":"").((trim($terms[1])!="")?"-".$terms[1]." ":"").((trim($terms[2])!="")?"-".$terms[2]." ":"").((trim($terms[3])!="")?"-".$terms[3]." ":"").((trim($terms[4])!="")?"-".$terms[4]." ":"").((trim($terms[5])!="")?"-".$terms[5]:"")."' IN BOOLEAN MODE) AND users.id=auct.ownerid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0'"; else $query = "SELECT DISTINCT auct.* FROM nash_users AS users, nash_auctions AS auct WHERE users.username='".$keywords."' AND users.id=auct.ownerid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0'"; if ($_REQUEST['idvsonly']=="yes") $query .= " AND users.istrialseller='N'"; if ($_REQUEST['tsonly']=="yes") $query .= " AND users.istrialseller='Y'"; if ($_REQUEST['results']==2) $query .= " AND".(($setts['enable_start_on_first_bid']==1)?" ((auct.closed=1 AND auct.is_start_on_first_bid=1) OR auct.closed=0)":" auct.closed=0").""; if ($_REQUEST['results']==3) $query .= " AND auct.closed=1"; if (!$_REQUEST['orderField']) { if ($_REQUEST['sortby']==1) { $orderField = "auct.enddate"; $orderType = "ASC"; } if ($_REQUEST['sortby']==2) { $orderField = "auct.startdate"; $orderType = "DESC"; } if ($_REQUEST['sortby']==3) { $orderField = "auct.bidstart"; $orderType = "ASC"; }} } else if (isset($_REQUEST['itemsearchokX'])||trim($_REQUEST['satitle'])!=""||$_REQUEST['advsrc']=="satitle") { $advsrc = "satitle"; $croot = $_REQUEST['category']; $cntr = 0; while ($croot>0) { $crw = getSqlRow("user","SELECT id,parent FROM nash_categories WHERE id='".$croot."'"); if ($cntr==0) { $catname = $c_lang[$crw['id']]; } else { if ($crw['parent']!=$croot) $catname = $c_lang[$crw['id']]." : ".$catname; } $cntr++; $croot = $crw['parent']; } $catname = trim($catname); if ($catname!="") { while(list($cat_array_id,$cat_array_details) = each($cat_array)) { list($cat_array_name,$userid) = $cat_array_details; $strResult = strpos($cat_array_name,$catname); if (trim($strResult)=="0") $cat_id[$catcnt++] = $cat_array_id; } $all_subcats = implode(",",$cat_id); $subcatquery = "AND (category IN (".$all_subcats.") OR addlcategory IN (".$all_subcats.")) "; } else { $subcatquery = ""; } if ($_REQUEST['category']>0) { if ($_REQUEST['exactany_hp']=="any"||$_REQUEST['exactany']=="any") { if ($_REQUEST['satitle']!="") { $_REQUEST['satitle'] = preg_replace(array('/\045/'),array('percent'),$_REQUEST['satitle']); $_REQUEST['satitle'] = trim($_REQUEST['satitle']); $_REQUEST['satitle'] = stripslashes($_REQUEST['satitle']); if ($setts['boolean_operator']=="AND") $_REQUEST['satitle'] = preg_replace(array('/\s/'),array(' AND '),$_REQUEST['satitle']); else if ($setts['boolean_operator']=="OR") $_REQUEST['satitle'] = preg_replace(array('/\s/'),array(' OR '),$_REQUEST['satitle']); else if ($setts['boolean_operator']=="NOT") $_REQUEST['satitle'] = preg_replace(array('/\s/'),array(' NOT '),$_REQUEST['satitle']); } else { $_REQUEST['satitle'] = ""; } if (preg_match("/\sAND\s/i",$_REQUEST['satitle'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['satitle']); $boolean = TRUE; $split = "AND"; } else if (preg_match("/\sOR\s/i",$_REQUEST['satitle'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['satitle']); $boolean = TRUE; $split = "OR"; } else if (preg_match("/\sNOT\s/i",$_REQUEST['satitle'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['satitle']); $boolean = TRUE; $split = "NOT"; } if ($boolean==TRUE&&$split=="OR") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?$terms[0]." ":"").((trim($terms[1])!="")?$terms[1]." ":"").((trim($terms[2])!="")?$terms[2]." ":"").((trim($terms[3])!="")?$terms[3]." ":"").((trim($terms[4])!="")?$terms[4]." ":"").((trim($terms[5])!="")?$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="AND") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"+".$terms[0]." ":"").((trim($terms[1])!="")?"+".$terms[1]." ":"").((trim($terms[2])!="")?"+".$terms[2]." ":"").((trim($terms[3])!="")?"+".$terms[3]." ":"").((trim($terms[4])!="")?"+".$terms[4]." ":"").((trim($terms[5])!="")?"+".$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="NOT") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"-".$terms[0]." ":"").((trim($terms[1])!="")?"-".$terms[1]." ":"").((trim($terms[2])!="")?"-".$terms[2]." ":"").((trim($terms[3])!="")?"-".$terms[3]." ":"").((trim($terms[4])!="")?"-".$terms[4]." ":"").((trim($terms[5])!="")?"-".$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".$_REQUEST['satitle']."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; } else if ($_REQUEST['exactany_hp']=="exact") { $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND keywords LIKE '%".trim($_REQUEST['satitle'])."%' ".$subcatquery." AND deleted!='1' AND active='1' AND saveforlater='0'"; } } else { if ($_REQUEST['exactany_hp']=="any"||$_REQUEST['exactany']=="any") { if (trim($_REQUEST['satitle'])!="") { $_REQUEST['satitle'] = preg_replace(array('/\045/'),array('percent'),$_REQUEST['satitle']); $_REQUEST['satitle'] = trim($_REQUEST['satitle']); $_REQUEST['satitle'] = stripslashes($_REQUEST['satitle']); if ($setts['boolean_operator']=="AND") $_REQUEST['satitle'] = preg_replace(array('/\s/'),array(' AND '),$_REQUEST['satitle']); else if ($setts['boolean_operator']=="OR") $_REQUEST['satitle'] = preg_replace(array('/\s/'),array(' OR '),$_REQUEST['satitle']); else if ($setts['boolean_operator']=="NOT") $_REQUEST['satitle'] = preg_replace(array('/\s/'),array(' NOT '),$_REQUEST['satitle']); } else { $_REQUEST['satitle'] = ""; } if (preg_match("/\sAND\s/i",$_REQUEST['satitle'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['satitle']); $boolean = TRUE; $split = "AND"; } else if (preg_match("/\sOR\s/i",$_REQUEST['satitle'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['satitle']); $boolean = TRUE; $split = "OR"; } else if (preg_match("/\sNOT\s/i",$_REQUEST['satitle'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['satitle']); $boolean = TRUE; $split = "NOT"; } if ($boolean==TRUE&&$split=="OR") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?$terms[0]." ":"").((trim($terms[1])!="")?$terms[1]." ":"").((trim($terms[2])!="")?$terms[2]." ":"").((trim($terms[3])!="")?$terms[3]." ":"").((trim($terms[4])!="")?$terms[4]." ":"").((trim($terms[5])!="")?$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="AND") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"+".$terms[0]." ":"").((trim($terms[1])!="")?"+".$terms[1]." ":"").((trim($terms[2])!="")?"+".$terms[2]." ":"").((trim($terms[3])!="")?"+".$terms[3]." ":"").((trim($terms[4])!="")?"+".$terms[4]." ":"").((trim($terms[5])!="")?"+".$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="NOT") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"-".$terms[0]." ":"").((trim($terms[1])!="")?"-".$terms[1]." ":"").((trim($terms[2])!="")?"-".$terms[2]." ":"").((trim($terms[3])!="")?"-".$terms[3]." ":"").((trim($terms[4])!="")?"-".$terms[4]." ":"").((trim($terms[5])!="")?"-".$terms[5]:"")."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; else $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".$_REQUEST['satitle']."' IN BOOLEAN MODE) AND deleted!='1' AND active='1' AND saveforlater='0'"; } else if ($_REQUEST['exactany_hp']=="exact") { $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND keywords LIKE '%".trim($_REQUEST['satitle'])."%' AND deleted!='1' AND active='1' AND saveforlater='0'"; }} if (trim($_REQUEST['country_hp'])!="all"&&trim($_REQUEST['country_hp'])!="") $query .= " AND country='".$_REQUEST['country_hp']."'"; } else if (isset($_REQUEST['buyersearchok'])||$_REQUEST['advsrc']=="buyersearch") { $advsrc = "buyersearch"; if ($_REQUEST['username']!="") { $_REQUEST['username'] = preg_replace(array('/\045/'),array('percent'),$_REQUEST['username']); $_REQUEST['username'] = trim($_REQUEST['username']); $_REQUEST['username'] = stripslashes($_REQUEST['username']); if ($setts['boolean_operator']=="AND") $_REQUEST['username'] = preg_replace(array('/\s/'),array(' AND '),$_REQUEST['username']); else if ($setts['boolean_operator']=="OR") $_REQUEST['username'] = preg_replace(array('/\s/'),array(' OR '),$_REQUEST['username']); else if ($setts['boolean_operator']=="NOT") $_REQUEST['username'] = preg_replace(array('/\s/'),array(' NOT '),$_REQUEST['username']); } else { $_REQUEST['username'] = ""; } if (preg_match("/\sAND\s/i",$_REQUEST['username'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['username']); $boolean = TRUE; $split = "AND"; } else if (preg_match("/\sOR\s/i",$_REQUEST['username'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['username']); $boolean = TRUE; $split = "OR"; } else if (preg_match("/\sNOT\s/i",$_REQUEST['username'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['username']); $boolean = TRUE; $split = "NOT"; } if ($boolean==TRUE&&$split=="OR") $query = "SELECT auct.* FROM nash_users AS users, nash_auctions AS auct, nash_bids AS bid WHERE".(($setts['enable_start_on_first_bid']==1)?" ((auct.closed=1 AND auct.is_start_on_first_bid=1) OR auct.closed=0)":" auct.closed=0")." AND MATCH(users.username) AGAINST ('".((trim($terms[0])!="")?$terms[0]." ":"").((trim($terms[1])!="")?$terms[1]." ":"").((trim($terms[2])!="")?$terms[2]." ":"").((trim($terms[3])!="")?$terms[3]." ":"").((trim($terms[4])!="")?$terms[4]." ":"").((trim($terms[5])!="")?$terms[5]:"")."' IN BOOLEAN MODE) AND users.id=bid.bidderid AND auct.id=bid.auctionid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0' "; else if ($boolean==TRUE&&$split=="AND") $query = "SELECT auct.* FROM nash_users AS users, nash_auctions AS auct, nash_bids AS bid WHERE".(($setts['enable_start_on_first_bid']==1)?" ((auct.closed=1 AND auct.is_start_on_first_bid=1) OR auct.closed=0)":" auct.closed=0")." AND MATCH(users.username) AGAINST ('".((trim($terms[0])!="")?"+".$terms[0]." ":"").((trim($terms[1])!="")?"+".$terms[1]." ":"").((trim($terms[2])!="")?"+".$terms[2]." ":"").((trim($terms[3])!="")?"+".$terms[3]." ":"").((trim($terms[4])!="")?"+".$terms[4]." ":"").((trim($terms[5])!="")?"+".$terms[5]:"")."' IN BOOLEAN MODE) AND users.id=bid.bidderid AND auct.id=bid.auctionid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0' "; else if ($boolean==TRUE&&$split=="NOT") $query = "SELECT auct.* FROM nash_users AS users, nash_auctions AS auct, nash_bids AS bid WHERE".(($setts['enable_start_on_first_bid']==1)?" ((auct.closed=1 AND auct.is_start_on_first_bid=1) OR auct.closed=0)":" auct.closed=0")." AND MATCH(users.username) AGAINST ('".((trim($terms[0])!="")?"-".$terms[0]." ":"").((trim($terms[1])!="")?"-".$terms[1]." ":"").((trim($terms[2])!="")?"-".$terms[2]." ":"").((trim($terms[3])!="")?"-".$terms[3]." ":"").((trim($terms[4])!="")?"-".$terms[4]." ":"").((trim($terms[5])!="")?"-".$terms[5]:"")."' IN BOOLEAN MODE) AND users.id=bid.bidderid AND auct.id=bid.auctionid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0' "; else $query = "SELECT auct.* FROM nash_users AS users, nash_auctions AS auct, nash_bids AS bid WHERE".(($setts['enable_start_on_first_bid']==1)?" ((auct.closed=1 AND auct.is_start_on_first_bid=1) OR auct.closed=0)":" auct.closed=0")." AND MATCH(users.username) AGAINST ('".$_REQUEST['username']."' IN BOOLEAN MODE) AND users.id=bid.bidderid AND auct.id=bid.auctionid AND auct.deleted!=1 AND auct.active=1 AND auct.saveforlater='0' "; } else if ($setts['is_bsas']==1&&(isset($_REQUEST['alexaranksearchok'])||$_REQUEST['advsrc']=="alexaranksearch")&&$_REQUEST['asearch']=="1"&&(trim($_REQUEST['minalexarank'])!=""||trim($_REQUEST['maxalexarank'])!="")) { $advsrc = "alexaranksearch"; $_REQUEST['minalexarank'] = (int)$_REQUEST['minalexarank']; $_REQUEST['maxalexarank'] = (int)$_REQUEST['maxalexarank']; if ($_REQUEST['minalexarank']>$_REQUEST['maxalexarank']) $_REQUEST['maxalexarank'] = $_REQUEST['minalexarank']; $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND deleted!='1' AND active='1' AND (bsas_alexa_pr>'".$_REQUEST['minalexarank']."' OR bsas_alexa_pr='".$_REQUEST['minalexarank']."') AND (bsas_alexa_pr<'".$_REQUEST['maxalexarank']."' OR bsas_alexa_pr='".$_REQUEST['maxalexarank']."') AND saveforlater='0' "; if ($_REQUEST['googlepr']!="") { $_REQUEST['googlepr'] = (int)$_REQUEST['googlepr']; $query .= "AND bsas_google_pr='".$_REQUEST['googlepr']."' "; } } else { if ($_REQUEST['exactany']=="any") { if ($_REQUEST['basicsearch']!="") { $_REQUEST['basicsearch'] = preg_replace(array('/\045/'),array('percent'),$_REQUEST['basicsearch']); $_REQUEST['basicsearch'] = trim($_REQUEST['basicsearch']); $_REQUEST['basicsearch'] = stripslashes($_REQUEST['basicsearch']); if ($setts['boolean_operator']=="AND") $_REQUEST['basicsearch'] = preg_replace(array('/\s/'),array(' AND '),$_REQUEST['basicsearch']); else if ($setts['boolean_operator']=="OR") $_REQUEST['basicsearch'] = preg_replace(array('/\s/'),array(' OR '),$_REQUEST['basicsearch']); else if ($setts['boolean_operator']=="NOT") $_REQUEST['basicsearch'] = preg_replace(array('/\s/'),array(' NOT '),$_REQUEST['basicsearch']); } else { $_REQUEST['basicsearch'] = ""; } if (preg_match("/\sAND\s/i",$_REQUEST['basicsearch'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['basicsearch']); $boolean = TRUE; $split = "AND"; } else if (preg_match("/\sOR\s/i",$_REQUEST['basicsearch'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['basicsearch']); $boolean = TRUE; $split = "OR"; } else if (preg_match("/\sNOT\s/i",$_REQUEST['basicsearch'],$matches)>0) { $burst = $matches[0]; $terms = explode($burst,$_REQUEST['basicsearch']); $boolean = TRUE; $split = "NOT"; } if ($boolean==TRUE&&$split=="OR") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?$terms[0]." ":"").((trim($terms[1])!="")?$terms[1]." ":"").((trim($terms[2])!="")?$terms[2]." ":"").((trim($terms[3])!="")?$terms[3]." ":"").((trim($terms[4])!="")?$terms[4]." ":"").((trim($terms[5])!="")?$terms[5]:"")."' IN BOOLEAN MODE) AND active='1' AND deleted!='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="AND") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"+".$terms[0]." ":"").((trim($terms[1])!="")?"+".$terms[1]." ":"").((trim($terms[2])!="")?"+".$terms[2]." ":"").((trim($terms[3])!="")?"+".$terms[3]." ":"").((trim($terms[4])!="")?"+".$terms[4]." ":"").((trim($terms[5])!="")?"+".$terms[5]:"")."' IN BOOLEAN MODE) AND active='1' AND deleted!='1' AND saveforlater='0'"; else if ($boolean==TRUE&&$split=="NOT") $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".((trim($terms[0])!="")?"-".$terms[0]." ":"").((trim($terms[1])!="")?"-".$terms[1]." ":"").((trim($terms[2])!="")?"-".$terms[2]." ":"").((trim($terms[3])!="")?"-".$terms[3]." ":"").((trim($terms[4])!="")?"-".$terms[4]." ":"").((trim($terms[5])!="")?"-".$terms[5]:"")."' IN BOOLEAN MODE) AND active='1' AND deleted!='1' AND saveforlater='0'"; else $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND MATCH(keywords) AGAINST ('".$_REQUEST['basicsearch']."' IN BOOLEAN MODE) AND active='1' AND deleted!='1' AND saveforlater='0'"; } else { $query = "SELECT * FROM nash_auctions WHERE".(($setts['enable_start_on_first_bid']==1)?" ((closed='1' AND is_start_on_first_bid='1') OR closed='0')":" closed='0'")." AND keywords LIKE '%".trim($_REQUEST['basicsearch'])."%' AND active='1' AND deleted!='1' AND saveforlater='0'"; }} $additionalVars = "&basicsearch=".$_REQUEST['basicsearch']."&satitle=".trim($_REQUEST['satitle'])."&category=".$_REQUEST['category']."&advsrc=".$advsrc."&results=".$_REQUEST['results']."&sortby=".$_REQUEST['sortby']."&keywords=".$keywords."&country=".$_REQUEST['country']."&country_hp=".$_REQUEST['country_hp']."&bnonly=".$_REQUEST['bnonly']."&rponly=".$_REQUEST['rponly']."&dollaronly=".$_REQUEST['dollaronly']."®ion=".$_REQUEST['region']."&dutchonly=".$_REQUEST['dutchonly']."&paypalonly=".$_REQUEST['paypalonly']."&idvonly=".$_REQUEST['idvonly']."&tsonly=".$_REQUEST['tsonly']."&username=".$_REQUEST['username']."&listin=".$_REQUEST['listin']."&itemcurrency=".$_REQUEST['itemcurrency']."&exactany=".$_REQUEST['exactany']."&exactany_hp=".$_REQUEST['exactany_hp']; $limit = ((int)$_REQUEST['limit']==0)?((!$s_nb_items_per_page)?$setts['nbRecordsPerLoad']:$s_nb_items_per_page):(int)$_REQUEST['limit']; $curPageNumber = ((int)$_REQUEST['curPageNumber']==0)?1:(int)$_REQUEST['curPageNumber']; $start = ((int)$_REQUEST['curPageNumber']==0)?(int)$_REQUEST['start']:(($curPageNumber-1)*$limit); $totalResults = getSqlNumber("user",$query." ORDER BY ".$orderField." ".$orderType); $resultsQuery = getSqlResults("user",$query." ORDER BY ".$orderField." ".$orderType." LIMIT ".$start.",".$limit); if ($keywords!=""&&$totalResults>0) { $keywords = preg_replace(array('/ AND /','/ OR /','/ NOT /'),array(' ',' ',' '),$keywords); $insRSIK = addSqlRow("user","INSERT INTO nash_searchitemkeywords (keyword,counter,date,ip) VALUES ('".$keywords."','".$totalResults."','".$currentTimeOffset."','".getenv("REMOTE_ADDR")."')"); } if ($keywords!=""&&$totalResults==0) $delRSIK = removeSqlRow("user","DELETE FROM nash_searchitemkeywords WHERE keyword='".$keywords."'"); if (trim($_REQUEST['satitle'])!=""&&$totalResults>0) { $_REQUEST['satitle'] = preg_replace(array('/ AND /','/ OR /','/ NOT /'),array(' ',' ',' '),$_REQUEST['satitle']); $insRSIK = addSqlRow("user","INSERT INTO nash_searchitemkeywords (keyword,counter,date,ip) VALUES ('".trim($_REQUEST['satitle'])."','".$totalResults."','".$currentTimeOffset."','".getenv("REMOTE_ADDR")."')"); } if (trim($_REQUEST['satitle'])!=""&&$totalResults==0) $delRSIK = removeSqlRow("user","DELETE FROM nash_searchitemkeywords WHERE keyword='".trim($_REQUEST['satitle'])."'"); if (trim($_REQUEST['basicsearch'])!=""&&$totalResults>0) { $_REQUEST['basicsearch'] = preg_replace(array('/ AND /','/ OR /','/ NOT /'),array(' ',' ',' '),$_REQUEST['basicsearch']); $insRSIK = addSqlRow("user","INSERT INTO nash_searchitemkeywords (keyword,counter,date,ip) VALUES ('".trim($_REQUEST['basicsearch'])."','".$totalResults."','".$currentTimeOffset."','".getenv("REMOTE_ADDR")."')"); } if ($keywords!="") searchdump($keywords,date("m/d/Y h:i:s A",$currentTimeOffset),getenv("REMOTE_ADDR"),(($s_memberusern)?$s_memberusern:"--"),$totalResults); if (trim($_REQUEST['satitle'])!="") searchdump(trim($_REQUEST['satitle']),date("m/d/Y h:i:s A",$currentTimeOffset),getenv("REMOTE_ADDR"),(($s_memberusern)?$s_memberusern:"--"),$totalResults); if (trim($_REQUEST['basicsearch'])!="") searchdump(trim($_REQUEST['basicsearch']),date("m/d/Y h:i:s A",$currentTimeOffset),getenv("REMOTE_ADDR"),(($s_memberusern)?$s_memberusern:"--"),$totalResults); if (trim($_REQUEST['basicsearch'])!=""&&$totalResults==0) $delRSIK = removeSqlRow("user","DELETE FROM nash_searchitemkeywords WHERE keyword='".trim($_REQUEST['basicsearch'])."'"); if ($totalResults==0&&($_REQUEST['asearch']==1||$_REQUEST['bsearch']==1||$_REQUEST['csearch']==1)) { if (trim($_REQUEST['basicsearch'])!="") $keywords = trim($_REQUEST['basicsearch']); if ($keywords=="") $keywords = "--"; echo "

".$lang['nash4786'].": ".$keywords."

"; $link = processLink('buy'); echo ""; } else { if ($totalResults>0) { ?>