|
|
|
<?php
|
|
|
|
//常用方法
|
|
|
|
require_once __DIR__ . '/../../../../plugins/Html.php';
|
|
|
|
$imgPreffix = '/' . FSC::$app['config']['content_directory'] . FSC::$app['config']['tajian']['data_dir'];
|
|
|
|
|
|
|
|
if (!empty($breadcrumbs)) {
|
|
|
|
echo <<<eof
|
|
|
|
<div class="breadcrumbs">
|
|
|
|
<a href="/">首页</a> >>
|
|
|
|
eof;
|
|
|
|
|
|
|
|
foreach($breadcrumbs as $bread) {
|
|
|
|
if ($bread['id'] != $selectedId) {
|
|
|
|
echo <<<eof
|
|
|
|
<a href="{$bread['url']}">{$bread['name']}</a> /
|
|
|
|
eof;
|
|
|
|
}else {
|
|
|
|
echo <<<eof
|
|
|
|
<strong>{$bread['name']}</strong>
|
|
|
|
eof;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
echo <<<eof
|
|
|
|
</div>
|
|
|
|
eof;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<main class="g_main_lay">
|
|
|
|
<div class="videos_list clearfix">
|
|
|
|
<?php
|
|
|
|
$imgExts = array('jpg', 'jpeg', 'png', 'gif');
|
|
|
|
$videoExts = array('url');
|
|
|
|
$category = $viewData['scanResults'][$selectedId];
|
|
|
|
|
|
|
|
//当前目录的描述介绍
|
|
|
|
if (!empty($category['description'])) {
|
|
|
|
echo <<<eof
|
|
|
|
<p class="catedesc">{$category['description']}</p>
|
|
|
|
eof;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($category['files'])) { //一级目录支持,目录下直接存放视频文件
|
|
|
|
|
|
|
|
$cate_files = Html::sortFilesByCreateTime($category['files'], 'desc'); //按创建时间排序
|
|
|
|
foreach($cate_files as $index => $file) {
|
|
|
|
//跳过非.url文件
|
|
|
|
if (!in_array($file['extension'], $videoExts) || empty($file['shortcut'])) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
$snapshot = !empty($file['cover']) ? $imgPreffix . $file['cover'] : '/img/default.png';
|
|
|
|
$title = !empty($file['title']) ? Html::mb_substr($file['title'], 0, 33, 'utf-8') : $file['filename'];
|
|
|
|
|
|
|
|
$platform = Html::getShareVideosPlatform($file['shortcut']['url']);
|
|
|
|
|
|
|
|
$pubDate = date('m/d', $file['fstat']['ctime']);
|
|
|
|
|
|
|
|
$imgSrc = $index < 8 ? " src=\"{$snapshot}\"" : '';
|
|
|
|
$imgAlt = $index < 8 ? " alt=\"{$title}\"" : '';
|
|
|
|
|
|
|
|
echo <<<eof
|
|
|
|
<div class="vl_list_main advideo-item">
|
|
|
|
<div class="video_img_vl">
|
|
|
|
<a href="{$file['shortcut']['url']}" target="_blank">
|
|
|
|
<img data-original="{$snapshot}" class="lazy"{$imgSrc}{$imgAlt}>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="video_title_vl">
|
|
|
|
<a href="{$file['shortcut']['url']}" target="_blank">
|
|
|
|
<span class="duration">{$platform}</span>
|
|
|
|
<strong>{$pubDate},{$title}</strong>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
eof;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|