sql_query("select * from ".$prefix."_cart_products where prodActive='1'"); $numrows = $db->sql_numrows($result); if($numrows == 0) { $content = ""._EMPORIUM_BLOCK_RANDOMPRODUCT_NOPRODUCTS.""; } 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' LIMIT $random, 1")); $product = cartproductinfo($prodID['prodID']); if ($product['prodActive']=='1') { $content = "
"; if ($product['pthumb'] != ""){ $content .= "value("thumbFolder")."$product[pthumb]\" WIDTH=\"".$cartconfig->value("thumbWidth")."\" BORDER=0 VSPACE=3 HSPACE=3>
"; } $content .= "$product[prodName]
".price_format(cartproductcost($product['prodID']))."
"; $content .= "
"; break; } } } ?>