????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.148.227.92 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/appsrv.astacus.se/rock_backup/energylog/ |
Upload File : |
<?php // ON LASCLOUD // 1 0 * * SAT php /var/www/html/energylog/indexSAT0700.php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $mysqli = new mysqli("www.astacus.se", "carlhoffstedt", "Astacus2020!", "energicontrol"); // Check forcast to see what temperature is availible for referance $fromD = date('Y-m-d'); $sql = "SELECT * FROM tblEnergyLog WHERE DateTime >= '$fromD 00:00:00' and OutsideTemp = ''"; $result = $mysqli->query($sql); exec('curl -X POST http://localhost/modbus_swegon/get_values.php', $output, $retval); $Exhaust = explode("#",$output[0])[6]; while($obj = $result->fetch_object()){ $DateTime = $obj->DateTime; $EnergyLogId = $obj->EnergyLogId; // 00614161 = Rum 206, Robin Anna $sql = "SELECT * FROM tblEcoguard WHERE Time = '$DateTime' and SensorName = '00614161' and SensorType = 'T'"; $result2 = $mysqli->query($sql); $InsideTemp = -100; while($obj2 = $result2->fetch_object()){ $InsideTemp = $obj2->Value; } // 23000636 = Ute Norr $sql = "SELECT * FROM tblEcoguard WHERE Time = '$DateTime' and SensorName = '23000636' and SensorType = 'OT'"; $result2 = $mysqli->query($sql); $OutsideTemp = -100; while($obj2 = $result2->fetch_object()){ $OutsideTemp = $obj2->Value; } $sql = "UPDATE tblEnergyLog SET OutsideTemp = '$OutsideTemp', InsideTemp = '$InsideTemp', Exhaust ='$Exhaust' where EnergyLogId = $EnergyLogId"; $mysqli->query($sql); } ?>