$currentDayName = "Dienstag"; break; case 3: $currentDayName = "Mittwoch"; break; case 4: $currentDayName = "Donnerstag"; break; case 5: $currentDayName = "Freitag"; break; case 6: $currentDayName = "Samstag"; break; } if (!checkAction("cron_" . $currentDayName . " " . date("d.M.Y") . " - " . $currentStd . ":" . $currentMin)) { echo "mail_" . $currentDayName . " " . date("d.M.Y") . ":" . $currentStd . ":" . $currentMin . " --- bereits ausgeführt\n"; return; } echo "Check: mail_" . $currentDayName . " " . date("d.M.Y") . ":" . $currentStd . ":" . $currentMin . "\n"; if (strlen($_SESSION['config']->PUBLICVARS['gmailAdress']) > 0 && strlen($_SESSION['config']->PUBLICVARS['gmailAppPassword']) > 0) { $in = connectToGmailInbox($_SESSION['config']->PUBLICVARS['gmailAdress'], $_SESSION['config']->PUBLICVARS['gmailAppPassword']); $mails = getMailsFromGmailInbox($in); $unreadMails = getEmailCount($in, $mails, true); closeGmailInbox($in); // echo "Ungelesene Mails: ".$unreadMails."\n"; // Anzahl ungelesener Mails in Sensor-Tabelle speichern if (checkSensorInputMissingValues()) { refreshSensorValue($_SESSION['config']->DBCONNECT, 999999999, $unreadMails); } }
<?php include_once "init.php"; if (!checkSensorInputMissingValues()) { return; } refreshSensorValue($_SESSION['config']->DBCONNECT, $_REQUEST['sensorId'], $_REQUEST['sensorWert']);