temperature(); $_text = " \n"; if (sizeof($data) > 0) { $_text .= " \n"; 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]['limit'], ENT_QUOTES) . "\n"; $_text .= " \n"; } $_text .= " \n"; } return $_text; }; function xml_mbfans() { global $text; global $mbinfo; $_text = ""; $data = $mbinfo->fans(); if (sizeof($data) > 0) { $_text = " \n"; 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]['min'], ENT_QUOTES) . "\n"; $_text .= "
" . htmlspecialchars($data[$i]['div'], ENT_QUOTES) . "
\n"; $_text .= "
\n"; } $_text .= "
\n"; } return $_text; }; function xml_mbvoltage() { global $text; global $mbinfo; $_text = ""; $data = $mbinfo->voltage(); if (sizeof($data) > 0) { $_text = " \n"; 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]['min'], ENT_QUOTES) . "\n"; $_text .= " " . htmlspecialchars($data[$i]['max'], ENT_QUOTES) . "\n"; $_text .= " \n"; } $_text .= " \n"; } $_text .= "
\n"; return $_text; }; function html_mbtemp() { global $text; global $mbinfo; $textdir = direction(); $data = array(); $scale_factor = 2; $_text = " \n" . " " . $text['s_label'] . "\n" . " " . $text['s_value'] . "\n" . " " . $text['s_limit'] . "\n" . " \n"; $data = $mbinfo->temperature(); for ($i=0, $max = sizeof($data); $i < $max; $i++) { $_text .= " \n" . " ". $data[$i]['label'] . "\n" . " "; if ($data[$i]['value'] == 0) { $_text .= "Unknown - Not connected?"; } else { $_text .= create_bargraph($data[$i]['value'], $data[$i]['limit'], $scale_factor); } $_text .= " " . round($data[$i]['value']) . " " . $text['degree_mark'] . "\n" . " ". $data[$i]['limit'] . " " . $text['degree_mark'] . "\n" . " \n"; }; return $_text; }; function html_mbfans() { global $text; global $mbinfo; $textdir = direction(); $_text ="\n"; $_text .= " \n" . " \n" . " \n" . " \n" . " \n" . " \n"; $data = $mbinfo->fans(); $show_fans = false; for ($i=0, $max = sizeof($data); $i < $max; $i++) { $_text .= " \n" . " \n" . " \n" . " \n" . " \n" . " \n"; if (round($data[$i]['value']) > 0) { $show_fans = true; } }; $_text .= "
" . $text['s_label'] . "" . $text['s_value'] . "" . $text['s_min'] . "" . $text['s_div'] . "
". $data[$i]['label'] . "". round($data[$i]['value']) . " " . $text['rpm_mark'] . "". $data[$i]['min'] . " " . $text['rpm_mark'] . "" . $data[$i]['div'] . "
\n"; if (!$show_fans) { $_text = ""; } return $_text; }; function html_mbvoltage() { global $text; global $mbinfo; $textdir = direction(); $_text = "\n"; $_text .= " \n" . " \n" . " \n" . " \n" . " \n" . " \n"; $data = $mbinfo->voltage(); for ($i=0, $max = sizeof($data); $i < $max; $i++) { $_text .= " \n" . " \n" . " \n" . " \n" . " \n" . " \n"; }; $_text .= "
" . $text['s_label'] . "" . $text['s_value'] . "" . $text['s_min'] . "" . $text['s_max'] . "
". $data[$i]['label'] . "". $data[$i]['value'] . " " . $text['voltage_mark'] . "". $data[$i]['min'] . " " . $text['voltage_mark'] . "" . $data[$i]['max'] . " " . $text['voltage_mark'] . "
\n"; return $_text; }; function wml_mbtemp() { global $text; global $mbinfo; $data = array(); $data = $mbinfo->temperature(); for ($i=0; $i < $max = sizeof($data); $i++) { $_text .= "

\n" . $data[$i]['label'] . ": "; if ($data[$i]['value'] == 0) { $_text .= "Unknown - Not connected?

"; } else { $_text .= round($data[$i]['value']) . " " . str_replace("º", "", $text['degree_mark']) . "

\n"; } }; return $_text; } function wml_mbfans() { global $text; global $mbinfo; $data = array(); $data = $mbinfo->fans(); $_text = "\n"; for ($i = 0; $i < sizeof($data); $i++) { $_text .= "

\n" . $data[$i]['label'] . ": " . round($data[$i]['value']) . " " . $text['rpm_mark'] . "

\n"; } $_text .= "
\n"; return $_text; } function wml_mbvoltage() { global $text; global $mbinfo; $data = array(); $data = $mbinfo->voltage(); $_text = "\n"; for ($i = 0; $i < sizeof($data); $i++) { $_text .= "


\n" . $data[$i]['label'] . ": " . $data[$i]['value'] . " " . $text['voltage_mark'] . "
\n" . "- " . $text['s_min'] . ": " . $data[$i]['min'] . " " . $text['voltage_mark'] . "
\n" . "- " . $text['s_max'] . ": " . $data[$i]['max'] . " " . $text['voltage_mark'] . "

\n"; }; $_text .= "
\n"; return $_text; }; ?>