diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-13 01:40:34 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-13 01:40:34 +0000 |
commit | 9c7e9acc5c17acf42193efacb8e8183e28c2e402 (patch) | |
tree | 198fe47d86f8fc5f4131b2f8c428f4333339257c /central/trunk/instadisc.php | |
parent | c98908daa9cb992bf485a13ba837aea331419222 (diff) | |
download | instadisc-9c7e9acc5c17acf42193efacb8e8183e28c2e402.tar.gz instadisc-9c7e9acc5c17acf42193efacb8e8183e28c2e402.tar.bz2 instadisc-9c7e9acc5c17acf42193efacb8e8183e28c2e402.zip |
Central: Added encryption key support
See [127]. Refs #10
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r-- | central/trunk/instadisc.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 4c12a39..75a9bf1 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php | |||
@@ -80,6 +80,11 @@ function instaDisc_sendItem($username, $id) | |||
80 | $out .= $name . ': ' . $value . "\r\n"; | 80 | $out .= $name . ': ' . $value . "\r\n"; |
81 | } | 81 | } |
82 | 82 | ||
83 | if ($getitem3['encryptionID'] != 0) | ||
84 | { | ||
85 | $out .= 'Encryption-ID: ' . $getitem3['encryptionID'] . "\r\n"; | ||
86 | } | ||
87 | |||
83 | $out .= "\r\n\r\n"; | 88 | $out .= "\r\n\r\n"; |
84 | 89 | ||
85 | fwrite($fp, $out); | 90 | fwrite($fp, $out); |
@@ -132,7 +137,7 @@ function instaDisc_sendDatabase($cserver) | |||
132 | $client->send($msg); | 137 | $client->send($msg); |
133 | } | 138 | } |
134 | 139 | ||
135 | function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics) | 140 | function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics, $encryptionID) |
136 | { | 141 | { |
137 | $getuser = "SELECT * FROM users WHERE username = \"" . mysql_real_escape_string($username) . "\""; | 142 | $getuser = "SELECT * FROM users WHERE username = \"" . mysql_real_escape_string($username) . "\""; |
138 | $getuser2 = mysql_query($getuser); | 143 | $getuser2 = mysql_query($getuser); |
@@ -143,7 +148,7 @@ function instaDisc_addItem($username, $subscription, $title, $author, $url, $sem | |||
143 | $setuser = "UPDATE users SET nextItemID = nextItemID+1 WHERE username = \"" . mysql_real_escape_string($username) . "\""; | 148 | $setuser = "UPDATE users SET nextItemID = nextItemID+1 WHERE username = \"" . mysql_real_escape_string($username) . "\""; |
144 | $setuser2 = mysql_query($setuser); | 149 | $setuser2 = mysql_query($setuser); |
145 | 150 | ||
146 | $insitem = "INSERT INTO inbox (username, itemID, subscription, title, author, url, semantics) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $itemID . ", \"" . mysql_real_escape_string($subscription) . "\", \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($author) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($semantics) . "\")"; | 151 | $insitem = "INSERT INTO inbox (username, itemID, subscription, title, author, url, semantics, encryptionID) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $itemID . ", \"" . mysql_real_escape_string($subscription) . "\", \"" . mysql_real_escape_string($title) . "\", \"" . mysql_real_escape_string($author) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($semantics) . "\",\" . $encryptionID . "\")"; |
147 | $insitem2 = mysql_query($insitem); | 152 | $insitem2 = mysql_query($insitem); |
148 | 153 | ||
149 | instaDisc_sendItem($username, $itemID); | 154 | instaDisc_sendItem($username, $itemID); |