diff options
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); | 
