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"
. " " . $text['s_label'] . " | \n"
. " " . $text['s_value'] . " | \n"
. " " . $text['s_min'] . " | \n"
. " " . $text['s_div'] . " | \n"
. "
\n";
$data = $mbinfo->fans();
$show_fans = false;
for ($i=0, $max = sizeof($data); $i < $max; $i++) {
$_text .= " \n"
. " ". $data[$i]['label'] . " | \n"
. " ". round($data[$i]['value']) . " " . $text['rpm_mark'] . " | \n"
. " ". $data[$i]['min'] . " " . $text['rpm_mark'] . " | \n"
. " " . $data[$i]['div'] . " | \n"
. "
\n";
if (round($data[$i]['value']) > 0) {
$show_fans = true;
}
};
$_text .= "
\n";
if (!$show_fans) {
$_text = "";
}
return $_text;
};
function html_mbvoltage() {
global $text;
global $mbinfo;
$textdir = direction();
$_text = "\n";
$_text .= " \n"
. " " . $text['s_label'] . " | \n"
. " " . $text['s_value'] . " | \n"
. " " . $text['s_min'] . " | \n"
. " " . $text['s_max'] . " | \n"
. "
\n";
$data = $mbinfo->voltage();
for ($i=0, $max = sizeof($data); $i < $max; $i++) {
$_text .= " \n"
. " ". $data[$i]['label'] . " | \n"
. " ". $data[$i]['value'] . " " . $text['voltage_mark'] . " | \n"
. " ". $data[$i]['min'] . " " . $text['voltage_mark'] . " | \n"
. " " . $data[$i]['max'] . " " . $text['voltage_mark'] . " | \n"
. "
\n";
};
$_text .= "
\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;
};
?>