} } echo "</select>\n"; echo "<input type=\"hidden\" name=\"path\" value=\"{$path}\" />"; echo "<input type=\"submit\" value=\"设置编码\" />\n"; echo "</form>\n"; echo "</div>\n"; echo "<div class=\"like\">文件内容浏览</div>\n"; if (filesize($path) > 2 * 1024 * 1024) { echo "<div class=\"love\">\n"; echo "文件过大,请下载后查看!\n"; echo "</div>\n"; } else { echo "<div class=\"love\">\n"; if (!($data = file_get_contents($path))) { echo "读取文件时发生了错误!\n"; } else { echo "<pre>"; if (!isset($_GET['charset'])) { echo nl2br(___codepre(___convert(trim($data), "UTF-8"))); } elseif (($charset = trim($_GET['charset'])) == "") { echo nl2br(___codepre(___convert(trim($data), "UTF-8"))); } else { echo nl2br(___codepre(___convert(trim($data), "UTF-8", $charset))); } echo "<pre>\n"; } echo "</div>"; } xhtml_footer(); }
$i = 0; $shell = explode("\n", $s); while ($i < count($shell)) { $x = trim($shell[$i]); fwrite($pipes[0], "{$x}\n"); $i++; } fclose($pipes[0]); $stream = stream_get_contents($pipes[1]); if ($stream != "") { echo "<pre>" . nl2br(___codepre(trim($stream))) . "</pre>"; } else { echo "NULL"; } fclose($pipes[1]); proc_close($sh); } } else { $i = 0; $shell = explode("\n", $s); while ($i < count($shell)) { $sh = trim($shell[$i]); echo "shell# {$sh}<br />\n"; echo nl2br(___codepre(shell_exec($sh))) . "\n"; $i++; } } echo "</div>\n"; } } xhtml_footer();
echo "</div>\n"; } } } else { echo "<div class=\"like\">\n"; echo "<a href=\"./dlym.php?path=" . urlencode(dirname($path)) . "\"]>返回目录</a>文件列表\n"; echo "</div>\n"; echo "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"; echo "<div class=\"love\">\n"; $unzipdir = dirname($path); isset($_GET['unzipdir']) && is_dir($_GET['unzipdir']) && ($unzipdir = trim($_GET['unzipdir'])); echo "解压<a href=\"./dlym.php?new&path=" . urlencode(dirname($path)) . "&multiple=unzipdir&getcwd=" . urlencode($path) . "\">到此</a>路径:\n"; echo "<input type=\"text\" name=\"undir\" value=\"{$unzipdir}\" />\n"; echo "<input type=\"submit\" value=\"UNZIP\" />\n"; echo "(<a href=\"{$_SERVER['REQUEST_URI']}&select\">全选</a>|<a href=\"./unzip.php?path=" . urlencode($path) . "&unzipdir=" . urlencode($unzipdir) . "\">消选</a>)\n"; echo "</div>\n"; $select = isset($_GET['select']) ? "checked " : null; foreach ($ziplist as $zfile) { echo "<div class=\"love\">\n"; echo "<input type=\"checkbox\" name=\"z[]\" value=\"" . urlencode($zfile['stored_filename']) . "\" {$select}/>\n"; if ($zfile['folder']) { echo "[目录]" . ___codepre(___convert($zfile['stored_filename'], "UTF-8")); } else { echo "[文件]" . ___codepre(___convert($zfile['stored_filename'], "UTF-8")); echo "(" . ___filesize($zfile['size']) . "->" . ___filesize($zfile['compressed_size']) . ")"; } echo "\n</div>\n"; } echo "</form>\n"; } xhtml_footer();
chmod($tmp, 0700); !is_executable($tmp) ? $bin = false : ($bin = $tmp); } else { $bin = false; } } } } if (___superexec('rar') != "") { $bin = "rar"; } elseif (___superexec('unrar') != "") { $bin = "unrar"; } if (___superexec($bin) == "") { echo "程序无法正常完成工作!"; } else { $a = addslashes($path); $b = addslashes($unpackdir); $c = isset($_GET['password']) ? addslashes(trim($_GET['password'])) : null; if ($c == null) { echo nl2br(___codepre(___convert(___superexec("{$bin} x -y '{$a}' '{$b}' 2>&1"), "UTF-8"))); } else { echo nl2br(___codepre(___convert(___superexec("{$bin} x -y '-p{$c}' '{$a}' '{$b}' 2>&1"), "UTF-8"))); } } break; default: echo "暂时不支持的压缩类型!"; } echo "</div>\n"; xhtml_footer();
if (file_put_contents($path, $fcontent)) { echo "文件数据已经成功存储!\n"; } else { echo "文件数据无法存入文件!\n"; } echo "</div>\n"; } } $data = file_get_contents($path); if (!isset($_GET['charset'])) { $charset = null; $content = ___codepre($data, null); } elseif (($charset = trim($_GET['charset'])) == "") { $content = ___codepre($data, null); } else { $content = ___codepre(___convert($data, "UTF-8", $charset), null); } echo "<div class=\"like\">文本编辑工具</div>\n"; echo "<div class=\"love\">\n"; echo "<form action=\"?path=" . urlencode($path) . "&charset={$charset}\" method=\"POST\">\n"; echo "<input type=\"submit\" value=\"保存文件\" />\n"; echo "<input type=\"reset\" value=\"重置文件\" />\n<br />\n"; if (isset($_GET['charset'])) { if ($charset != "") { echo "<input type=\"hidden\" name=\"charset\" value=\"{$charset}\" />\n"; } } echo "<textarea name=\"content\" style=\"width:99%;height:400px;\">{$content}</textarea>\n<br/>\n"; echo "</form>\n"; echo "</div>\n"; xhtml_footer();