summaryrefslogtreecommitdiff
path: root/lib/image/delete.php
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-06-21 16:34:27 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-06-21 16:34:27 +0200
commit889e8eaf7c40817663dd602a21ac771062ccac3b (patch)
treeca8ac81ee202165333e5ffe16147d09e5cdaf2ab /lib/image/delete.php
parent5c4caed8560d5fded00525844dfa8386b97e7918 (diff)
downloadBits-889e8eaf7c40817663dd602a21ac771062ccac3b.tar.gz
Bits-889e8eaf7c40817663dd602a21ac771062ccac3b.zip
Big change, sir. Can now upload any kind of files.
Diffstat (limited to 'lib/image/delete.php')
-rw-r--r--lib/image/delete.php21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/image/delete.php b/lib/image/delete.php
deleted file mode 100644
index e6716ec..0000000
--- a/lib/image/delete.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-require("lib/conf/image.php");
-
-$title = "Delete 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"));
-
-if ($info["owner"] == $user["id"]) {
- token_validate("Do you really want to delete this image ?", "image");
- unlink($savedir . $id . "-min." . $info["extension"]);
- unlink($savedir . $id . "." . $info["extension"]);
- sql("DELETE FROM images WHERE id = $id");
- header("location: image");
-} else {
- $error = "You cannot delete this image.";
-}
-require("tpl/general/empty.php");