eof;
}
?>
{$category['description']}
eof;
}
//当前目录的readme详细介绍
if (!empty($viewData['htmlCateReadme'])) {
echo <<{$viewData['htmlCateReadme']}
eof;
}
if (!empty($category['directories'])) { //两级目录支持
foreach($category['directories'] as $dir) {
echo <<
eof;
if (!empty($dir['snapshot'])) {
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)) {
echo <<
eof;
}
}
echo <<{$dir['directory']}
eof;
}
}else if (!empty($category['files'])) { //一级目录支持
foreach($category['files'] as $file) {
if (!in_array($file['extension'], $imgExts)) {continue;}
echo <<
{$file['filename']}
eof;
}
}
?>