Пример #1
0
 function createrss($clink = false)
 {
     global $cfg, $setctl, $phpenv;
     $res = $this->getlast($cfg['rsslaststreamcount']);
     $rss = new krss(get_lang(286));
     while ($row = db_fetch_assoc($res)) {
         $f2 = new file2($row['id'], true);
         $fd = new filedesc($f2->fname);
         if ($fd->found && $fd->m3u) {
             if ($clink) {
                 $link = $setctl->get('streamurl') . $phpenv['streamlocation'] . $f2->weblink(0, 0, 'sid', false);
             } else {
                 $link = $setctl->get('streamurl') . $phpenv['streamlocation'];
             }
             $rss->additem($f2->gentitle(array('title', 'artist')), $f2->gentitle(array('title', 'artist', 'album')), $link, $row['utime'], '');
         }
     }
     $rss->ship();
 }