diff options
Diffstat (limited to 'admin/add.php')
-rw-r--r-- | admin/add.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/admin/add.php b/admin/add.php deleted file mode 100644 index 96a9219..0000000 --- a/admin/add.php +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | $getimage = "SELECT * FROM moderation WHERE id = " . $_GET['id']; | ||
4 | $getimage2 = mysql_query($getimage); | ||
5 | $getimage3 = mysql_fetch_array($getimage2); | ||
6 | |||
7 | $title = $getimage3['title']; | ||
8 | $title = preg_replace('/[^A-Za-z0-9 ]/','',$title); | ||
9 | $title = str_replace(' ', '-', $title); | ||
10 | $title = preg_replace('/-{2,}/','-',$title); | ||
11 | if (substr($title,0,1) == '-') | ||
12 | { | ||
13 | $title = substr($title,1); | ||
14 | } | ||
15 | if (substr($title,strlen($title)-1,1) == '-') | ||
16 | { | ||
17 | $title = substr($title,0,strlen($title)-1); | ||
18 | } | ||
19 | $title = strtolower($title); | ||
20 | rename($_SERVER['DOCUMENT_ROOT'] . '/moderation/' . $getimage3['id'] . '.png', $_SERVER['DOCUMENT_ROOT'] . '/images/' . $title . '.png'); | ||
21 | |||
22 | $insimage = "INSERT INTO pending (title,filename,text,author) VALUES (\"" . $getimage3['title'] . "\",\"" . $title . "\",\"" . $getimage3['text'] . "\",\"" . $getimage3['author'] . "\")"; | ||
23 | $insimage2 = mysql_query($insimage); | ||
24 | |||
25 | $delimage = "DELETE FROM moderation WHERE id = " . $_GET['id']; | ||
26 | $delimage2 = mysql_query($delimage); | ||
27 | |||
28 | ?> | ||
29 | |||
30 | Added comic <?php echo($getimage3['title']); ?>! | ||