");} if($temp >=17) { $namestr = "name=\"cool\""; $valstr = "value=\"冷房\""; } else { $namestr = "name=\"hot\""; $valstr = "value=\"暖房\""; } if($_POST["cool"]) { shell_exec('/usr/local/bin/ctrl-hitachiAC.sh cool_on'); sleep(1); # print("cool:".@$_POST["cool"]."
"); } if($_POST["hot"]) { shell_exec('/usr/local/bin/ctrl-hitachiAC.sh hot_on'); sleep(1); # print("hot:".@$_POST["hot"]."
"); } if($_POST["off"]) { shell_exec('/usr/local/bin/ctrl-hitachiAC.sh cool_off'); sleep(1); # print("off:".@$_POST["off"]."
"); } date_default_timezone_set('Asia/Tokyo'); #echo date('Y年m月d日 H時i分s秒'); $tm = localtime(); printf("%d年%d月%d日 %d時%d分%d秒",$tm[5]+1900,$tm[4]+1,$tm[3],$tm[2],$tm[1],$tm[0]); $stat = shell_exec('gpio read 1') == 1 ? 'ON' : 'OFF'; ?>
室温:print($temp);?>℃ print($stat);?>
print($namestr);?> print($valstr);?> type="submit" id="b1">