minor change to randAds, add attachment.php