总数 {$total} 当前位置: 首页 / eof; foreach ($breadcrumbs as $bread) { if ($bread['id'] != $selectedId) { echo <<{$bread['name']} / eof; } else { echo <<{$bread['name']} eof; } } echo << eof; } ?>
$viewData['menus'], 'files' => $viewData['scanResults'], ); }else if (!empty($selectedId) && empty($category['directories']) && empty($category['files'])) { echo <<此目录下没有图片和视频哦,复制照片目录或文件到目录里刷新网页即可。
eof; } //当前目录的描述介绍 if (!empty($category['description'])) { echo <<{$category['description']}

eof; } //当前目录的readme详细介绍 if (!empty($viewData['htmlCateReadme'])) { echo <<{$viewData['htmlCateReadme']}
eof; } if (!empty($category['directories'])) { //两级目录支持 $index = 0; foreach ($category['directories'] as $dir) { echo << eof; if (!empty($dir['snapshot'])) { if ($index > 0) { echo << eof; } else { echo << eof; } } else if (!empty($dir['files'])) { $first_img = array_shift($dir['files']); if (!in_array($first_img['extension'], $imgExts)) { foreach ($dir['files'] as $file) { if (in_array($file['extension'], $imgExts)) { $first_img = $file; break; } } } if (in_array($first_img['extension'], $imgExts)) { if ($index > 0) { echo << eof; } else { echo << eof; } } else { echo << eof; } } $title = !empty($dir['title']) ? $dir['title'] : $dir['directory']; echo << folder {$title} eof; $index++; } //分割目录和文件 echo ''; if (!empty($category['files']) && count($category['files']) > 3) { echo '
'; } echo '
'; } //显示图片、视频 if (!empty($category['files'])) { //一级目录支持 $pageStartIndex = ($viewData['page']-1) * $viewData['pageSize']; $index = 0; foreach ($category['files'] as $file) { if (empty($file['extension']) || !in_array($file['extension'], $supportedExts)) { continue; } //翻页支持 if ($index < $pageStartIndex) { $index ++; continue; }else if ($index >= $pageStartIndex + $viewData['pageSize']) { break; } $title = !empty($file['title']) ? $file['title'] : $file['filename']; //图片、视频显示文件创建日期 if (!empty($file['fstat']['ctime'])) { $title = date('Y-m-d', $file['fstat']['ctime']); } if ($index > 0) { if (in_array($file['extension'], $imgExts)) { echo << {$file['filename']}
{$title}
eof; }else if (in_array($file['extension'], $videoExts)) { //输出视频 $videoUrl = urlencode($file['path']); echo << {$file['filename']}
{$title}
eof; } } else { if (in_array($file['extension'], $imgExts)) { echo << {$file['filename']}
{$title}
eof; }else if (in_array($file['extension'], $videoExts)) { //输出视频 $videoUrl = urlencode($file['path']); echo << {$file['filename']}
{$title}
eof; } } $index++; } } ?>
0) { $pagination = Html::getPaginationHtmlCode($viewData['page'], $viewData['pageSize'], $total); echo $pagination; } ?>