if (!isset($_GET['dirperms']) || !isset($_GET['fileperms']) || !isset($_SESSION['flist'])) { header("Location: ./404.php"); exit; } if (!isset($_GET['getcwd'])) { $getcwd = OPEN; } else { $getcwd = ___realpath(trim($_GET['getcwd'])); } xhtml_head("批量改权"); if (count($_SESSION['flist']) < 1) { echo "<div class=\"error\">\n"; echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">返回</a>]抱歉,文件清单为空!\n"; echo "</div>\n"; } else { $i = 0; $fs = new filesystem(); echo "<div class=\"like\">\n"; echo "<a href=\"./index.php?path=" . urlencode($getcwd) . "\">文件列表</a>(操作结果)\n"; echo "</div>"; while ($i < count($_SESSION['flist'])) { $fs->chpath($tmp = $_SESSION['flist'][$i]); if ($fs->chmod(trim($_GET['dirperms']), trim($_GET['fileperms']))) { echo "<div class=\"love\">[{$i}][√] - {$tmp}</div>\n"; } else { echo "<div class=\"error\">[{$i}][×] - {$tmp}</div>\n"; } $i++; } } xhtml_footer();
echo "<option value=\"delete\">删除文件(多选)</option>\n"; echo "<option value=\"create\">建立数据(目录)</option>\n"; echo "<option value=\"upload\">本地远程(上传)</option>\n"; echo "<option value=\"addlist\">文件清单(加入)</option>\n"; echo "<option value=\"sendfile\">发送文件(邮箱)</option>\n"; if (function_exists("shell_exec")) { echo "<option value=\"shell_exec\">终端命令(高级)</option>\n"; } echo "</select>\n"; echo "<input type=\"submit\" value=\"执行\" />\n"; echo "(<a href=\"?path=" . urlencode($path) . "&select{$multiple}\">全选</a>|<a href=\"?path=" . urlencode($path) . "{$multiple}\">消选</a>)\n"; echo "</div>\n"; if (count($data[0]) != 0) { echo "\n<div class=\"like\">目录列表</div>\n"; foreach ($data[0] as $tmp) { $filesystem->chpath($tmp); echo "<div class=\"love\">\n"; echo "<input type=\"checkbox\" name=\"flist[]\" value=\"" . urlencode($tmp) . "\" {$select}/>\n"; echo ($perms = $filesystem->getperms()) == false ? "[????]" : "[{$perms}]"; echo "<a href=\"?path=" . urlencode($tmp) . "{$multiple}\">" . ___basename($tmp) . "</a>\n"; if (is_link($tmp)) { echo "[ Link -> " . readlink($tmp) . " ]"; } echo "(<a href=\"./rename.php?path=" . urlencode($tmp) . "\">命名</a>|<a href=\"./autocp.php?path=" . urlencode($tmp) . "\">复件</a>)\n"; echo "</div>\n"; } } if (count($data[1]) != 0) { echo "\n<div class=\"like\">文件列表</div>\n"; foreach ($data[1] as $tmp) { $filesystem->chpath($tmp);