summaryrefslogtreecommitdiff
path: root/lib/image/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/image/index.php')
-rw-r--r--lib/image/index.php22
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/image/index.php b/lib/image/index.php
index 01c0928..59a304d 100644
--- a/lib/image/index.php
+++ b/lib/image/index.php
@@ -2,16 +2,31 @@
require("lib/conf/image.php");
+$filters = array (
+ "order" => array (
+ "name" => "title",
+ "upl_date" => "date uploaded",
+ ),
+ "way" => $ord_ways,
+);
+$fdefaults = array (
+ "order" => "name",
+ "way" => "ASC",
+);
+
$title = "Image upload";
$images = array();
-$files = sql("SELECT * FROM images WHERE owner = " . $user['id']);
+$files = sql("SELECT * FROM images WHERE owner = " . $user['id'] .
+ " ORDER BY " . get_filter('order') . " " . get_filter('way'));
while ($img = mysql_fetch_assoc($files)) $images[] = $img;
-if (count($images) >= $quota && $user['priv'] < $min_priv_for_no_quota) {
+/*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']) {
+} else */
+
+if ($user['priv'] < $apps['image']['upload']) {
$error = "You don't have the rights to upload images.";
$can_upload = false;
} else {
@@ -19,5 +34,6 @@ if (count($images) >= $quota && $user['priv'] < $min_priv_for_no_quota) {
}
$can_delete = ($user['priv'] >= $apps['image']['delete'] && $user['id'] != 0);
+$can_rename = ($user['priv'] >= $apps['image']['rename'] && $user['id'] != 0);
require("tpl/image/index.php");