about summary refs log tree commit diff stats
path: root/central/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'central/trunk')
-rw-r--r--central/trunk/includes/instadisc.php24
1 files changed, 21 insertions, 3 deletions
diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index 4355bf5..1426785 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php
@@ -5,7 +5,7 @@
5include_once('includes/db.php'); 5include_once('includes/db.php');
6include_once('includes/class.phpmailer.php'); 6include_once('includes/class.phpmailer.php');
7 7
8function instaDisc_checkVerification($username, $verification, $verificationID, $table, $nameField, $passField) 8function instaDisc_checkVerification($username, $verification, $verificationID, $table, $nameField, $passField, $comeAgain = false, $comeAgainURL = '', $comeAgainMethod = '', $comeAgainSignature = '')
9{ 9{
10 $getverid = "SELECT * FROM oldVerID WHERE username = \"" . mysql_real_escape_string($username) . "\" AND verID = " . $verificationID; 10 $getverid = "SELECT * FROM oldVerID WHERE username = \"" . mysql_real_escape_string($username) . "\" AND verID = " . $verificationID;
11 $getverid2 = mysql_query($getverid); 11 $getverid2 = mysql_query($getverid);
@@ -42,6 +42,24 @@ function instaDisc_checkVerification($username, $verification, $verificationID,
42 return true; 42 return true;
43 } 43 }
44 } 44 }
45 } else {
46 if ($comeAgain)
47 {
48 $cserver = $_SERVER['SERVER_NAME'];
49 $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_real_escape_string($cserver) . "\"";
50 $getuk2 = mysql_query($getuk);
51 $getuk3 = mysql_fetch_array($getuk2);
52
53 $verID = rand(1,2147483647);
54
55 $client = new xmlrpc_client($comeAgainURL);
56 $msg = new xmlrpcmsg("InstaDisc.comeAgain", array( new xmlrpcval($cserver, 'string'),
57 new xmlrpcval(md5($cserver . ":" . $getuk3['code'] . ":" . $verID), 'string'),
58 new xmlrpcval($verID, 'int'),
59 new xmlrpcval($comeAgainMethod, 'string'),
60 new xmlrpcval(serialize($comeAgainSignature), 'string')));
61 $client->send($msg);
62 }
45 } 63 }
46 64
47 return false; 65 return false;
@@ -121,7 +139,7 @@ function instaDisc_sendDatabase($cserver)
121 $i++; 139 $i++;
122 } 140 }
123 141
124 $cserver2 = $_SERVER['HTTP_HOST']; 142 $cserver2 = $_SERVER['SERVER_NAME'];
125 $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_real_escape_string($cserver2) . "\""; 143 $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_real_escape_string($cserver2) . "\"";
126 $getuk2 = mysql_query($getuk); 144 $getuk2 = mysql_query($getuk);
127 $getuk3 = mysql_fetch_array($getuk2); 145 $getuk3 = mysql_fetch_array($getuk2);
@@ -184,7 +202,7 @@ function instaDisc_sendActivationEmail($username, $password, $email)
184 $mail = instaDisc_phpMailer(); 202 $mail = instaDisc_phpMailer();
185 $mail->AddAddress($email, $username); 203 $mail->AddAddress($email, $username);
186 $mail->Subject = 'InstaDisc Account Verification'; 204 $mail->Subject = 'InstaDisc Account Verification';
187 $mail->Body = "Hello, someone has recently registered an account at " . $_SERVER['HTTP_HOST'] . " with your email address. If that was you, and your chosen username IS " . $username . ", then copy the account verification code below to our Account Verification page, enter your username and press Activate!\r\n\r\n" . $penKey . "\r\n\r\nIf that was not you, copy the above code to our Account Verification page, enter the above username, and click Delete."; 205 $mail->Body = "Hello, someone has recently registered an account at " . $_SERVER['SERVER_NAME'] . " with your email address. If that was you, and your chosen username IS " . $username . ", then copy the account verification code below to our Account Verification page, enter your username and press Activate!\r\n\r\n" . $penKey . "\r\n\r\nIf that was not you, copy the above code to our Account Verification page, enter the above username, and click Delete.";
188 $mail->Send(); 206 $mail->Send();
189 207
190 return ($mail->IsError() ? $mail->ErrorInfo : true); 208 return ($mail->IsError() ? $mail->ErrorInfo : true);