From 8242c982ebcdfc67274c8ab79a2f34aa451872d7 Mon Sep 17 00:00:00 2001 From: "cohen.jacob" Date: Thu, 13 Aug 2009 05:09:54 +0000 Subject: Initial port of rafb.net codebase from rafb.net to Google Code. git-svn-id: http://rafb-nopaste.googlecode.com/svn/trunk@2 6adb9682-87ac-11de-b610-71a7c637a048 --- paste/remove.php | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 paste/remove.php (limited to 'paste/remove.php') diff --git a/paste/remove.php b/paste/remove.php new file mode 100644 index 0000000..80e8bd6 --- /dev/null +++ b/paste/remove.php @@ -0,0 +1,77 @@ +\n"; + $return = 0; + } + } + error_reporting($errOld); + return $return; + } + + print "Admin - Remove a paste\n"; + + $ipAddr = $_SERVER["REMOTE_ADDR"]; + if (isset($_REQUEST["p"]) && isset($_REQUEST["t"])) { + $pasteID = $_REQUEST["p"]; + $token = $_REQUEST["t"]; + $tokenMatch = sha1($pasteID . $ipAddr . $Config['token_salt']); + if ($token == $tokenMatch) { + $result = removePaste($pasteID); + if ($result) { + print "Your paste has been removed."; + } else { + print "Sorry, we encountered a problem trying to remove this paste."; + } + } else { + print "Sorry, you are not authorized to remove this paste."; + } + } + + +?> -- cgit v1.2.3