diff options
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r-- | central/trunk/instadisc.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index f8f33e5..f4fcd1e 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php | |||
@@ -19,4 +19,42 @@ function instaDisc_checkVerification($username, $verification, $verificationID, | |||
19 | return false; | 19 | return false; |
20 | } | 20 | } |
21 | 21 | ||
22 | function instaDisc_sendItem($username, $id) | ||
23 | { | ||
24 | } | ||
25 | |||
26 | function instaDisc_sendUpdateNotice($softwareVersion) | ||
27 | { | ||
28 | $username = getConfig('owner'); | ||
29 | $subscription = 'http://' . $_SERVER['HTTP_HOST']; | ||
30 | $title = 'Update your software to ' . $software; | ||
31 | $author = 'Hatkirby'; | ||
32 | $url = 'http://fourisland.com/projects/instadisc/wiki/CentralSoftwareUpdate'; | ||
33 | $semantics = array(); | ||
34 | |||
35 | instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics); | ||
36 | } | ||
37 | |||
38 | function instaDisc_sendDatabase($cserver) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics) | ||
43 | { | ||
44 | $getuser = "SELECT * FROM users WHERE username = \"" . $username . "\""; | ||
45 | $getuser2 = mysql_query($getuser); | ||
46 | $getuser3 = mysql_fetch_array($getuser2); | ||
47 | if ($getuser3['username'] == $username) | ||
48 | { | ||
49 | $itemID = $getuser3['nextItemID']; | ||
50 | $setuser = "UPDATE users SET nextItemID = nextItemID+1 WHERE username = \"" . $username . "\""; | ||
51 | $setuser2 = mysql_query($setuser); | ||
52 | |||
53 | $insitem = "INSERT INTO inbox (username, itemID, subscription, title, author, url, semantics) VALUES (\"" . $username . "\", " . $itemID . ", \"" . $subscription . "\", \"" . $title . "\", \"" . $author . "\", \"" . $url . "\", \"" . serialize($semantics) . "\")"; | ||
54 | $insitem2 = mysql_query($insitem); | ||
55 | |||
56 | instaDisc_sendItem($username, $itemID); | ||
57 | } | ||
58 | } | ||
59 | |||
22 | ?> | 60 | ?> |