include("includes.php");
if (($_GET['person']) or ($_GET['status'])) {
$person=$_GET['person'];
$state=$_GET['status'];
summon($person,$status);
sleep(1);
}
include("xml2array.php");
$programs=array("001F","0021","0022","0020","0024","0023","003D","003E","0042","0044","0043","0047","0045","0046","0048");
$i=0;
echo "
";
echo "";
foreach ($programs as $program) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://isy99/rest/programs/$program");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, 'admin:admin');
$output = curl_exec($ch);
$array=xml2array($output);
#echo "";
#$array=xml2array($output);
#print_r($array);
#exit;
echo "".$array['programs']['program']['name']." | ";
$status=($array['programs']['program_attr']['status']);
if ($status=="true") {
echo " | ";
} else {
echo " | ";
}
$i++;
if ($i==5) {
echo " | ";
$i=0;
$colspan++;
}
}
$colspan++;
echo " ";
echo " |
";
echo "";
echo "Summon Russ | ";
if (summon_status("russ")>=1) {
echo "
| ";
} else {
echo "
| ";
}
echo "Summon Beth | ";
if (summon_status("beth")>=1) {
echo "
| ";
} else {
echo "
| ";
}
echo " ";
echo " |
";
?>