<a id="caca" href="' . $url_target . '"><span class="title">' . $entry . '</span> </a> </li>'; echo $text; } while (false !== ($entry = $dirs->read())) { if ($entry != '.') { $filepath = "{$path}/{$entry}"; $latest_ctime = filectime($filepath); //like: 1402783996 that is timestamp so highest is latest. $latest_filename = $entry; $file_type = filetype($filepath); //get file type. $file_size = filesize($filepath); //get file size. $file_size = fileSizeConvert(filesize($filepath)); //get file size. if (is_dir($filepath)) { if (!$d_root) { if ($entry != '..') { $url_target = url('/') . '/muffinbox/dirs/' . $cd . '/' . $entry; } else { continue; } } else { if ($entry != '..') { $url_target = url('/') . '/muffinbox/dirs/' . $entry; } else { continue; } }
<?php //$myCMD="su web -c 'sudo /usr/local/bin/cbsd disks-list md=1'"; $myCMD = CBSD_CMD . " disks-list"; // md=1 $res = cbsd_cmd($myCMD); //showItemsList($arr,'disk'); if ($res['retval'] == 0) { $buf = $res['message']; $arr = explode(PHP_EOL, trim($buf)); if (!empty($arr)) { echo ' <ul class="i-list">', PHP_EOL; foreach ($arr as $key => $disk) { list($name, $vendor, $size) = explode(':', $disk); $name = trim($name); $vendor = trim($vendor); $size = fileSizeConvert(trim($size)); echo ' <li><input type="checkbox" name="disk[]" id="disk-', $key, '" value="' . $name . '" /><label for="disk-', $key, '">', $name, ' — ', $vendor, ' (', $size, ')</label></li>', PHP_EOL; } echo ' </ul>', PHP_EOL; } unset($arr); } ?> </div></div> <div class="inf-area hr"></div> <div class="inf-area network"><div class="inf-area-cnt"> <h1>Select network card:</h1> <?php // and show available nics on the system