Exemple #1
0
                     }
                 }
                 if ($rt['ifsign'] < 2) {
                     $description = str_replace("\n", "<br />", $description);
                 }
                 $description = stripPostHideAndSell($description);
                 $description = convert($description, $allow);
                 $description = xmlEscape($description);
                 $item = array('title' => $postTitle, 'description' => $description, 'link' => $link, 'author' => $db_ceoemail . ' (' . $rt['author'] . ')', 'category' => $forum[$rt['fid']]['name'], 'pubDate' => date('r', $rt['postdate']));
                 $Rss->item($item);
             }
         }
         unset($threaddbs);
     }
     $channel['pubDate'] = date('r', $forumLastPostTime);
     $Rss->channel($channel);
     $Rss->generate($cache_path);
 }
 header("Content-type: application/xml");
 if (file_exists($cache_path)) {
     $etag = '"' . md5_file($cache_path) . '"';
     if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $etag == $_SERVER['HTTP_IF_NONE_MATCH']) {
         $statusCode = 304;
     } else {
         header('Etag:' . $etag);
     }
     $fileModifiedTime = pwFilemtime($cache_path);
     if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $fileModifiedTime == $_SERVER['HTTP_IF_MODIFIED_SINCE']) {
         $statusCode = 304;
     } else {
         $lastModifiedTime = date('D, d M Y H:i:s', $fileModifiedTime) . ' GMT';