$text = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' . "\n" . '<html>' . "\n" . '<head>' . "\n" . '<title>' . $context['page_title'] . '</title>' . "\n"; // load the full library $text .= '<script type="text/javascript" src="' . $context['url_to_root'] . $script . '"></script>' . "\n"; // load javascript files from the skin directory -- e.g., Global Crossing js extensions, etc. if (isset($context['skin']) && ($pathnames = Safe::glob($context['path_to_root'] . $context['skin'] . '/*.js'))) { foreach ($pathnames as $name) { $text .= '<script type="text/javascript" src="' . $context['url_to_root'] . $context['skin'] . '/' . basename($name) . '"></script>' . "\n"; } } // load skin style sheet // if(isset($context['skin'])) // $text .= '<link rel="stylesheet" href="'.$context['url_to_root'].$context['skin'].'/'.str_replace('skins/', '', $context['skin']).'.css" type="text/css" media="all" />'."\n"; // full screen $text .= '</head>' . "\n" . '<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">' . "\n" . '<div id="live_flash">' . "\n"; // render object full size $text .= Codes::render_embed($item['id'] . ', 100%, 90%'); // add a link to close the window $text .= '</div>' . "\n" . '<p style="text-align: center; margin: 0.5em 0 1em 0;"><button type="button" onclick="self.close()">' . i18n::s('Close') . '</button></p>' . "\n"; // page postamble $text .= '</body>' . "\n" . '</html>' . "\n"; break; case 'wma': // we are returning a .wax $type = '.wax'; $mime = 'audio/x-ms-wax'; // where the file actually is $text = '<ASX VERSION="3.0">' . "\n" . ' <ENTRY>' . "\n" . ' <REF HREF="' . $target_href . '" />' . "\n" . ' </ENTRY>' . "\n" . '</ASX>'; break; case 'wmv': // we are returning a .wvx $type = '.wvx';
// $description = ''; // offer audio streaming, where applicable if (Files::is_audio_stream($item['file_name'])) { // explain what streaming is about $description .= '<p>' . i18n::s('This file may be accessed on-demand.') . '</p>'; // the label Skin::define_img('FILES_PLAY_IMG', 'files/play.gif'); $label = FILES_PLAY_IMG . ' ' . i18n::s('Play') . ' ' . str_replace('_', ' ', $item['file_name']); // use a definition list to enable customization of the download box $context['text'] .= '<dl class="download">' . '<dt>' . Skin::build_link(Files::get_url($item['id'], 'stream', $item['file_name']), $label, 'basic', i18n::s('Start')) . '</dt>' . '<dd>' . $description . '</dd></dl><div class="bottom" > </div>' . "\n"; } // offer video streaming, where applicable if (Files::is_video_stream($item['file_name'])) { // embed the player for streamed video files if (!($description = Codes::render_embed($item['id']))) { // explain what streaming is about $description .= '<p>' . i18n::s('This file may be accessed on-demand.') . '</p>'; } // the label Skin::define_img('FILES_PLAY_IMG', 'files/play.gif'); $label = FILES_PLAY_IMG . ' ' . i18n::s('Play') . ' ' . str_replace('_', ' ', $item['file_name']); // use a definition list to enable customization of the download box $context['text'] .= '<dl class="download">' . '<dt>' . Skin::build_link(Files::get_url($item['id'], 'stream', $item['file_name']), $label, 'basic', i18n::s('Start')) . '</dt>' . '<dd>' . $description . '</dd></dl><div class="bottom" > </div>' . "\n"; } // view a GanttProject file interactively if (preg_match('/\\.gan$/i', $item['file_name'])) { // the label Skin::define_img('FILES_PLAY_IMG', 'files/play.gif'); $label = FILES_PLAY_IMG . ' ' . sprintf(i18n::s('Browse %s'), str_replace('_', ' ', $item['file_name'])); // use a definition list to enable customization of the download box