Block("Cheer"); $strSql = "SELECT $strCfgDbTableBrand.BrandName,$strCfgDbTableProduct.* FROM $strCfgDbTableProduct LEFT JOIN $strCfgDbTableBrand ON ($strCfgDbTableBrand.BrandId = $strCfgDbTableProduct.BrandId) WHERE Cheer = 'Y' AND ProductActive = 'Y' ORDER BY ProductId DESC LIMIT 0,6"; $objResult = mysql_query($strSql); if (!$objResult) { echo "$strSql"; die("\n Invalid query: " . mysql_error()); } while($row = mysql_fetch_array($objResult)) { $ProductId = $row[ProductId]; $ProductName = $row[ProductName]; $ProductFile1Name = $row[ProductFile1Name]; $BrandName = $row[BrandName]; $ProductPrice = $row[ProductPrice]; $ProductPriceExtra = $row[ProductPriceExtra]; $ProductPriceExtraShow = $row[ProductPriceExtraShow]; $ProductPriceMember = $row[ProductPriceMember]; #$ProductPriceEMoney = $row[ProductPriceEMoney]; #$ProductPriceEMoneyShow = $row[ProductPriceEMoneyShow]; $ProductDetailShortShow = nl2br($row[ProductDetailShort]); $ProductCodeIdShow = genProductCodeId($row[ProductId]); $AddDateShow = YYYYMMDDHHMMSS2DDMMYYYY($row[AddDate]); $strPrice = comify($ProductPrice); $ProductPriceMemberShow = ""; if ($ProductPriceMember) { $ProductPriceMemberShow = comify($ProductPriceMember); $ProductPriceMemberShow = "
Member Price: $ProductPriceMemberShow"; } $strPriceShow = <<$strPrice
Our Price: $ProductPriceExtra (Excl. Vat)$ProductPriceMemberShow Data; } $Hot = $row[Hot]; $Cool = $row[Cool]; $HotShow = ""; if ($Hot == "Y") { $HotShow = << Data; } $CoolShow = ""; if ($Cool == "Y") { $CoolShow = << Data; } $ProductFile1NameShow = ""; if ($ProductFile1Name) { $ProductFile1NameShow = << Data; } $tp->Apply(); } mysql_free_result($objResult); $tp->Block("NewProduct"); $strSql = "SELECT $strCfgDbTableBrand.BrandName,$strCfgDbTableProduct.* FROM $strCfgDbTableProduct LEFT JOIN $strCfgDbTableBrand ON ($strCfgDbTableBrand.BrandId = $strCfgDbTableProduct.BrandId) WHERE ProductActive = 'Y' ORDER BY ProductId DESC LIMIT 0,$intCfgMainPageNew"; $objResult = mysql_query($strSql); if (!$objResult) { echo "$strSql"; die("\n Invalid query: " . mysql_error()); } while($row = mysql_fetch_array($objResult)) { $ProductId = $row[ProductId]; $ProductName = $row[ProductName]; $ProductFile1Name = $row[ProductFile1Name]; $BrandName = $row[BrandName]; $ProductPrice = $row[ProductPrice]; $ProductPriceExtra = $row[ProductPriceExtra]; $ProductPriceExtraShow = $row[ProductPriceExtraShow]; $ProductPriceMember = $row[ProductPriceMember]; #$ProductPriceEMoney = $row[ProductPriceEMoney]; #$ProductPriceEMoneyShow = $row[ProductPriceEMoneyShow]; $ProductDetailShortShow = nl2br($row[ProductDetailShort]); $ProductCodeIdShow = genProductCodeId($row[ProductId]); $AddDateShow = YYYYMMDDHHMMSS2DDMMYYYY($row[AddDate]); $strPrice = comify($ProductPrice); $ProductPriceMemberShow = ""; if ($ProductPriceMember) { $ProductPriceMemberShow = comify($ProductPriceMember); $ProductPriceMemberShow = "
Member Price: $ProductPriceMemberShow"; } $strPriceShow = <<$strPrice
Our Price: $ProductPriceExtra (Excl. Vat)$ProductPriceMemberShow Data; } $Hot = $row[Hot]; $Cool = $row[Cool]; $HotShow = ""; if ($Hot == "Y") { $HotShow = << Data; } $CoolShow = ""; if ($Cool == "Y") { $CoolShow = << Data; } $ProductFile1NameShow = ""; if ($ProductFile1Name) { $ProductFile1NameShow = << Data; } $tp->Apply(); } mysql_free_result($objResult); $intTop = 0; $tp->Block("TopProduct"); $strSql = "SELECT $strCfgDbTableBrand.BrandName,$strCfgDbTableProduct.* FROM $strCfgDbTableProduct LEFT JOIN $strCfgDbTableBrand ON ($strCfgDbTableBrand.BrandId = $strCfgDbTableProduct.BrandId) WHERE Cheer = 'Y' AND ProductActive = 'Y' ORDER BY TotalSell DESC LIMIT 0,$intCfgMainPageTop"; $objResult = mysql_query($strSql); if (!$objResult) { echo "$strSql"; die("\n Invalid query: " . mysql_error()); } while($row = mysql_fetch_array($objResult)) { $intTop += 1; $ProductId = $row[ProductId]; $ProductName = $row[ProductName]; $ProductFile1Name = $row[ProductFile1Name]; $BrandName = $row[BrandName]; $ProductPrice = $row[ProductPrice]; $ProductPriceExtra = $row[ProductPriceExtra]; $ProductPriceExtraShow = $row[ProductPriceExtraShow]; $ProductPriceMember = $row[ProductPriceMember]; #$ProductPriceEMoney = $row[ProductPriceEMoney]; #$ProductPriceEMoneyShow = $row[ProductPriceEMoneyShow]; $ProductDetailShortShow = nl2br($row[ProductDetailShort]); $ProductCodeIdShow = genProductCodeId($row[ProductId]); $AddDateShow = YYYYMMDDHHMMSS2DDMMYYYY($row[AddDate]); $strPrice = comify($ProductPrice); $ProductPriceMemberShow = ""; if ($ProductPriceMember) { $ProductPriceMemberShow = comify($ProductPriceMember); $ProductPriceMemberShow = "
Member Price: $ProductPriceMemberShow"; } $strPriceShow = <<$strPrice
Our Price: $ProductPriceExtra (Excl. Vat)$ProductPriceMemberShow Data; } $Hot = $row[Hot]; $Cool = $row[Cool]; $HotShow = ""; if ($Hot == "Y") { $HotShow = << Data; } $CoolShow = ""; if ($Cool == "Y") { $CoolShow = << Data; } $ProductFile1NameShow = ""; if ($ProductFile1Name) { $ProductFile1NameShow = << Data; } $tp->Apply(); } mysql_free_result($objResult); mysql_close($objDb); $tp->Display(); exit; /*------------------------------------------------------------------*/ ?>