summaryrefslogtreecommitdiff
path: root/forum/utils
diff options
context:
space:
mode:
authordeva <deva>2008-10-12 19:24:52 +0000
committerdeva <deva>2008-10-12 19:24:52 +0000
commit42032d4bd8dd0c9772afd6ef7c1b09104cb22e8b (patch)
treece29b897ed9bc5ddfd478f26c87791a48b54be85 /forum/utils
parent15a4531b0cf36db097169bd2aef567231a12bd24 (diff)
Some layout (css) stuff on the filehandler.
Diffstat (limited to 'forum/utils')
-rw-r--r--forum/utils/filehandler.php2
-rw-r--r--forum/utils/files.php36
2 files changed, 28 insertions, 10 deletions
diff --git a/forum/utils/filehandler.php b/forum/utils/filehandler.php
index dfe0c80..af1c305 100644
--- a/forum/utils/filehandler.php
+++ b/forum/utils/filehandler.php
@@ -22,7 +22,7 @@ $files->show();
?>
-<form enctype="multipart/form-data" action="?mode=filehandler&amp;task=upload" method="post">
+<form class="files" enctype="multipart/form-data" action="?mode=filehandler&amp;task=upload" method="post">
<p>
File: <input name="userfile" type="file">
</p>
diff --git a/forum/utils/files.php b/forum/utils/files.php
index 57dc42d..62b2b52 100644
--- a/forum/utils/files.php
+++ b/forum/utils/files.php
@@ -18,17 +18,18 @@ class File {
public function show()
{
global $PERMSTORE, $current_user, $users;
- echo "<div class=\"file\">\n";
+ echo " <div class=\"file\">\n";
if($current_user->uid == 0) {
- echo " <a class=\"delete\" href=\"?mode=filehandler&amp;task=delete&amp;fid=" . $this->fid . "\">Delete</a>\n";
+ echo " <a class=\"delete\" href=\"?mode=filehandler&amp;task=delete&amp;fid=" . $this->fid . "\">X</a>\n";
}
- echo " <div class=\"preview\"><img src=\"?mode=file&amp;preview=1&amp;fid=" . $this->fid . "\"</div>\n";
- echo " <div class=\"filename\">Filename: <a href=\"" . $this->link() . "\">" . $this->name . "</a> (" . $this->mimetype. ")</div>\n";
- echo " <div class=\"fileuser\">Uploaded by: " . $users->getUser($this->uid)->name . "</div>\n";
- echo " <div class=\"filedate\">" . date("c", $this->date) . "</div>\n";
- echo " <div class=\"filesize\">Size: " . ceil(filesize($PERMSTORE . "/" . $this->fid) / 1024) . "kb</div>\n";
- echo " <div class=\"insertcommand\">Use this command to insert the file: {{" . $this->fid . "}}</div>\n";
- echo "</div>\n";
+ echo " <div class=\"preview\"><a href=\"" . $this->link() . "\"><img src=\"?mode=file&amp;preview=1&amp;fid=" . $this->fid . "\"</a></div>\n";
+ echo " <div class=\"insertcommand\">{{" . $this->fid . "}}</div>\n";
+ echo " <div class=\"filename\"><a href=\"" . $this->link() . "\">" . $this->name . "</a></div>\n";
+ echo " <div class=\"mimetype\">" . $this->mimetype. "</div>\n";
+ echo " <div class=\"fileuser\">" . $users->getUser($this->uid)->name . "</div>\n";
+ echo " <div class=\"filesize\">" . ceil(filesize($PERMSTORE . "/" . $this->fid) / 1024) . "kb</div>\n";
+ echo " <div class=\"filedate\">" . date("M jS Y - G:i", $this->date) . "</div>\n";
+ echo " </div>\n";
}
public function File($fid, $uid, $name, $date, $mimetype)
@@ -81,9 +82,26 @@ class Files {
public function show()
{
+ global $current_user;
+ echo "<div class=\"files\">\n";
+ echo " <div class=\"file\">\n";
+ echo " <div class=\"fileheader\">\n";
+ if($current_user->uid == 0) {
+ echo " <div class=\"delete\"></div>\n";
+ }
+ echo " <div class=\"preview\">Preview</div>\n";
+ echo " <div class=\"insertcommand\">Command</div>\n";
+ echo " <div class=\"filename\">Filename</div>\n";
+ echo " <div class=\"mimetype\">Mimetype</div>\n";
+ echo " <div class=\"fileuser\">User</div>\n";
+ echo " <div class=\"filesize\">Size</div>\n";
+ echo " <div class=\"filedate\">Date</div>\n";
+ echo " </div>\n";
+ echo " </div>\n";
foreach($this->files as $file) {
$file->show();
}
+ echo "</div>\n";
}
public function getFile($fid)