本文整理汇总了PHP中DocumentManager::readNanogongFile方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentManager::readNanogongFile方法的具体用法?PHP DocumentManager::readNanogongFile怎么用?PHP DocumentManager::readNanogongFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentManager
的用法示例。
在下文中一共展示了DocumentManager::readNanogongFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_lang
//fo.addVariable("ShotsWidth","200");//The width of snapshots, in pixels.
//fo.addVariable("genAllShots","true");//Preview shots (like the samples on the Shots Width page) will be generated for all linked maps when your main map loads. If you have a lot of linked maps, this could take some time to complete
//fo.addVariable("unfoldAll","true"); //For each mindmap loaded start the display with all nodes unfolded. Another variable to be wary of!
//fo.addVariable("toolTipsBgColor","0xaaeeaa");: bgcolor for tooltips ej;"0xaaeeaa"
//fo.addVariable("defaultWordWrap","300"); //default 600
//
fo.write("flashcontent");
// ]]>
</script>
<?php
}
if ($is_nanogong_available) {
$file_url_web = DocumentManager::generateAudioTempFolder($file_url_sys);
echo '<div align="center">';
echo '<a class="btn btn-default" href="' . $file_url_web . '" target="_blank"><em class="fa fa-download"></em> ' . get_lang('Download') . '</a>';
echo '<br/>';
echo '<br/>';
echo DocumentManager::readNanogongFile($to_url);
// Erase temp file in tmp directory when return to documents
echo '</div>';
}
if ($execute_iframe) {
if ($isChatFolder) {
$content = Security::remove_XSS(file_get_contents($file_url_sys));
echo $content;
} else {
echo '<iframe id="mainFrame" name="mainFrame" border="0" frameborder="0" scrolling="no" style="width:100%;" height="600" src="' . $file_url_web . '&rand=' . mt_rand(1, 10000) . '" height="500" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>';
}
}
Display::display_footer();
示例2: getMediaPlayer
/**
* @param string $file
* @param array $params
* @return null|string
*/
public static function getMediaPlayer($file, $params = array())
{
$fileInfo = pathinfo($file);
switch ($fileInfo['extension']) {
case 'wav':
if (isset($params['url'])) {
$url = DocumentManager::generateAudioTempFile(basename($file), $file);
return DocumentManager::readNanogongFile($url);
}
break;
case 'mp3':
case 'webm':
$autoplay = null;
if (isset($params['autoplay']) && $params['autoplay'] == 'true') {
$autoplay = 'autoplay';
}
$width = isset($params['width']) ? 'width="' . $params['width'] . '"' : null;
$id = isset($params['id']) ? $params['id'] : $fileInfo['basename'];
$class = isset($params['class']) ? ' class="' . $params['class'] . '"' : null;
$html = '<audio id="' . $id . '" ' . $class . ' controls ' . $autoplay . ' ' . $width . ' src="' . $params['url'] . '" >';
$html .= '<object width="' . $width . '" height="50" type="application/x-shockwave-flash" data="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/mediaelement/flashmediaelement.swf">
<param name="movie" value="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/mediaelement/flashmediaelement.swf" />
<param name="flashvars" value="controls=true&file=' . $params['url'] . '" />
</object>';
$html .= '</audio>';
return $html;
break;
}
return null;
}