Added IP saving and blink link

This commit is contained in:
2011-12-23 14:12:05 -07:00
parent 41411775ed
commit cd2d5ba588
3 changed files with 10 additions and 7 deletions

View File

@@ -47,7 +47,8 @@ if($getconfig == "1") {
// When called with id and applied=1, mark as applied
if(strlen($id) > 0 && $applied == "1") {
try {
$updateapplied = $db->prepare("UPDATE DEVICES SET APPLIED=1 WHERE id=:id;");
$updateapplied = $db->prepare("UPDATE DEVICES SET APPLIED=1, CURRENTIP=:currentip WHERE id=:id;");
$updateapplied->bindParam(':currentip', $_SERVER['REMOTE_ADDR']); // store the remote client IP for calling blink.php later
$updateapplied->bindParam(':id', $id);
$updateapplied->execute();
} catch (Exception $e) {