=$main_deal['name']?>
$
$
% OFF
require_once "/home/pea2012/includes/dressups.inc"; $db = new dressupdb(); /************************************* FEATURED PRODUCT INFORMATION *************************************/ $products = array(); $sql = " select mp.pid, mp.name, mp.default_imgid as image, mp.price, mp.sale_price, a.quantity/(sold_30_days/30) as days_left from amazon_products a, mcd_attributes b, mcd_products mp where a.asin = b.asin AND mp.pid = b.pid AND sold_30_days > 0 AND a.quantity > 0 AND (a.quantity/(sold_30_days/30)) >= 100 Order By rand() Limit 15 "; $db->query($sql); while ($db->next_record()) { $tmp = $db->Record; $tmp['name'] = str_replace(" + Free Gift", "", $tmp['name']); $tmp['name'] = str_ireplace(" Dress Up", "", $tmp['name']); $tmp['name'] = str_replace(" Princess Costume", "", $tmp['name']); $tmp['name'] = str_replace(" Costume", "", $tmp['name']); $tmp['name'] = str_replace("NEW! ", "", $tmp['name']); $tmp['name'] = str_replace(" Doll", "", $tmp['name']); $tmp['name'] = str_replace(" *Second*", "", $tmp['name']); $products[] = $tmp; } $db->free(); $date = date('Y-m-d'); if (date('H') < 13) { $date = date('Y-m-d', strtotime('-1 day', strtotime($date))); } $sql = " SELECT mp.pid, mp.name, mp.default_imgid as image, mp.price, mp.sale_price FROM mcd_products mp, mcd_daily_deal dd WHERE mp.pid = dd.pid AND dd.deal_date = '$date' "; if ($db->squery($sql)) { $main_deal = array( "id" => $db->f('pid'), "name" => $db->f('name'), "image" => $db->f('image'), "price" => $db->f('price'), "sale_price" => $db->f('sale_price'), ); } else { $main_deal = false; } $db->free(); /************************************* START DISPLAYING PAGE *************************************/ display_header("Playfully Ever After - Princess Costumes - Girls, Boys, and Adult Costumes - Princess Doll Dresses"); ?>
=$main_deal['name']?>
$
$
% OFF