fid) {
$files[] = $file;
continue 2; // Continue with the $fids iteration (That's what the 2 does...)
}
}
}
}
else {
$files = $all_files;
}
if($files) {
$played_intro = false;
foreach($files as $file) {
// Play the intro video.
$output_dir = variable_get('flashvideo_' . $file->type .'_output_dir', '') . '/'; // The output directory
$output_dir = ($output_dir == '/') ? '' : $output_dir;
if(!$played_intro && (($intro_video = variable_get('flashvideo_' . $file->type .'_player_intro', '')) != '') ) {
$intro_path = check_url(file_create_url($output_dir . $intro_video));
$contents .= '';
$played_intro = true;
}
$filepath = check_url(file_create_url($output_dir . basename($file->filepath)));
$contents .= '';
}
}
if($contents != '') {
$xml = ''; // Start off the XML file contents
$xml .= $contents; // Fill in all the rest.
$xml .= ''; // Finish off the XML file contents
echo $xml;
}
?>