= $temperature['temp_limit']) { $updated = ", `service_changed` = '" . time() . "' "; if($device['sysContact']) { $email = $device['sysContact']; } else { $email = $config['email_default']; } $msg = "Temp Alarm: " . $device['hostname'] . " " . $temperature['temp_descr'] . " is " . $temp . " (Limit " . $temperature['temp_limit']; $msg .= ") at " . date('l dS F Y h:i:s A'); mail($email, "Temp Alarm: " . $device['hostname'] . " " . $temperature['temp_descr'], $msg, $config['email_headers']); echo("Alerting for " . $device['hostname'] . " " . $temperature['temp_descr'] . "/n"); } mysql_query("UPDATE temperature SET temp_current = '$temp' WHERE temp_id = '$temperature[temp_id]'"); } ?>