示例#1
0
文件: index.php 项目: sembrono/1
        echo '-&gt;<a href="index.php?' . $_GET['path'] . '">取消选择</a>&nbsp;&nbsp;<a href="index.php?' . $_SERVER['QUERY_STRING'] . '&amp;all=yes">全部选择</a>';
        echo '<form action="system.php?path=' . _encode($f['.']) . '" method="post">';
        if (count($f['dir']) >= 1) {
            echo <<<HTML
<div class="big_board"><div class="board_title">目录列表</div></div>
HTML;
            foreach ($f['dir'] as $dir) {
                echo "<input type=\"checkbox\" name=\"selected[]\" value=\"" . _encode($dir) . "\" {$select}/><a href=\"dirinfo.php?path=" . _encode($dir) . "\">[dir]</a><a href=\"{$_SERVER['PHP_SELF']}?path=" . _encode($dir) . "\">" . path2name($dir) . "</a><br/>";
            }
        }
        if (count($f['file']) >= 1) {
            echo <<<HTML
<div class="big_board"><div class="board_title">文件列表</div></div>
HTML;
            foreach ($f['file'] as $file) {
                echo "<input type=\"checkbox\" name=\"selected[]\" value=\"" . _encode($file) . "\" {$select}/><a href=\"fileinfo.php?path=" . _encode($file) . "\">[file]</a>" . path2name($file) . '<br/><a href="download.php?path=' . _encode($file) . '">下载</a>.<a href="editor.php?path=' . _encode($file) . '">编辑</a>.<a href="view.php?path=' . _encode($file) . '">查看</a>.<a href="rename.php?path=' . _encode($file) . '">命名</a><br/>大小:' . _filesize($file) . ' 权限:' . substr(sprintf('%o', fileperms(_decode($file))), -4) . '<br/>';
            }
        }
        echo <<<HTML
<select name="type">
<option value="delete">删除文件(多选)</option>
<option value="pkzip">压缩文件(多选)</option>
<option value="move">移动文件(多选)</option>
<option value="copy">复制文件(多选)</option>
<option value="chmod">权限变更(多选)</option>
</select>
<input type="submit" value="[Go]"/>
</form>
HTML;
    } else {
        echo "Hello,貌似目录是空目录耶!";
示例#2
0
文件: move.php 项目: sembrono/1
    if (is_dir($_REQUEST['dir']) == false) {
        echo <<<HTML
<div class="big_board"><div class="board_title">爱特文管-系统提示</div></div>
Hello,检测目标目录错误!
HTML;
    } else {
        echo <<<HTML
<div class="big_board"><div class="board_title">批量移动-移动结果</div></div>
<span class="true">■</span>已经移动 <span class="false">■</span>移动异常
HTML;
        $i = 0;
        while ($i < count($_SESSION['path'])) {
            if (preg_match('/[\\/]$/', $_REQUEST['dir']) == false) {
                $todir = $_REQUEST['dir'] . '/' . path2name(_decode($_SESSION['path'][$i]));
            } else {
                $todir = $_REQUEST['dir'] . path2name(_decode($_SESSION['path'][$i]));
            }
            echo <<<HTML
<div class="big_board"><div class="board_title"></div></div>
HTML;
            if (is_dir(_decode($_SESSION['path'][$i])) == true) {
                echo '[dir]';
                if (rename(_decode($_SESSION['path'][$i]), $todir)) {
                    echo '<span class="true">' . _decode($_SESSION['path'][$i]) . '</span>';
                } else {
                    echo '<span class="false">' . _decode($_SESSION['path'][$i]) . '</span>';
                }
            }
            if (is_file(_decode($_SESSION['path'][$i])) == true) {
                echo '[file]';
                if (rename(_decode($_SESSION['path'][$i]), $todir)) {
示例#3
0
文件: fileinfo.php 项目: sembrono/1
    exit;
}
header('Content-Type:text/html;charset=UTF-8');
echo <<<HTML
<html>
<head>
<title>文件管理-文件信息</title>
<style type="text/css">
.big_board{background-color:#009BCE;color:#FFF;}
.board_title{margin-bottom:1px;border:1px solid #09F;}
</style>
</head>
<body>
<div class="big_board"><div class="board_title">爱特文管-路径信息</div></div>
HTML;
echo '<a href="index.php?path=' . _encode(dirname(_decode($_GET['path']))) . '">' . dirname(_decode($_GET['path'])) . '</a>/' . path2name(_decode($_GET['path']));
echo <<<HTML
<div class="big_board"><div class="board_title">爱特文管-文件信息</div></div>
HTML;
if (is_file(_decode($_GET['path'])) == false) {
    echo 'Hello,文件信息查询出错!';
} else {
    echo '文件名称:<br/>' . basename(_decode($_GET['path']));
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '文件大小:<br/>' . _filesize(_decode($_GET['path']));
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '文件类型:<br/>' . _filemime(_decode($_GET['path']));
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '文件权限:<br/>' . substr(sprintf('%o', fileperms(_decode($_GET['path']))), -4);
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '最后访问:<br/>' . gmdate("Y-m-d H:i:s", fileatime(_decode($_GET['path'])) + 8 * 3600);
示例#4
0
文件: download.php 项目: sembrono/1
<?php

require 'user.php';
require 'function.php';
if (file_exists($path = _decode($_GET['path'])) == false) {
    header('Content-Type:text/html;charset=UTF-8');
    echo <<<HTML
Error:404
HTML;
    exit;
}
Header('Content-Type:application/octet-stream');
header('accept-length:' . filesize($path));
Header('Content-Disposition:attachment;filename=' . path2name($path));
readfile($path);
示例#5
0
文件: dirinfo.php 项目: sembrono/1
<style type="text/css">
.big_board{background-color:#009BCE;color:#FFF;}
.board_title{margin-bottom:1px;border:1px solid #09F;}
</style>
</head>
<body>
<div class="big_board"><div class="board_title">爱特文管-路径信息</div></div>
HTML;
chdir(_decode($_GET['path']) . "/../");
$path = getcwd();
echo '<a href="index.php?path=' . $path . '">' . _decode($_GET['path']) . '</a>';
echo <<<HTML
<div class="big_board"><div class="board_title">爱特文管-目录信息</div></div>
HTML;
if (is_dir(_decode($_GET['path'])) == false) {
    echo 'Hello,文件信息查询出错!';
} else {
    echo '目录名称:<br/><a href="rename.php?path=' . _decode($_GET['path']) . '">' . path2name(_decode($_GET['path'])) . '</a>';
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '目录权限:<br/>' . substr(sprintf('%o', fileperms(_decode($_GET['path']))), -4);
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '最后访问:<br/>' . gmdate("Y-m-d H:i:s", fileatime(_decode($_GET['path'])) + 8 * 3600);
    echo '<div class="big_board"><div class="board_title"></div></div>';
    echo '最后修改:<br/>' . gmdate("Y-m-d H:i:s", filemtime(_decode($_GET['path'])) + 8 * 3600);
}
echo <<<HTML
<div class="big_board"><div class="board_title">By:Admin@Aite.Me</div></div>
</body>
</html>
HTML
;