summaryrefslogtreecommitdiff
path: root/tpl/file
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/file')
-rw-r--r--tpl/file/folder.php22
-rw-r--r--tpl/file/index.php10
-rw-r--r--tpl/file/upload-ok.php11
3 files changed, 32 insertions, 11 deletions
diff --git a/tpl/file/folder.php b/tpl/file/folder.php
index d7ebd73..61b4ed3 100644
--- a/tpl/file/folder.php
+++ b/tpl/file/folder.php
@@ -12,7 +12,7 @@ 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>';
+ echo '<table><tr><th width="' . ($img_mini_width) . 'px"></th><th>Info</th><th width="120px">Date</th></tr>';
foreach ($files as $fl) {
$min = $baseurl . $fl['id'] . "-min." . $fl['extension'];
$flf = $baseurl . $fl['id'] . "." . $fl['extension'];
@@ -24,17 +24,32 @@ if (count($files) == 0) {
}
echo '</a></td>';
echo '<td><strong>' . $fl['name'] . '</strong>';
+ echo '<br /><strong>MD:</strong> <code>' . (has_mini($fl['extension']) ? '!' : '') . '['.$fl['name'].']('.$flf.')</code>';
echo '<br />' . $fl['comment_html'] . '<br />';
echo '</td>';
- echo '<td>' . $fl['upl_date'] . '<br />';
+ echo '<td>' . $fl['upl_date'];
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>';
+ if ($can_edit) echo ' | <a href="editinfo-file-' . $fl['id'] . '">edit</a>';
echo '</td></tr>';
}
echo '</table>';
}
echo '</div><div class="contents-left">';
+
+if ($is_owner) {
+ ?>
+<h1>Upload a file</h1>
+<form method="POST" action="index.php?p=upload-file" enctype="multipart/form-data">
+If you upload an image, a <?php echo $img_mini_width; ?>px preview will be created.<br /><br />
+Title : <input type="text" name="name" style="width: 200px;" ><br />
+<input type="file" name="file" /><br />
+<input type="hidden" name="folder" value="<?php echo $fldid; ?>" />
+<input type="submit" value="Upload" /></form>
+<br /><br />
+ <?php
+}
+
if ($is_owner) {
echo '<h1>Your folders</h1>';
} else {
@@ -49,6 +64,7 @@ foreach ($folders as $f) {
}
}
if ($is_owner) {
+ echo '<li><a class="tool_link" href="file">[files in no folder]</a></li>';
echo '<li><a class="tool_link" href="newfld-file">[+] New folder</a></li>';
}
echo '</ul>';
diff --git a/tpl/file/index.php b/tpl/file/index.php
index dc8cb52..abc340a 100644
--- a/tpl/file/index.php
+++ b/tpl/file/index.php
@@ -2,11 +2,11 @@
require("tpl/general/top.php");
if (count($files) == 0) {
- echo '<div class="message">You have uploaded no files yet.</div>';
+ echo '<p>You have no files that are uploaded and not put in a folder.</p>';
} else {
- echo '<p>You have uploaded ' . count($files) .' files.</p>';
+ echo '<p>You have ' . count($files) .' files uploaded in no folder. Select a folder to view the files it contains.</p>';
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>';
+ echo '<table><tr><th width="' . ($img_mini_width) . 'px"></th><th>Info</th><th width="120px">Date</th></tr>';
foreach ($files as $fl) {
$min = $baseurl . $fl['id'] . "-min." . $fl['extension'];
$flf = $baseurl . $fl['id'] . "." . $fl['extension'];
@@ -26,9 +26,9 @@ if (count($files) == 0) {
/*echo '<strong>Miniature:</strong> <a href="' . $min . '">' . $min . '</a><br />';
echo '<strong>Image:</strong> <a href="' . $flf . '">' . $flf . '</a><br />'; */
echo '</td>';
- echo '<td>' . $fl['upl_date'] . '<br />';
+ echo '<td>' . $fl['upl_date'] . '';
if ($can_delete) echo '<br /><a href="delete-file-' . $fl['id'] . '">delete</a>';
- if ($can_rename) echo '<br /><a href="editinfo-file-' . $fl['id'] . '">edit info</a>';
+ if ($can_rename) echo ' | <a href="editinfo-file-' . $fl['id'] . '">edit</a>';
echo '</td></tr>';
}
echo '</table>';
diff --git a/tpl/file/upload-ok.php b/tpl/file/upload-ok.php
index a0edee1..1d6559f 100644
--- a/tpl/file/upload-ok.php
+++ b/tpl/file/upload-ok.php
@@ -10,10 +10,15 @@ $imgurl = $baseurl . $id . "." . $type;
Markdown code : <code><?php echo (has_mini($type) ? '!' : '') . '[' . $name; ?>](<?php echo $imgurl; ?>)</code></p>
<p>
<p>
- <a href="upload-file">Back to upload form</a>
+ <a href="upload-file">back to upload form</a>
<?php
- if ($user['priv'] >= $apps['file']['index'])
- echo ' - <a href="index-file">back to list of uploaded files</a>';
+ if ($user['priv'] >= $apps['file']['index']) {
+ echo ' | <a href="index-file">back to list of uploaded files</a>';
+ if ($folder != 0) {
+ echo ' | <a href="folder-file-' . $folder . '">go to folder</a>';
+ }
+ echo ' | <a href="editinfo-file-' . $id . '">edit file info</a>';
+ }
?>
</p>
<?php