' . lang('Systeminfo_Storage') . '

'; $storage_lsblk = shell_exec("lsblk -io NAME,SIZE,TYPE,MOUNTPOINT,MODEL --list | tail -n +2 | awk '{print $1\"#\"$2\"#\"$3\"#\"$4\"#\"$5}'"); $storage_lsblk_line = explode("\n", $storage_lsblk); $storage_lsblk_line = array_filter($storage_lsblk_line); for ($x = 0; $x < sizeof($storage_lsblk_line); $x++) { $temp = array(); $temp = explode("#", $storage_lsblk_line[$x]); $storage_lsblk_line[$x] = $temp; } for ($x = 0; $x < sizeof($storage_lsblk_line); $x++) { echo '
'; if (preg_match('~[0-9]+~', $storage_lsblk_line[$x][0])) { echo '
"' . lang('Systeminfo_Storage_Mount') . ' ' . $storage_lsblk_line[$x][3] . '"
'; } else { echo '
"' . str_replace('_', ' ', $storage_lsblk_line[$x][3]) . '"
'; } echo '
' . lang('Systeminfo_Storage_Device') . ' /dev/' . $storage_lsblk_line[$x][0] . '
'; echo '
' . lang('Systeminfo_Storage_Size') . ' ' . $storage_lsblk_line[$x][1] . '
'; echo '
' . lang('Systeminfo_Storage_Type') . ' ' . $storage_lsblk_line[$x][2] . '
'; echo '
'; } echo '
'; // Storage usage ---------------------------------------------------------- echo '

' . lang('Systeminfo_Storage_Usage') . '

'; for ($x = 0; $x < sizeof($hdd_devices); $x++) { if (stristr($hdd_devices[$x], '/dev/')) { if (!stristr($hdd_devices[$x], '/loop')) { if ($hdd_devices_total[$x] == 0 || $hdd_devices_total[$x] == '') {$temp_total = 0;} else { $temp_total = number_format(round(($hdd_devices_total[$x] / 1024 / 1024), 2), 2, ',', '.'); $temp_total = trim($temp_total);} if ($hdd_devices_used[$x] == 0 || $hdd_devices_used[$x] == '') {$temp_used = 0;} else { $temp_used = number_format(round(($hdd_devices_used[$x] / 1024 / 1024), 2), 2, ',', '.'); $temp_used = trim($temp_total);} if ($hdd_devices_free[$x] == 0 || $hdd_devices_free[$x] == '') {$temp_free = 0;} else { $temp_free = number_format(round(($hdd_devices_free[$x] / 1024 / 1024), 2), 2, ',', '.'); $temp_free = trim($temp_total);} echo '
'; echo '
"' . lang('Systeminfo_Storage_Usage_Mount') . ' ' . $hdd_devices_mount[$x] . '"
'; echo '
' . lang('Systeminfo_Storage_Usage_Total') . ' ' . $temp_total . ' GB
'; echo '
' . lang('Systeminfo_Storage_Usage_Used') . ' ' . $temp_used . ' GB (' . $hdd_devices_percent[$x]. ')
'; echo '
' . lang('Systeminfo_Storage_Usage_Free') . ' ' . $temp_free . ' GB
'; echo '
'; } } } #echo '
' . $lang['SysInfo_storage_note']; echo '
'; // ---------------------------------------------------------- // USB devices // ---------------------------------------------------------- $usb_result = shell_exec("lsusb"); $usb_devices_mount = explode("\n", trim($usb_result)); echo '

' . lang('Systeminfo_USB_Devices') . '

'; echo ' '; $table_color = 'odd'; sort($usb_devices_mount); for ($x = 0; $x < sizeof($usb_devices_mount); $x++) { $cut_pos = strpos($usb_devices_mount[$x], ':'); $usb_bus = substr($usb_devices_mount[$x], 0, $cut_pos); $usb_dev = substr($usb_devices_mount[$x], $cut_pos + 1); if ($table_color == 'odd') {$table_color = 'even';} else { $table_color = 'odd';} echo ''; } echo ' '; echo '
'; // ---------------------------------------------------------- echo '
'; ?>