-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.php
47 lines (43 loc) · 1.04 KB
/
action.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
define("IN_STORYBOT", 1);
require_once("config/config.php");
if(!is_mod(mod_id())) {
header("Location: index.php");
}
$_GET['sid'] = $db->real_escape_string($_GET['sid']);
if(($_GET['sid'] != "") && ($_GET['type'] != "")) {
if($_GET['type'] == "0") {
postMedia($_GET['sid']);
header("Location: mod.php");
} elseif($_GET['type'] == "1") {
rejectImage($_GET['sid']);
header("Location: mod.php");
} elseif($_GET['type'] == "2") {
reportImage($_GET['sid']);
header("Location: mod.php");
} elseif($_GET['type'] == "-1") {
if(is_admin(mod_id())) {
banUser($_GET['sid'], 0);
}
header("Location: mod.php");
} elseif($_GET['type'] == "-2") {
if(is_admin(mod_id())) {
banUser($_GET['sid'], 1);
}
header("Location: reports.php");
} elseif($_GET['type'] == "-3") {
if(is_admin(mod_id())) {
removeReport($_GET['sid']);
}
header("Location: reports.php");
}
}
if($_GET['type'] == "register") {
if(!is_mod(mod_id())) {
addModerator(mod_id());
header("Location: mod.php");
} else {
header("Location: mod.php");
}
}
?>