Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/ubamu (3-Jun @ 12:31)

Syntax Highlighted Code

  1. while($rw=$r->fetch()) {
  2.         //new item
  3.         $rssItem=$channel->addChild('item');
  4.  
  5.         //set title
  6.         $rssItem->addChild('title',stripslashes(strip_tags($rw['nume'])));
  7.  
  8.         if ($type=='stiri') {
  9.             //same link for all news
  10.             $rssItem->addChild('link',$CFG['rss']['stiri']['link']);
  11.  
  12.             //description
  13.             $rssItem->addChild(
  14.                 'description',
  15.                 substr(
  16.                     strip_tags(
  17.                         html_entity_decode(
  18.                             stripslashes(
  19.                                 str_replace(
  20.                                     array("\n\r","\r\n","\r"),
  21.                                     "\n",
  22.                                     $rw['descr']
  23.                                 )
  24.                             ),
  25.                             ENT_QUOTES,
  26.                             'UTF-8'
  27.                         )
  28.                     ),
  29.                     0,
  30.                     $CFG['rss']['common']['textLimit']
  31.                 )
  32.             );
  33.         }

Plain Code

while($rw=$r->fetch()) {
        //new item
        $rssItem=$channel->addChild('item');

        //set title
        $rssItem->addChild('title',stripslashes(strip_tags($rw['nume'])));

        if ($type=='stiri') {
            //same link for all news
            $rssItem->addChild('link',$CFG['rss']['stiri']['link']);

            //description
            $rssItem->addChild(
                'description',
                substr(
                    strip_tags(
                        html_entity_decode(
                            stripslashes(
                                str_replace(
                                    array("\n\r","\r\n","\r"),
                                    "\n",
                                    $rw['descr']
                                )
                            ),
                            ENT_QUOTES,
                            'UTF-8'
                        )
                    ),
                    0,
                    $CFG['rss']['common']['textLimit']
                )
            );
        }

Permalink: http://codedumper.com/ubamu