} $total++; } $collection["thumb_path"] = "plog-thumb.php?id=" . $collection["thumbnail_id"]; $xml .= '<collection'; // Put together the tag attributes foreach ($collection as $var => $val) { $xml .= ' ' . $var . '="' . htmlspecialchars($val) . '"'; } $xml .= '>'; } if (isset($_GET["albums"]) || isset($_GET["album_id"])) { $albums = get_albums($collection["id"], "mod", "DESC"); } else { if (isset($_GET["pictures"]) || isset($_GET["picture_id"]) || isset($_GET["comments"]) || isset($_GET["comment_id"])) { $albums = get_album_ids($collection["id"], "mod", "DESC"); } else { $albums = array(); } } foreach ($albums as $album) { if (isset($_GET["collection_id"]) && $_GET["collection_id"] == $album["collection_id"] || !isset($_GET["collection_id"])) { if (isset($_GET["albums"]) && $_GET["albums"] == 1 || isset($_GET["album_id"]) && $_GET["album_id"] == $album["album_id"]) { if ($limitType == 'albums') { if ($total == $limit) { break; } $total++; } $album["thumb_path"] = "plog-thumb.php?id=" . $album["thumbnail_id"]; $xml .= '<album';
} $total++; } $collection['thumb_path'] = 'plog-thumb.php?id=' . $collection['thumbnail_id']; $xml .= '<collection'; // Put together the tag attributes foreach ($collection as $var => $val) { $xml .= ' ' . $var . '="' . htmlspecialchars($val) . '"'; } $xml .= '>'; } if (isset($_GET['albums']) || isset($_GET['album_id'])) { $albums = get_albums($collection['id'], 'mod', 'DESC'); } else { if (isset($_GET['pictures']) || isset($_GET['picture_id']) || isset($_GET['comments']) || isset($_GET['comment_id'])) { $albums = get_album_ids($collection['id'], 'mod', 'DESC'); } else { $albums = array(); } } foreach ($albums as $album) { if (isset($_GET['collection_id']) && $_GET['collection_id'] == $album['collection_id'] || !isset($_GET['collection_id'])) { if (isset($_GET['albums']) && $_GET['albums'] == 1 || isset($_GET['album_id']) && $_GET['album_id'] == $album['album_id']) { if ($limitType == 'albums') { if ($total == $limit) { break; } $total++; } $album['album_path'] = sanitize_filename($album['collection_name']) . '/' . sanitize_filename($album['album_name']) . '/'; $album['thumb_path'] = 'plog-thumb.php?id=' . $album['thumbnail_id'];