diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2009-02-22 13:15:37 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2009-02-22 13:15:37 -0500 |
commit | eee98526c48b9154cd9e9bc8bc3e07769e6a39ea (patch) | |
tree | 9d8d719a2ccea91de86435ccd985241ddb3fa0cb /admin/add.php | |
parent | 653c7b3a488488d4b161a8fae41ada5851bf7685 (diff) | |
download | pillowcase-eee98526c48b9154cd9e9bc8bc3e07769e6a39ea.tar.gz pillowcase-eee98526c48b9154cd9e9bc8bc3e07769e6a39ea.tar.bz2 pillowcase-eee98526c48b9154cd9e9bc8bc3e07769e6a39ea.zip |
Rewrote Pillowcase
NOTE: There is a new database schema now, so the database from the testing server has to be copied over to the production server, otherwise this code will fail.
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']); ?>! | ||