Added api call to delete device

This commit is contained in:
laf
2014-09-17 21:03:02 +01:00
parent d40244cb06
commit 8790bfee0a
4 changed files with 88 additions and 6 deletions
+22
View File
@@ -940,4 +940,26 @@ function validate_device_id($id)
}
return($return);
}
function get_device_id($hostname)
{
global $config;
if(empty($hostname))
{
$return = false;
}
else
{
$device_id = dbFetchCell("SELECT `device_id` FROM `devices` WHERE `hostname` = ?", array($hostname));
if(empty($device_id))
{
$return = false;
}
else
{
$return = $device_id;
}
}
return $return;
}
?>