コード例 #1
0
&nbsp;</td>
				</tr>
				<?php 
}
?>
				<?php 
if (isset($raidstatus)) {
    ?>
				<?php 
    foreach ($raidstatus as $diskk => $diskv) {
        ?>
				<?php 
        ($iostat = system_get_device_iostat($diskk)) === FALSE ? $iostat = gettext("n/a") : ($iostat = sprintf("%s KiB/t, %s tps, %s MiB/s", $iostat['kpt'], $iostat['tps'], $iostat['mps']));
        ?>
				<?php 
        ($temp = system_get_device_temp($diskk)) === FALSE ? $temp = gettext("n/a") : ($temp = sprintf("%s &deg;C", $temp));
        ?>
				<tr>
					<td class="listlr"><?php 
        echo htmlspecialchars($diskk);
        ?>
</td>
					<td class="listr"><?php 
        echo htmlspecialchars($diskv['size']);
        ?>
</td>
					<td class="listr"><?php 
        echo htmlspecialchars(gettext("Software RAID"));
        ?>
&nbsp;</td>
					<td class="listr"><?php 
コード例 #2
0
ファイル: diag_infos.php プロジェクト: sdoney/nas4free
?>
</td>
					<td width="8%" class="listhdrr"><?php 
echo gettext("Temperature");
?>
</td>
					<td width="6%" class="listhdrr"><?php 
echo gettext("Status");
?>
</td>
				</tr>
				<?php 
foreach ($a_phy_disk as $disk) {
    ?>
				<?php 
    ($temp = system_get_device_temp($disk['devicespecialfile'])) === FALSE ? $temp = htmlspecialchars(gettext("n/a")) : ($temp = sprintf("%s &deg;C", htmlspecialchars($temp)));
    ?>
				<?php 
    if ($disk['type'] == 'HAST') {
        $role = $a_phy_disk[$disk['name']]['role'];
        $status = sprintf("%s (%s)", 0 == disks_exists($disk['devicespecialfile']) ? gettext("ONLINE") : gettext("MISSING"), $role);
        $disk['size'] = $a_phy_disk[$disk['name']]['size'];
    } else {
        $status = 0 == disks_exists($disk['devicespecialfile']) ? gettext("ONLINE") : gettext("MISSING");
    }
    ?>
				<tr>
					<td class="listlr"><?php 
    echo htmlspecialchars($disk['name']);
    ?>
</td>