|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html> |
|
<html lang="en"> |
|
|
|
<head> |
|
<% include ../common/head %> |
|
<link href="/css/signin.css" rel="stylesheet"> |
|
</head> |
|
|
|
<body> |
|
<% include ../common/navbar %> |
|
<div class="container"> |
|
<div class="row"> |
|
<div class="col-md-12"> |
|
<h3> |
|
<% |
|
// /sponge/tag/ -> [0]='', [1]='sponge', [2]='tag' |
|
var split=directory.split('/'); |
|
var baseFull=cwd+'/www/public'; %> |
|
<% if (split.length==3) { %> |
|
Sponge |
|
<% } %> |
|
<% if (split.length==4) { %> |
|
<a href='/sponge/'>Sponge</a> <%=split[2]%> |
|
<% } %> |
|
</h3> |
|
<% if (list.length>0) { %> |
|
<table class="table table-striped"> |
|
<tbody> |
|
<% |
|
// cwd: cwd, |
|
// directory: req.originalUrl, |
|
// list: list |
|
|
|
var fullPath=cwd+'/www/public'+directory; |
|
var relativePath=directory; |
|
var icone,href; |
|
for (var ii = 0; ii < list.length; ii++) { |
|
href=relativePath+list[ii].name; |
|
%> |
|
<tr> |
|
<td> |
|
<% if (list[ii].isDirectory) { %> |
|
<i class="fa fa-folder-o" aria-hidden="true"></i> |
|
<% } else { %> |
|
<i class="fa fa-file-o" aria-hidden="true"></i> |
|
<% } %> |
|
|
|
|
|
<a href="<%= href%>"><%= list[ii].name %></a> |
|
</td> |
|
</tr> |
|
<% } %> |
|
</tbody> |
|
</table> |
|
<% } else { %> |
|
<p>No Files</p> |
|
<% } %> |
|
|
|
</div> |
|
</div> |
|
</div> |
|
</body> |
|
|
|
</html> |
|
|