daniel Tartavel
0d35b1ff3f
- beginning to add graphical stats - beginning to add device by type - added a dashboard "etage" - begining to add notification to multiple recipients in freemobile hook
31 lines
872 B
PHP
31 lines
872 B
PHP
<?php
|
|
function insertJavascript()
|
|
{
|
|
global $listenPort;
|
|
return '<script language="javascript">
|
|
<!--
|
|
function setPropertyValue(topic, fn, value, property)
|
|
{
|
|
document.getElementById(topic+"/"+fn+"/"+property+"/value").value = value;
|
|
let xhr = new XMLHttpRequest();
|
|
xhr.open("GET", "http://192.168.1.253:' . $listenPort . '/set&fn="+fn+"&property="+property+"&topic="+topic+"&value="+value);
|
|
xhr.onload = function () {};
|
|
xhr.send();
|
|
}
|
|
|
|
function getPropertyValue(topic, fn, property)
|
|
{
|
|
let xhr = new XMLHttpRequest();
|
|
xhr.open("GET", "http://192.168.1.253:' . $listenPort . '/get&fn="+fn+"&property="+property+"&topic="+topic );
|
|
xhr.onload = function () {};
|
|
xhr.send();
|
|
setTimeout(function()
|
|
{
|
|
location.reload();
|
|
}, 1000);
|
|
}
|
|
// -->
|
|
</script>';
|
|
}
|
|
?>
|