summary refs log tree commit diff stats
path: root/includes/updatePending.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/updatePending.php')
-rw-r--r--includes/updatePending.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/includes/updatePending.php b/includes/updatePending.php new file mode 100644 index 0000000..a96a2b6 --- /dev/null +++ b/includes/updatePending.php
@@ -0,0 +1,51 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 includes/updatePending.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25//$disablePendingQueue = 1; // Use this when Four Island goes down
26
27if (!isset($disablePendingQueue))
28{
29 $gettime = "SELECT * FROM config WHERE name = \"lastUpdate\"";
30 $gettime2 = mysql_query($gettime);
31 $gettime3 = mysql_fetch_array($gettime2);
32 if (($gettime3['value'] != date('md')) && (time() > strtotime('12:30')))
33 {
34 $cntpending = "SELECT COUNT(*) FROM pending";
35 $cntpending2 = mysql_query($cntpending);
36 $cntpending3 = mysql_fetch_array($cntpending2);
37 if ($cntpending3[0] != 0)
38 {
39 $getpost = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1";
40 $getpost2 = mysql_query($getpost);
41 $getpost3 = mysql_fetch_array($getpost2);
42
43 postBlogPost($getpost3['title'], $getpost3['author'], $getpost3['tag1'], $getpost3['tag2'], $getpost3['tag3'], $getpost3['text']);
44
45 $delpost = "DELETE FROM pending WHERE id = " . $getpost3['id'];
46 $delpost2 = mysql_query($delpost);
47 }
48 }
49}
50
51?>