temperature($hddtemp_avail);
$_text = " \n";
if (sizeof($data) > 0) {
for ($i=0, $max = sizeof($data); $i < $max; $i++) {
$_text .= " - \n";
$_text .= " \n";
$_text .= " " . htmlspecialchars($data[$i]['value'], ENT_QUOTES) . "\n";
$_text .= " " . htmlspecialchars($data[$i]['model'], ENT_QUOTES) . "\n";
$_text .= "
\n";
}
}
$_text .= " \n";
return $_text;
}
function html_hddtemp() {
global $XPath;
global $text;
global $sensor_program;
$textdir = direction();
$scale_factor = 2;
$_text = "";
$maxvalue = "+60";
if ($XPath->match("/phpsysinfo/HDDTemp")) {
for ($i=1, $max = sizeof($XPath->getDataParts('/phpsysinfo/HDDTemp')); $i < $max; $i++) {
if( $XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Value") != 0) {
$_text .= "
\n";
$_text .= " ". $XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Model") . " | \n";
$_text .= " ";
$_text .= create_bargraph($XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Value"), $maxvalue, $scale_factor);
$_text .= " " . round($XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Value")) . " " . $text['degree_mark'] . " | \n";
$_text .= " ". $maxvalue . " " . $text['degree_mark'] . " |
\n";
}
}
};
if (strlen($_text) > 0 && empty($sensor_program)) {
$_text = " \n"
. " " . $text['s_label'] . " | \n"
. " " . $text['s_value'] . " | \n"
. " " . $text['s_limit'] . " | \n"
. "
" . $_text;
}
return $_text;
};
function wml_hddtemp() {
global $XPath;
global $text;
if ($XPath->match("/phpsysinfo/HDDTemp")) {
for ($i = 1; $i < sizeof($XPath->getDataParts('/phpsysinfo/HDDTemp')); $i++) {
if( $XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Value") != 0) {
$_text .= "\n";
$_text .= $XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Model") . ": " . round($XPath->getData("/phpsysinfo/HDDTemp/Item[$i]/Value")) . " " . str_replace("º", "", $text['degree_mark']) . "
\n";
}
}
};
return $_text;
}
?>