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-05 19:44:44 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-08-05 19:44:44 +0000
commit7ec2132823cf7728efa4043840106b9eb9bba824 (patch)
treeab639449b7ec8fa809baf15748d930ab3f6fa171 /central/trunk/instadisc.php
parentd0794591bad8df620cbff7a97594761491f2fe2a (diff)
downloadinstadisc-7ec2132823cf7728efa4043840106b9eb9bba824.tar.gz
instadisc-7ec2132823cf7728efa4043840106b9eb9bba824.tar.bz2
instadisc-7ec2132823cf7728efa4043840106b9eb9bba824.zip
Central: Added automatic IP address update
Now, every time the Client contacts the Central Server, the Central Server checks to see if its IP address has
changed, and if it has, the Central Server updates it in its records. Refs #21.
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r--central/trunk/instadisc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 519070f..5da1d54 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php
@@ -33,6 +33,12 @@ function instaDisc_checkVerification($username, $verification, $verificationID,
33 $insverid = "INSERT INTO oldVerID (username, verID) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $verificationID . ")"; 33 $insverid = "INSERT INTO oldVerID (username, verID) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $verificationID . ")";
34 $insverid2 = mysql_query($insverid); 34 $insverid2 = mysql_query($insverid);
35 35
36 if (($table == 'users') && ($getitem3['ip'] != $_SERVER['REMOTE_ADDR']))
37 {
38 $setuser = "UPDATE users SET ip = \"" . $_SERVER['REMOTE_ADDR'] . "\" WHERE id = " . $getitem3['id'];
39 $setuser2 = mysql_query($setuser);
40 }
41
36 return true; 42 return true;
37 } 43 }
38 } 44 }