require_once ("../common/includes/settings.php"); require_once("config.php"); require_once($GLOBAL_ABSOLUTE_PATH."/merchant/classes/classes.php"); require_once($GLOBAL_ABSOLUTE_PATH."/merchant/functions/func_merchants.php"); require_once($GLOBAL_ABSOLUTE_PATH."/items/classes/tieins.class.php"); require_once($GLOBAL_ABSOLUTE_PATH."/items/classes/distrib_tie.class.php"); require_once($GLOBAL_ABSOLUTE_PATH."/items/classes/brand.class.php"); $bgcolour_toggle = 0; $serial = 1; $gotFeatured = false; if($country == "") { $country = "SG"; } else { // country is there, check for validity if ($country != "SG" && $country != "MY") { $country = "SG"; } } $today = date("Y-m-d")." 00:00:00"; // get all paid merchants distributor $sql = "SELECT bs.sid, bs.shopname, m.merchantid, pm.bid, br.brand_name, br.brand_image, m.brand_protection FROM bikeshops_sg AS bs, merchants AS m, product_merchant_ties AS pm, product_brand AS br WHERE bs.sid = m.shopid AND m.merchantid = pm.mid AND br.bid = pm.bid AND m.paid>0 AND m.payenddate>='$today' AND m.paystartdate<='$today' AND bs.distributor=1 AND bs.state=0 AND bs.country='$country' AND pm.status=0 ORDER BY br.brand_name ASC, bs.shopname ASC"; //AND m.brand_protection = 1 $result_set = mysql_query($sql); $WEBPAGE_TITLE = getCountrySelected().' Bike & Bicycle Brands | '.$GLOBAL_PORTAL_NAME; ?>