connect(); $core_db->selectdb(); /** * Create object of class rss */ $rss=new rss_class(); /** * choose the version of specification that the generated RSS document should conform. */ if($_GET['version']=='0.9') $rss->specification='0.9'; else $rss->specification='1.0'; /** * Specify the URL where the RSS document will be made available. */ $rss->about=$info['url'].'template.'.$rss->specification.'.rss'; /** * Specify the URL of an optional XSL stylesheet. * This lets the document be rendered automatically in XML capable browsers. * */ //$rss->stylesheet=$info['url'].'templates/default/rss1html.xsl'; /** * You may declare additional namespaces that enable the use of more property * tags defined by extension modules of the RSS specification. */ $rss->rssnamespaces['dc']='http://purl.org/dc/elements/1.1/'; /** * Define the properties of the channel. */ $properties=array(); $properties['description']='Hope Template offers professional web templates, flash templates and other web design products available for immediate download.'; $properties['link']=$info['url']; $properties['title']='Hope Template Web Templates'; $properties['dc:date']='2002-05-06T00:00:00Z'; $rss->addchannel($properties); $query_products=$core_db->Query("SELECT product_url AS link ,product_title AS title ,product_description AS description FROM @__products WHERE product_status=1"); while($product=$core_db->FetchAssoc($query_products)) { $url=$product['link']; $product['dc:date']='2007-05-11T00:00:00Z'; $product['link']=$info['url'].$product['link'].'/index.php'; $rss->additem($product); } $query_categories=$core_db->Query("SELECT category_url AS link ,category_title AS title ,category_description AS description FROM @__categories WHERE category_status=1"); while($category=$core_db->FetchAssoc($query_categories)) { $category['dc:date']='2007-05-11T00:00:00Z'; $category['link']=$info['url'].'website_templates/'.$category['link'].'/index.php'; $rss->additem($category); } /* * Define the properties of the channel. */ /* * When you are done with the definition of the channel items, generate RSS document. */ if($rss->writerss($output)) { /* * If the document was generated successfully, you may now output it. */ @ob_end_clean(); Header('Content-Type: text/xml; charset="'.$rss->outputencoding.'"'); Header('Content-Length: '.strval(strlen($output))); echo $output; } else { /* * If there was an error, output it as well. */ Header('Content-Type: text/plain'); echo ('Error: '.$rss->error); } ?>