summaryrefslogtreecommitdiff
path: root/tpl/file/folder.php
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-06-21 16:34:27 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-06-21 16:34:27 +0200
commit889e8eaf7c40817663dd602a21ac771062ccac3b (patch)
treeca8ac81ee202165333e5ffe16147d09e5cdaf2ab /tpl/file/folder.php
parent5c4caed8560d5fded00525844dfa8386b97e7918 (diff)
downloadBits-889e8eaf7c40817663dd602a21ac771062ccac3b.tar.gz
Bits-889e8eaf7c40817663dd602a21ac771062ccac3b.zip
Big change, sir. Can now upload any kind of files.
Diffstat (limited to 'tpl/file/folder.php')
-rw-r--r--tpl/file/folder.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/tpl/file/folder.php b/tpl/file/folder.php
new file mode 100644
index 0000000..d7ebd73
--- /dev/null
+++ b/tpl/file/folder.php
@@ -0,0 +1,56 @@
+<?php
+require("tpl/general/top.php");
+
+if ($can_edit) {
+ echo '<div class="small_right"><a href="editfld-file-' . $fldid . '">edit folder info</a> | ';
+ echo '<a href="delfld-file-' . $fldid . '">delete folder</a></div>';
+}
+
+echo $fld['comment_html'];
+
+if (count($files) == 0) {
+ echo '<div class="message">This folder has no files.</div>';
+} else {
+ echo '<div class="ordering_links">' . filters_html_full() . '</div>';
+ echo '<table><tr><th width="' . ($img_mini_width) . 'px"></th><th>Info</th><th>Date</th></tr>';
+ foreach ($files as $fl) {
+ $min = $baseurl . $fl['id'] . "-min." . $fl['extension'];
+ $flf = $baseurl . $fl['id'] . "." . $fl['extension'];
+ echo '<tr><td style="text-align: center; vertical-align: middle"><a href="' . $flf . '">';
+ if (has_mini($fl['extension'])) {
+ echo '<img src="' . $min . '" />';
+ } else {
+ echo 'download';
+ }
+ echo '</a></td>';
+ echo '<td><strong>' . $fl['name'] . '</strong>';
+ echo '<br />' . $fl['comment_html'] . '<br />';
+ echo '</td>';
+ echo '<td>' . $fl['upl_date'] . '<br />';
+ if ($can_edit) echo '<br /><a href="delete-file-' . $fl['id'] . '">delete</a>';
+ if ($can_edit) echo '<br /><a href="editinfo-file-' . $fl['id'] . '">edit info</a>';
+ echo '</td></tr>';
+ }
+ echo '</table>';
+}
+
+echo '</div><div class="contents-left">';
+if ($is_owner) {
+ echo '<h1>Your folders</h1>';
+} else {
+ echo '<h1>' . $fld["ownername"] . "'s folders</h1>";
+}
+echo '<ul>';
+foreach ($folders as $f) {
+ if ($f['id'] == $fldid) {
+ echo '<li>' . $f['name'] . '</li>';
+ } else {
+ echo '<li><a href="folder-file-' . $f['id'] . '">' . $f['name'] . '</a></li>';
+ }
+}
+if ($is_owner) {
+ echo '<li><a class="tool_link" href="newfld-file">[+] New folder</a></li>';
+}
+echo '</ul>';
+
+require("tpl/general/bottom.php");