filesite
1 year ago
1 changed files with 54 additions and 52 deletions
@ -1,76 +1,78 @@ |
|||||||
<div class="indexes"> |
<div class="indexes"> |
||||||
<?php |
<?php |
||||||
if (!empty($viewData['menus'])) { |
if (!empty($viewData['menus'])) { |
||||||
foreach($viewData['menus'] as $menu) { |
foreach($viewData['menus'] as $menu) { |
||||||
$link = urlencode($menu['directory']); |
$link = urlencode($menu['directory']); |
||||||
echo <<<eof |
echo <<<eof |
||||||
<a href="#{$link}">{$menu['directory']}</a> |
<a href="#{$link}">{$menu['directory']}</a> |
||||||
eof; |
eof; |
||||||
} |
} |
||||||
} |
} |
||||||
?> |
?> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="content markdown-body"> |
<div class="content markdown-body"> |
||||||
<?php |
<?php |
||||||
if (!empty($viewData['dirTree'])) { |
if (!empty($viewData['dirTree'])) { |
||||||
foreach($viewData['dirTree'] as $id => $item) { |
foreach($viewData['dirTree'] as $id => $item) { |
||||||
//跳过一级目录下的文件 |
//跳过一级目录下的文件 |
||||||
if (!empty($item['filename'])) {continue;} |
if (!empty($item['filename'])) {continue;} |
||||||
|
|
||||||
echo <<<eof |
echo <<<eof |
||||||
<div class="url-group clearfix"> |
<div class="url-group clearfix"> |
||||||
<h3 id="{$item['directory']}">{$item['directory']}</h3> |
<h3 id="{$item['directory']}">{$item['directory']}</h3> |
||||||
eof; |
eof; |
||||||
|
|
||||||
//二级目录 |
//二级目录 |
||||||
if (!empty($item['directories'])) { |
if (!empty($item['directories'])) { |
||||||
foreach($item['directories'] as $fid => $dir) { |
foreach($item['directories'] as $fid => $dir) { |
||||||
echo <<<eof |
echo <<<eof |
||||||
<div class="url-group clearfix"> |
<div class="url-group clearfix"> |
||||||
<h4>- {$dir['directory']}</h4> |
<h4>- {$dir['directory']}</h4> |
||||||
eof; |
eof; |
||||||
|
|
||||||
//URL链接 |
//URL链接 |
||||||
if (!empty($dir['files'])) { |
if (!empty($dir['files'])) { |
||||||
foreach($dir['files'] as $urlItem) { |
foreach($dir['files'] as $urlItem) { |
||||||
echo <<<eof |
if (empty($urlItem['shortcut'])) {continue;} |
||||||
<div class="url"> |
echo <<<eof |
||||||
<a href="{$urlItem['shortcut']['url']}" target="_blank"> |
<div class="url"> |
||||||
<strong>{$urlItem['shortcut']['name']}</strong> |
<a href="{$urlItem['shortcut']['url']}" target="_blank"> |
||||||
<small>{$urlItem['shortcut']['url']}</small> |
<strong>{$urlItem['shortcut']['name']}</strong> |
||||||
</a> |
<small>{$urlItem['shortcut']['url']}</small> |
||||||
</div> |
</a> |
||||||
|
</div> |
||||||
eof; |
eof; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
echo <<<eof |
echo <<<eof |
||||||
</div> |
</div> |
||||||
eof; |
eof; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
//URL链接 |
//URL链接 |
||||||
if (!empty($item['files'])) { |
if (!empty($item['files'])) { |
||||||
foreach($item['files'] as $fid => $urlItem) { |
foreach($item['files'] as $fid => $urlItem) { |
||||||
echo <<<eof |
if (empty($urlItem['shortcut'])) {continue;} |
||||||
<div class="url"> |
echo <<<eof |
||||||
<a href="{$urlItem['shortcut']['url']}" target="_blank"> |
<div class="url"> |
||||||
<strong>{$urlItem['shortcut']['name']}</strong> |
<a href="{$urlItem['shortcut']['url']}" target="_blank"> |
||||||
<small>{$urlItem['shortcut']['url']}</small> |
<strong>{$urlItem['shortcut']['name']}</strong> |
||||||
</a> |
<small>{$urlItem['shortcut']['url']}</small> |
||||||
</div> |
</a> |
||||||
|
</div> |
||||||
eof; |
eof; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
echo <<<eof |
echo <<<eof |
||||||
</div> |
</div> |
||||||
eof; |
eof; |
||||||
|
|
||||||
} |
} |
||||||
} |
} |
||||||
?> |
?> |
||||||
</div> |
</div> |
Loading…
Reference in new issue