loadHTMLFile($index); $xpath = new DomXPath($dom); libxml_clear_errors(); $tool_calibration = $tool . "_calibration"; if ($tool == "gss") { $nodes = $xpath->query("//td[a[text()='AuditMessage_calibration' or text()='XUAValidator_calibration' or text()='CertificateValidator_calibration']]/following-sibling::td[5]/text()"); $tool_calibration = "AuditMessage_calibration"; } else { $nodes = $xpath->query("//td[a[contains(text(), '$tool')]]/following-sibling::td[5]/text()"); $nodes_name = $xpath->query("//td/a[contains(text(), '$tool')]/text()"); foreach ($nodes_name as $i => $name) { $tool_calibration = $name->nodeValue; } } $calibration = ""; if ($nodes->length > 0) { foreach ($nodes as $i => $node) { if ($node->nodeValue != "100%") { $calibration = ""; } } } else { $calibration = ""; } return $calibration; }