about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--central/trunk/instadisc.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 9920e51..66032ec 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php
@@ -21,6 +21,33 @@ function instaDisc_checkVerification($username, $verification, $verificationID,
21 21
22function instaDisc_sendItem($username, $id) 22function instaDisc_sendItem($username, $id)
23{ 23{
24 $getitem = "SELECT * FROM inbox WHERE username = \"" . mysql_escape_string($username) . "\" AND itemID = " . $id;
25 $getitem2 = mysql_query($getitem);
26 $getitem3 = mysql_fetch_array($getitem2);
27 if ($getitem3['username'] == $username)
28 {
29 $getuser = "SELECT * FROM users WHERE username = \"" . mysql_escape_string($username) . "\"";
30 $getuser2 = mysql_query($getuser);
31 $getuser3 = mysql_fetch_array($getuser2);
32
33 $fp = fsockopen($getuser3['ip'], 4444, $errno, $errstr);
34 if ($fp)
35 {
36 $verID = rand(1,65536);
37
38 $out = 'ID: ' . $id . '\r\n';
39 $out .= 'Verification: ' . md5($username . ':' . $getuser3['password'] . ':' . $verID) . '\r\n';
40 $out .= 'Verification-ID: ' . $verID . '\r\n';
41 $out .= 'Subscription: ' . $getitem3['subscription'] . '\r\n';
42 $out .= 'Title: ' . $getitem3['title'] . '\r\n';
43 $out .= 'Author: ' . $getitem3['author'] . '\r\n';
44 $out .= 'URL: ' . $getitem3['url'] . '\r\n';
45 $out .= '\r\n\r\n';
46
47 fwrite($fp, $out);
48 fclose($fp);
49 }
50 }
24} 51}
25 52
26function instaDisc_sendUpdateNotice($softwareVersion) 53function instaDisc_sendUpdateNotice($softwareVersion)