about summary refs log tree commit diff stats
path: root/central/trunk/instadisc.php
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-08-04 12:12:25 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-08-04 12:12:25 +0000
commit0df0e5f1e927ea1d04bd5ef3c12be3bc2c72837c (patch)
tree81f557ea530b0748fe5b48fdde961e4d459b0151 /central/trunk/instadisc.php
parent96969d7023cf8703bf9c460e1d54d4e32a076987 (diff)
downloadinstadisc-0df0e5f1e927ea1d04bd5ef3c12be3bc2c72837c.tar.gz
instadisc-0df0e5f1e927ea1d04bd5ef3c12be3bc2c72837c.tar.bz2
instadisc-0df0e5f1e927ea1d04bd5ef3c12be3bc2c72837c.zip
Central: Wrote installation script
Closes #4
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r--central/trunk/instadisc.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 9883116..7ad11ee 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php
@@ -91,7 +91,7 @@ function instaDisc_sendDatabase($cserver)
91 $i=0; 91 $i=0;
92 while ($getdb3[$i] = mysql_fetch_array($getdb2)) 92 while ($getdb3[$i] = mysql_fetch_array($getdb2))
93 { 93 {
94 $db[$getdb3[$i]['url']]['key'] = $getdb3[$i]['key']; 94 $db[$getdb3[$i]['url']]['code'] = $getdb3[$i]['code'];
95 $db[$getdb3[$i]['url']]['xmlrpc'] = $getdb3[$i]['xmlrpc']; 95 $db[$getdb3[$i]['url']]['xmlrpc'] = $getdb3[$i]['xmlrpc'];
96 $i++; 96 $i++;
97 } 97 }
@@ -105,7 +105,7 @@ function instaDisc_sendDatabase($cserver)
105 105
106 $client = new xmlrpc_client($cserver); 106 $client = new xmlrpc_client($cserver);
107 $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'), 107 $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'),
108 new xmlrpcval(md5($cserver2 + ":" + $getuk3['key'] + ":" + $verID), 'string'), 108 new xmlrpcval(md5($cserver2 + ":" + $getuk3['code'] + ":" + $verID), 'string'),
109 new xmlrpcval($verID, 'int'), 109 new xmlrpcval($verID, 'int'),
110 new xmlrpcval($db, 'array'))); 110 new xmlrpcval($db, 'array')));
111 $client->send($msg); 111 $client->send($msg);
@@ -152,7 +152,7 @@ function instaDisc_sendActivationEmail($username, $password, $email)
152{ 152{
153 $penKey = md5(rand(1,65536)); 153 $penKey = md5(rand(1,65536));
154 154
155 $inspending = "INSERT INTO pending (username, password, email, key) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string(md5($password)) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")"; 155 $inspending = "INSERT INTO pending (username, password, email, code) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string(md5($password)) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")";
156 $inspending2 = mysql_query($inspending); 156 $inspending2 = mysql_query($inspending);
157 157
158 $mail = instaDisc_phpMailer(); 158 $mail = instaDisc_phpMailer();
@@ -165,7 +165,7 @@ function instaDisc_sendActivationEmail($username, $password, $email)
165 165
166function instaDisc_activateAccount($username, $penKey) 166function instaDisc_activateAccount($username, $penKey)
167{ 167{
168 $getuser = "SELECT * FROM pending WHERE username = \"" . mysql_real_escape_string($username) . "\" AND key = \"" . mysql_real_escape_string($penKey) . "\""; 168 $getuser = "SELECT * FROM pending WHERE username = \"" . mysql_real_escape_string($username) . "\" AND code = \"" . mysql_real_escape_string($penKey) . "\"";
169 $getuser2 = mysql_query($getuser); 169 $getuser2 = mysql_query($getuser);
170 $getuser3 = mysql_fetch_array($getuser2); 170 $getuser3 = mysql_fetch_array($getuser2);
171 if ($getuser3['username'] == $username) 171 if ($getuser3['username'] == $username)
@@ -189,7 +189,7 @@ function instaDisc_activateAccount($username, $penKey)
189 189
190function instaDisc_deactivateAccount($username, $penKey) 190function instaDisc_deactivateAccount($username, $penKey)
191{ 191{
192 $getuser = "SELECT * FROM pending WHERE username = \"" . mysql_real_escape_string($username) . "\" AND key = \"" . mysql_real_escape_string($penKey) . "\""; 192 $getuser = "SELECT * FROM pending WHERE username = \"" . mysql_real_escape_string($username) . "\" AND code = \"" . mysql_real_escape_string($penKey) . "\"";
193 $getuser2 = mysql_query($getuser); 193 $getuser2 = mysql_query($getuser);
194 $getuser3 = mysql_fetch_array($getuser2); 194 $getuser3 = mysql_fetch_array($getuser2);
195 if ($getuser3['username'] == $username) 195 if ($getuser3['username'] == $username)
@@ -310,7 +310,7 @@ function instaDisc_listPendingSubscriptions($username)
310 $i=0; 310 $i=0;
311 while ($getsubs3[$i] = mysql_fetch_array($getsubs2)) 311 while ($getsubs3[$i] = mysql_fetch_array($getsubs2))
312 { 312 {
313 $subs[$i] = array('url' => $getsubs3[$i]['url'], 'key' => $getsubs3[$i]['key']); 313 $subs[$i] = array('url' => $getsubs3[$i]['url'], 'code' => $getsubs3[$i]['code']);
314 314
315 $i++; 315 $i++;
316 } 316 }
@@ -328,7 +328,7 @@ function instaDisc_generateSubscriptionActivation($username, $url)
328 { 328 {
329 $key = md5(rand(1,65536)); 329 $key = md5(rand(1,65536));
330 330
331 $inspending = "INSERT INTO pending2 (username, url, key) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($key) . "\")"; 331 $inspending = "INSERT INTO pending2 (username, url, code) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($key) . "\")";
332 $inspending2 = mysql_query($inspending); 332 $inspending2 = mysql_query($inspending);
333 333
334 return $key; 334 return $key;