diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 16:48:29 +0200 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 16:48:29 +0200 |
commit | d0060968b77c39bdf8abffb071c971c166b59edb (patch) | |
tree | 0be52e00a25bd298235a0cf916fb07496d3ab95f /lib/image/index.php | |
download | Bits-d0060968b77c39bdf8abffb071c971c166b59edb.tar.gz Bits-d0060968b77c39bdf8abffb071c971c166b59edb.zip |
First commit.
Diffstat (limited to 'lib/image/index.php')
-rw-r--r-- | lib/image/index.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/image/index.php b/lib/image/index.php new file mode 100644 index 0000000..01c0928 --- /dev/null +++ b/lib/image/index.php @@ -0,0 +1,23 @@ +<?php + +require("lib/conf/image.php"); + +$title = "Image upload"; + +$images = array(); +$files = sql("SELECT * FROM images WHERE owner = " . $user['id']); +while ($img = mysql_fetch_assoc($files)) $images[] = $img; + +if (count($images) >= $quota && $user['priv'] < $min_priv_for_no_quota) { + $error = "You have already exceeded your quota of $quota uploadable images."; + $can_upload = false; +} else if ($user['priv'] < $apps['image']['upload']) { + $error = "You don't have the rights to upload images."; + $can_upload = false; +} else { + $can_upload = true; +} + +$can_delete = ($user['priv'] >= $apps['image']['delete'] && $user['id'] != 0); + +require("tpl/image/index.php"); |