} } } } $rssFeed .= "</channel>\n</rss>"; echo $rssFeed; } // Send proper header header('Content-Type: application/xml'); $level = isset($_GET['level']) ? $_GET['level'] : ''; $id = isset($_GET['id']) ? intval($_GET['id']) : '0'; // Process path here - is set if mod_rewrite is in use // Some Estonian remarks were here if (!empty($_REQUEST['path'])) { // The following line calculates the path in the album and excludes any subdirectories if // Plogger is installed in one $path = join('/', array_diff(explode('/', $_SERVER['REQUEST_URI']), explode('/', $_SERVER['PHP_SELF']))); $resolved_path = resolve_path($path); $level = isset($resolved_path['level']) ? $resolved_path['level'] : 'collections'; $id = isset($resolved_path['id']) ? $resolved_path['id'] : 0; } $parts = parse_url($_SERVER['REQUEST_URI']); if (isset($parts['query'])) { parse_str($parts['query'], $query_parts); } if (isset($query_parts['searchterms'])) { generate_RSS_feed($level, $id, $query_parts['searchterms']); } else { generate_RSS_feed($level, $id); } close_db();
$rssFeed .= "<title>" . $caption . "</title>\n"; $rssFeed .= "<link>" . $pagelink . "</link>\n"; $rssFeed .= "<description>" . $discript . "</description>\n"; $rssFeed .= "<guid isPermaLink=\"false\">" . $thumbpath . "</guid>"; $rssFeed .= "</item>\n"; } $rssFeed .= "</channel></rss>"; echo $rssFeed; } // send proper header header("Content-Type: application/xml"); $level = isset($_GET["level"]) ? $_GET["level"] : ""; $id = isset($_GET["id"]) ? intval($_GET["id"]) : ""; // process path here - is set if mod_rewrite is in use // ja see urli parsimine peaks ka ometi eraldi funktsioonis olema, et ma saaksin seda shareda // nii siin kui seal kui ka ilmselt veel mõnes kohas if (!empty($_REQUEST["path"])) { // the followling line calculates the path in the album and excludes any subdirectories if // Plogger is installed in one $path = join("/", array_diff(explode("/", $_SERVER["REQUEST_URI"]), explode("/", $_SERVER["PHP_SELF"]))); $resolved_path = resolve_path($path); // there is no meaningful RSS feed for images if (is_array($resolved_path) && $resolved_path["level"] != "picture") { $level = $resolved_path["level"]; $id = $resolved_path["id"]; } } $parts = parse_url($_SERVER["REQUEST_URI"]); parse_str($parts["query"], $query_parts); generate_RSS_feed($level, $id, $query_parts["searchterms"]);