Update index.php
This commit is contained in:
parent
a9d5de2e37
commit
7cf2c7f8b5
|
|
@ -404,22 +404,6 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//register that we have seen the device
|
||||
$sql = "UPDATE v_devices ";
|
||||
$sql .= "SET device_provisioned_date=:date, device_provisioned_method=:method, device_provisioned_ip=:ip ";
|
||||
$sql .= "WHERE domain_uuid=:domain_uuid AND device_mac_address=:mac ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
if ($prep_statement) {
|
||||
//use the prepared statement
|
||||
$prep_statement->bindValue(':domain_uuid', $domain_uuid);
|
||||
$prep_statement->bindValue(':mac', strtolower($mac));
|
||||
$prep_statement->bindValue(':date', date("Y-m-d H:i:s"));
|
||||
$prep_statement->bindValue(':method', (isset($_SERVER["HTTPS"]) ? 'https' : 'http'));
|
||||
$prep_statement->bindValue(':ip', $_SERVER['REMOTE_ADDR']);
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement);
|
||||
}
|
||||
|
||||
//output template to string for header processing
|
||||
$prov = new provision;
|
||||
|
|
|
|||
Loading…
Reference in New Issue