diff options
-rw-r--r-- | log_files.php | 26 | ||||
-rw-r--r-- | style.css | 5 |
2 files changed, 27 insertions, 4 deletions
diff --git a/log_files.php b/log_files.php index bdc6525..a2203d3 100644 --- a/log_files.php +++ b/log_files.php @@ -25,6 +25,8 @@ require 'conf.php'; // FIXME this expects to remove /uploads from $key. Could be different in the future. $key = substr($key, 8); $path = realpath($upload_dir . $key); +$job = explode('/', $key); +$job = end($job); if (!is_dir($path)) { header('Status: 404 Not Found'); @@ -33,7 +35,8 @@ if (!is_dir($path)) { } $glob = $path . '/*'; -$s = '<ul>'; +$s = sprintf('<h4>%s</h4>', $job); +$s .= '<ul>'; foreach (glob_recursive($glob) as $f) { if (is_dir($f)) @@ -41,11 +44,30 @@ foreach (glob_recursive($glob) as $f) { $link = 'uploads' . str_replace($upload_dir, '', $f); $show = str_replace(array($path . '/', '/'), array('', ' / '), $f); - $s .= sprintf('<li><a href="%s">%s</a> (%s)</li>', + $s .= sprintf('<li><a href="%s" rel="nofollow">%s</a> (%s)</li>', $link, $show, _format_bytes(filesize($f)) ); } + +$others = array( + '.youri', + '_i586.done', + '_x86_64.done' +); +foreach ($others as $suffix) { + $f = $path . $suffix; + if (file_exists($f)) { + $link = 'uploads' . str_replace($upload_dir, '', $f); + $show = explode($path, $f); + $show = $job . $suffix; + $s .= sprintf('<li><a href="%s" rel="nofollow">%s</a> (%s)</li>', + $link, $show, + _format_bytes(filesize($f)) + ); + } +} + $s .= '</ul>'; echo $s; @@ -43,5 +43,6 @@ tr.partial td.status-box { background: blue; } .figure { font-size: 120%%; font-weight: bold; } -tr.build-files-list td ul { font-size: 85%; padding: 1em 0 2em 2em; color: #555; } - tr.build-files-list td a { text-decoration: none; }
\ No newline at end of file +tr.build-files-list td { font-size: 85%; padding: 1em 0 2em 2em; color: #555; } + tr.build-files-list td a { text-decoration: none; } + tr.build-files-list td h4 { margin: 0 0 0.6em 0; }
\ No newline at end of file |