//$items = koala_container::get_items( $_GET["id"] ); foreach ($items as $item) { if (($item["CLASSTYPE"] & CLASS_DOCUMENT) > 0) { $use_enclosure = TRUE; //$path = PATH_URL . "cached/get_document.php?id=" . $item["OBJ_ID"]; $path = PATH_URL . "podload/" . urlencode(h($item[OBJ_NAME])) . "?id=" . $item["OBJ_ID"]; $podcast->generate_item(array("title" => h($item[OBJ_NAME]), "itunes:author" => h($item["AUTHOR"]), "description" => h($item[OBJ_DESC]), "pubDate" => strftime("%a, %d %b %Y %H:%M:%S GMT", $item[OBJ_CREATION_TIME]), "link" => $path, "guid" => $path, "itunes:explicit" => "No", "itunes:block" => "No", "itunes:keywords" => is_array($item[OBJ_KEYWORDS]) ? implode(", ", $item[OBJ_KEYWORDS]) : ""), $use_enclosure, $use_enclosure ? $path : "", $use_enclosure ? $item["CONTENTSIZE"] : "", $use_enclosure ? $item[DOC_MIME_TYPE] : ""); } else { if (false && ($item["CLASSTYPE"] & CLASS_CONTAINER) > 0) { // DISABLED at the moment $use_enclosure = FALSE; $path = PATH_URL . "cached/get_document.php?id=" . $item["OBJ_ID"]; $podcast->generate_item(array("title" => h($item[OBJ_NAME]), "itunes:author" => h($item["AUTHOR"]), "description" => h($item[OBJ_DESC]), "pubDate" => strftime("%a, %d %b %Y %H:%M:%S GMT", $item[OBJ_CREATION_TIME]), "link" => $path, "guid" => $path, "itunes:explicit" => "No", "itunes:block" => "No", "itunes:keywords" => is_array($item[OBJ_KEYWORDS]) ? implode(", ", $item[OBJ_KEYWORDS]) : ""), $use_enclosure, $use_enclosure ? $path : "", $use_enclosure ? $item["CONTENTSIZE"] : "", $use_enclosure ? $item[DOC_MIME_TYPE] : ""); } else { if (false && ($item["CLASSTYPE"] & CLASS_SDOCEXTERN) > 0) { // DISABLED because Links cannot be displayed with enclosure in general => That leads into validation error of the podcast and therefore malfunction of the whole Cast // TODO: Implement Option "Use in Podcast" and require a file as destination in attribute DOC_EXTERN_URL $use_enclosure = TRUE; $path = $item["DOC_EXTERN_URL"]; $podcast->generate_item(array("title" => h($item[OBJ_NAME]), "itunes:author" => h($item["AUTHOR"]), "description" => h($item[OBJ_DESC]), "pubDate" => strftime("%a, %d %b %Y %H:%M:%S GMT", $item[OBJ_CREATION_TIME]), "link" => $path, "guid" => $path, "itunes:explicit" => "No", "itunes:block" => "No", "itunes:keywords" => is_array($item[OBJ_KEYWORDS]) ? implode(", ", $item[OBJ_KEYWORDS]) : ""), $use_enclosure, $use_enclosure ? $path : "", $use_enclosure ? 0 : "", $use_enclosure ? $item[DOC_MIME_TYPE] : ""); } } } } $podcast->generate_xml_footer(); } else { $podcast = new PodcastRSS("Access denied", PATH_SERVER . $_SERVER["REQUEST_URI"], "You are not allowed to access this RSS Feed. Please check your username and password"); $podcast->generate_http_header(); $podcast->generate_xml_header(TRUE); exit; }