Skip to content

Commit

Permalink
sysvarpin angepasst.
Browse files Browse the repository at this point in the history
sysvarpin angepasst.
  • Loading branch information
christian1180 committed Nov 25, 2024
1 parent 27b77f1 commit c1df80b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion custom/components/sysvarpin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,34 @@


function sysvarpin($component) {
global $interface;
// definiere Interface

global $_SERVER;
global $ccu;

$interface = $_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].str_replace("index.php", "",$_SERVER['PHP_SELF']);
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$interface = "https://".$interface;
}
else $interface = "http://".$interface;


//echo "###".$interface."###";
if (isset($component['ise_id'])) {
$modalId = mt_rand();
require("config/config.php");
if(file_exists("dev/e5xport.json")) {
$xmlFile = 'dev/sysvar.php?ise_id='.$component['ise_id'];
} else {
$xmlFile = $interface.'/interface.php?sysvar.cgi&ise_id='.$component['ise_id'];
//$xmlFile = 'interface.php?sysvar.cgi&ise_id='.$component['ise_id'];
//echo $xmlFile;
}

$xml = simplexml_load_file($xmlFile);
// $xml = simplexml_load_string(api_state($ccu, $component['ise_id'], true));
//print_r($xml);

foreach ($xml->systemVariable as $states)
{

Expand Down

0 comments on commit c1df80b

Please sign in to comment.