diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-03-18 14:08:31 +0100 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-03-18 14:08:31 +0100 |
commit | ccff9ce8d8a2818699ce4e20a310986fc95ea022 (patch) | |
tree | c585ead91c894c621c73b63bc84012709e795151 /lib/image/rename.php | |
parent | 24547ccec6526fcef3cccb34bc35fb81f31236b3 (diff) | |
download | Bits-ccff9ce8d8a2818699ce4e20a310986fc95ea022.tar.gz Bits-ccff9ce8d8a2818699ce4e20a310986fc95ea022.zip |
Added a way of classifying images in folders.
Diffstat (limited to 'lib/image/rename.php')
-rw-r--r-- | lib/image/rename.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/image/rename.php b/lib/image/rename.php deleted file mode 100644 index 0fbc442..0000000 --- a/lib/image/rename.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -require("lib/conf/image.php"); - -$title = "Rename an image"; - -if (count($args) < 3) header("location: index.php"); -$id = intval($args[2]); - -$info = mysql_fetch_assoc(sql("SELECT * FROM images WHERE id = $id")); - -assert_error($info["owner"] == $user["id"], "You cannot rename this image."); - -$name = $info['name']; -if (isset($_POST['name'])) { - $name = esca($_POST['name']); - if ($name == "") { - $error = "You must give a non-empty name to this image. Please."; - } else { - sql("UPDATE images SET name = '" . escs($name) . "' WHERE id = $id"); - header("Location: image"); - die(); - } -} - -$title = "Rename : " . $info['name']; -$fields = array( - array("label" => "New name : ", "name" => "name", "value" => $name), -); -$validate = "Rename"; - -require("tpl/general/form.php"); |