summary refs log tree commit diff stats
path: root/pages/delete-comment.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/delete-comment.php')
-rw-r--r--pages/delete-comment.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/pages/delete-comment.php b/pages/delete-comment.php new file mode 100644 index 0000000..f8d1936 --- /dev/null +++ b/pages/delete-comment.php
@@ -0,0 +1,54 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 pages/delete-comment.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25if (!isset($_GET['id']))
26{
27 generateError('404');
28} else {
29 if (isLoggedIn())
30 {
31 $getcomment = "SELECT * FROM comments WHERE id = " . $_GET['id'];
32 $getcomment2 = mysql_query($getcomment);
33 $getcomment3 = mysql_fetch_array($getcomment2);
34
35 if ($getcomment3['id'] == $_GET['id'])
36 {
37 if ((isAdmin()) || (($getcomment3['is_anon'] == 0) && (getSessionUserID() === $getcomment3['user_id'])))
38 {
39 $delcomment = "DELETE FROM comments WHERE id = " . $_GET['id'];
40 $delcomment2 = mysql_query($delcomment);
41
42 header('Location: ' . getCommentUrl($getcomment3));
43 } else {
44 generateError('404');
45 }
46 } else {
47 generateError('404');
48 }
49 } else {
50 generateError('404');
51 }
52}
53
54?>