useCached(); $rss->title = c_site_title." New Items"; $rss->description = ""; $rss->link = main_domain; $rss->syndicationURL = main_domain."classifieds/rss.xml"; $image = new FeedImage(); $image->title = c_site_title; $image->url = main_domain."_images/logo.gif"; $image->link = main_domain; $image->description = "Feed provided by ".c_site_title; $rss->image = $image; $query_items = "SELECT ".classifieds_data.", p_desc,p_datemodified from ".tbl_products." where p_dispstatus=1 and p_type=1 order by p_id DESC LIMIT 0,50"; $items = mysql_query($query_items,con_dna) or die(mysql_error()); $totalRows_items = mysql_num_rows($items); $row_items = mysql_fetch_assoc($items); do{ $item = new FeedItem(); $p_id = $row_items['p_id']; $auser_id = $row_items['auser_id']; $auser_name = $row_items['auser_name']; $p_name = $row_items['p_name']; $p_names = substr($row_items['p_name'],0,20); $p_image = $row_items['p_image']; $p_price = 'P'.number($row_items['p_price'],2); $p_sold = $row_items['p_sold']; $p_description = $row_items['p_desc']; $p_priceoption = $row_items['p_priceoption']; $p_datemodified = $row_items['p_datemodified']; $priceoption = 'Fixed'; if($p_priceoption==1){ $priceoption = 'Negotiable'; } $link = main_domain.'classifieds/post/'.$p_id.'/'.replace_str('format',$p_name).'.html'; $item->title = $row_items['p_name'] .' at Php '.number($row_items['p_price'],2).' ('.$priceoption.')'; $item->link = $link; $item->description = substr(strip_tags(trim($p_description)),0,255); $item->date = time(); $item->source = main_domain; $item->author = $auser_name; $rss->addItem($item); } while($row_items = mysql_fetch_assoc($items)); $rss->saveFeed("RSS2.0", main_root."classifieds/rss.xml"); mysql_close(con_dna); mysql_close(con_dnadelete); mysql_close(con_dnainsert); mysql_close(con_dnaupdate); ob_end_flush(); ?>