From 889e8eaf7c40817663dd602a21ac771062ccac3b Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Thu, 21 Jun 2012 16:34:27 +0200 Subject: Big change, sir. Can now upload any kind of files. --- tpl/file/folder.php | 56 +++++++++++++++++++++++++++++++++++++++++++++ tpl/file/index.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ tpl/file/upload-ok.php | 21 +++++++++++++++++ tpl/file/upload.php | 16 +++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 tpl/file/folder.php create mode 100644 tpl/file/index.php create mode 100644 tpl/file/upload-ok.php create mode 100644 tpl/file/upload.php (limited to 'tpl/file') 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 @@ +edit folder info | '; + echo 'delete folder'; +} + +echo $fld['comment_html']; + +if (count($files) == 0) { + echo '
This folder has no files.
'; +} else { + echo ''; + echo ''; + foreach ($files as $fl) { + $min = $baseurl . $fl['id'] . "-min." . $fl['extension']; + $flf = $baseurl . $fl['id'] . "." . $fl['extension']; + echo ''; + echo ''; + echo ''; + } + echo '
InfoDate
'; + if (has_mini($fl['extension'])) { + echo ''; + } else { + echo 'download'; + } + echo '' . $fl['name'] . ''; + echo '
' . $fl['comment_html'] . '
'; + echo '
' . $fl['upl_date'] . '
'; + if ($can_edit) echo '
delete'; + if ($can_edit) echo '
edit info'; + echo '
'; +} + +echo '
'; +if ($is_owner) { + echo '

Your folders

'; +} else { + echo '

' . $fld["ownername"] . "'s folders

"; +} +echo ''; + +require("tpl/general/bottom.php"); diff --git a/tpl/file/index.php b/tpl/file/index.php new file mode 100644 index 0000000..dc8cb52 --- /dev/null +++ b/tpl/file/index.php @@ -0,0 +1,61 @@ +You have uploaded no files yet.
'; +} else { + echo '

You have uploaded ' . count($files) .' files.

'; + echo ''; + echo ''; + foreach ($files as $fl) { + $min = $baseurl . $fl['id'] . "-min." . $fl['extension']; + $flf = $baseurl . $fl['id'] . "." . $fl['extension']; + echo ''; + echo ''; + echo ''; + } + echo '
InfoDate
'; + if (has_mini($fl['extension'])) { + echo ''; + } else { + echo 'download'; + } + echo '' . $fl['name'] . ''; + if ($fl['folder_id'] != 0) { + echo ' (in folder: ' . $fl['folder_name'] . ')'; + } + echo '
MD: ' . (has_mini($fl['extension']) ? '!' : '') . '['.$fl['name'].']('.$flf.')'; + echo '
' . $fl['comment_html'] . '
'; + /*echo 'Miniature: ' . $min . '
'; + echo 'Image: ' . $flf . '
'; */ + echo '
' . $fl['upl_date'] . '
'; + if ($can_delete) echo '
delete'; + if ($can_rename) echo '
edit info'; + echo '
'; +} + +if ($can_upload) { +?> + +
+

Upload a file

+
+If you upload an image, a px preview will be created.

+Title :
+
+
+ +

+

Your folders

+ + +

Preview :
+ Image :
+ Markdown code : ]()

+

+

+ Back to upload form + = $apps['file']['index']) + echo ' - back to list of uploaded files'; + ?> +

+ "Image file : ", "type" => "file", "name" => "file"), + array("label" => "Image title (optionnal) : ", "type" => "text", "name" => "name") + ); +$validate = "Upload"; + +require("tpl/general/form.php"); + + -- cgit v1.2.3