diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2009-02-20 17:56:07 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2009-02-20 17:56:07 -0500 |
commit | c4d15b02d79a78c14a9a6cc83e76cbdf9a0d0952 (patch) | |
tree | 71773a3559897828bc78012047d4c70cd40ababa /header.php | |
download | pillowcase-c4d15b02d79a78c14a9a6cc83e76cbdf9a0d0952.tar.gz pillowcase-c4d15b02d79a78c14a9a6cc83e76cbdf9a0d0952.tar.bz2 pillowcase-c4d15b02d79a78c14a9a6cc83e76cbdf9a0d0952.zip |
Created Pillowcase
Diffstat (limited to 'header.php')
-rw-r--r-- | header.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/header.php b/header.php new file mode 100644 index 0000000..3b0dc8b --- /dev/null +++ b/header.php | |||
@@ -0,0 +1,46 @@ | |||
1 | <?php | ||
2 | |||
3 | if (isset($title)) | ||
4 | { | ||
5 | $rtitle = 'Pillowcase - ' . $title; | ||
6 | } else { | ||
7 | $rtitle = 'Pillowcase'; | ||
8 | } | ||
9 | |||
10 | ?><HTML> | ||
11 | <HEAD> | ||
12 | <TITLE><?php echo($rtitle); ?></TITLE> | ||
13 | <LINK REL="stylesheet" HREF="/style.css"> | ||
14 | </HEAD> | ||
15 | |||
16 | <BODY> | ||
17 | <DIV ID="wrap"> | ||
18 | <DIV ID="header"> | ||
19 | <A HREF="/"><H1>Pillowcase</H1></A> | ||
20 | </DIV> | ||
21 | |||
22 | <?php | ||
23 | |||
24 | include_once('db.php'); | ||
25 | |||
26 | $getlast = mysql_fetch_array(mysql_query("SELECT * FROM config WHERE name = \"lastUpdated\"")); | ||
27 | $last = $getlast['value']; | ||
28 | if ($last != date('md')) | ||
29 | { | ||
30 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
31 | $getpending2 = mysql_query($getpending); | ||
32 | $getpending3 = mysql_fetch_array($getpending2); | ||
33 | if (!empty($getpending3)) | ||
34 | { | ||
35 | $inscomic = "INSERT INTO images (title,filename, text) VALUES (\"" . mysql_real_escape_string($getpending3['title']) . "\",\"" . mysql_real_escape_string($getpending3['filename']) . "\",\"" . mysql_real_escape_string($getpending3['text']) . "\")"; | ||
36 | $inscomic2 = mysql_query($inscomic) or die($inscomic); | ||
37 | |||
38 | $delcomic = "DELETE FROM pending WHERE id = " . $getpending3['id']; | ||
39 | $delcomic2 = mysql_query($delcomic) or die($delcomic); | ||
40 | |||
41 | $setconfig = "UPDATE config SET value = \"" . date('md') . "\" WHERE name = \"lastUpdated\""; | ||
42 | $setconfig2 = mysql_query($setconfig); | ||
43 | } | ||
44 | } | ||
45 | |||
46 | ?> | ||