sql_query("select * from ".$prefix."_cart_products where promoActive='1' AND prodActive='1'"); $numrows = $db->sql_numrows($result); if($numrows == 0) { $content = ""._EMPORIUM_BLOCK_RANDOMPROMO_NOPROMOS.""; } else { srand((double)microtime()*1000000); while ($random = rand(1,$numrows)) { $random = $random - 1; $prodID = $db->sql_fetchrow($db->sql_query("SELECT prodID FROM ".$prefix."_cart_products WHERE prodActive='1' AND promoActive='1' LIMIT $random, 1")); $product = cartproductinfo($prodID['prodID']); if ($product['prodActive']=='1' && $product['promoActive']=='1') { $content = "