include("lw_config.php"); ?>
$cat = 0;//¡ $cat = 0 means ALL
if (isset($_GET['cat']))
$cat = intval($_GET['cat']);
$sql = "SELECT `products`.*, `categories`.`name` AS cat_name, (price+price_sub*12) as lt_price ";
$sql .= "FROM `products`, `categories` ";
if ($cat > 0)
$sql .= "WHERE ((`products`.`category_id`=`categories`.`category_id`) AND (`products`.`category_id` = $cat)) ";
else
$sql .= "WHERE (`products`.`category_id`=`categories`.`category_id`) ";
$sql .= "ORDER BY `products`.`category_id`, lt_price DESC";
$result = mysql_query($sql, $db);
if (mysql_num_rows($result)==0){
$sql = "SELECT `products`.*, `categories`.`name` AS cat_name, (price+price_sub*12) as lt_price ";
$sql .= "FROM `products`, `categories` ";
$sql .= "WHERE (`products`.`category_id`=`categories`.`category_id`) ";
$sql .= "ORDER BY `products`.`category_id`, lt_price DESC";
$result = mysql_query($sql, $db);
}
?>
Listing Webmaster Store
Listing Webmaster
Store
Products & Services
|
|
|
|
Order
$prev_cat = "";
$i=1;
while ($row = mysql_fetch_array($result)) {
if (IS_PROMOTION){
$pr = $row["price_promo"];
if($pr==0)
$pr = $row["price_sub_promo"] . "/mo";
} else {
$pr = $row["price"];
if($pr==0)
$pr = $row["price_sub"] . "/mo";
}
if ($row["category_id"]==3 && $row["code"]!= 'bp1s1')//Add asterisk to bundles
$pr .= "*";
$cat_name = $row["cat_name"];
if( $prev_cat != $row["cat_name"]){
if ($row["category_id"]==3)
$cat_name .= " (Save up to $100)";
if($prev_cat!="")
$cat_name = " $cat_name";
echo "$cat_name | | | ";
}
$prev_cat = $row["cat_name"];
?>
echo $row['name'] ?> |
$ echo $pr ?> |
|
}
if ($prev_cat == 'Bundle Specials'){ //($row["category_id"]==3){
?>
* Plus hosting monthly service, click bundle link
for details |
|
|
}
?>
|
|
|
|