Esempio n. 1
0
                default:
                    $info['path'] = implode('/', $patharr) . '/' . $icoarr['name'];
                    $info['size'] = lang('template', 'property_info_size', array('fsize' => formatsize($icoarr['size']), 'size' => $icoarr['size']));
            }
        }
        $info['username'] = $icoarr['username'];
        $info['uid'] = $icoarr['uid'];
        $info['fdateline'] = $icoarr['fdateline'];
    }
} elseif ($do == 'chmod') {
    $path = rawurldecode($_GET['path']);
    if (submitcheck('chmodsubmit')) {
        $son = intval($_GET['son']);
        $chmod = $_GET['chmod'];
        $mod = '0' . array_sum(array($chmod[8] * 4, $chmod[7] * 2, $chmod[6] * 1)) . array_sum(array($chmod[5] * 4, $chmod[4] * 2, $chmod[3] * 1)) . array_sum(array($chmod[2] * 4, $chmod[1] * 2, $chmod[0] * 1));
        if ($return = IO::chmod($path, $mod, $son)) {
            if ($return['error']) {
                showmessage($return['error']);
            }
            showmessage('do_success', dreferer(), array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => 1));
        }
        showmessage('权限修改失败,Windows服务器不支持此操作');
    } else {
        $meta = IO::getMeta($path);
        $meta['name'] = getstr($meta['name'], 30);
        list($owner, $group, $comm) = str_split($meta['mod'], 1);
        $owner = sprintf("%b", $owner);
        $comm = sprintf("%b", $comm);
        $group = sprintf("%b", $group);
        $chmod = array();
        for ($i = 0; $i < 3; $i++) {