4 <th
class="perm">Permissions
</th
>
5 <th
class="name">Name
</th
>
6 <th
class="dl">Download
</th
>
11 foreach ($page['entries'] as $e) {
12 if (strlen($page['path']) > 0) {
13 $path = $page['path'] .'/'. $e['name'];
18 if ($e['type'] === 'blob') {
20 echo "\t<td>$e[mode]</td>\n";
21 echo "\t<td><a href=\"". makelink(array('a' => 'viewblob', 'p' => $page['project'], 'h' => $e['hash'], 'hb' => $page['commit_id'], 'f' => $path)) ."\">". htmlspecialchars($e['name']) ."</a></td>\n";
22 echo "\t<td><a href=\"". makelink(array('a' => 'blob', 'p' => $page['project'], 'h' => $e['hash'], 'n' => $e['name'])) ."\">blob</a></td>\n";
25 echo "<tr class=\"dir\">\n";
26 echo "\t<td>$e[mode]</td>\n";
27 echo "\t<td><a href=\"" .makelink(array('a' => 'tree', 'p' => $page['project'], 'h' => $e['hash'], 'hb' => $page['commit_id'], 'f' => $path)) ."\">". htmlspecialchars($e['name']) ."/</a></td>\n";
28 echo "\t<td><a href=\"". makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $e['hash'], 't' => 'targz', 'n' => $e['name'])) ."\">tar.gz</a> / <a href=\"". makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $e['hash'], 't' => 'zip', 'n' => $e['name'])) ."\">zip</a></td>\n";
36 <p
>Download
as <a href
="<?php echo makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $page['tree_id'], 't' => 'targz')) ?>">tar
.gz
</a
> or <a href
="<?php echo makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $page['tree_id'], 't' => 'zip')) ?>">zip
</a
>. Browse this tree at the
<a href
="<?php echo makelink(array('a' => 'tree', 'p' => $page['project'], 'hb' => 'HEAD', 'f' => $page['path'])); ?>">HEAD
</a
>.</p
>