summaryrefslogtreecommitdiff
path: root/deldocument.php
diff options
context:
space:
mode:
Diffstat (limited to 'deldocument.php')
-rw-r--r--deldocument.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/deldocument.php b/deldocument.php
new file mode 100644
index 0000000..a677367
--- /dev/null
+++ b/deldocument.php
@@ -0,0 +1,46 @@
+<?php
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+?>
+<?php
+/* vim: set ts=4 sw=4 et : */
+
+require_once __DIR__ . "/session.php";
+require_once __DIR__ . "/../includes/common.php";
+require_once __DIR__ . "/config.php";
+
+if (isset($_SESSION['ds']))
+ $_ds = true;
+
+include_once __DIR__ . "/header.php";
+
+if (!isset($_SESSION['admin']) || !isset($_GET['uid']) || !isset($_GET['filename']))
+ exit(0);
+
+$uid = $_GET['uid'];
+$fn = $_GET['filename'];
+
+if (strlen($fn) < 5 || strlen($uid) < 1)
+ exit(0);
+
+unlink('/var/www/uploads/' . basename($uid) . '_/' . basename($fn));
+?>
+
+ <p>Das Dokument wurde gelöscht.</p>
+
+ <p>
+ <button onclick="history.back();">Zur&uuml;ck</button>
+ </p>
+
+<?
+include_once __DIR__ . "/footer.php";
+?>