summary refs log tree commit diff stats
path: root/header.php
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2009-02-22 13:15:37 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2009-02-22 13:15:37 -0500
commiteee98526c48b9154cd9e9bc8bc3e07769e6a39ea (patch)
tree9d8d719a2ccea91de86435ccd985241ddb3fa0cb /header.php
parent653c7b3a488488d4b161a8fae41ada5851bf7685 (diff)
downloadpillowcase-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 'header.php')
-rw-r--r--header.php49
1 files changed, 0 insertions, 49 deletions
diff --git a/header.php b/header.php deleted file mode 100644 index dbbb5bf..0000000 --- a/header.php +++ /dev/null
@@ -1,49 +0,0 @@
1<?php
2
3if (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
24include_once($_SERVER['DOCUMENT_ROOT'] . '/db.php');
25
26$getlast = "SELECT * FROM config WHERE name = \"lastUpdated\"";
27$getlast2 = mysql_query($getlast);
28$getlast3 = mysql_fetch_array($getlast2);
29
30$last = $getlast3['value'];
31if ($last != date('md'))
32{
33 $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1";
34 $getpending2 = mysql_query($getpending);
35 $getpending3 = mysql_fetch_array($getpending2);
36 if (!empty($getpending3))
37 {
38 $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']) . "\")";
39 $inscomic2 = mysql_query($inscomic) or die($inscomic);
40
41 $delcomic = "DELETE FROM pending WHERE id = " . $getpending3['id'];
42 $delcomic2 = mysql_query($delcomic) or die($delcomic);
43
44 $setconfig = "UPDATE config SET value = \"" . date('md') . "\" WHERE name = \"lastUpdated\"";
45 $setconfig2 = mysql_query($setconfig);
46 }
47}
48
49?>