コード例 #1
0
ファイル: filesystem.php プロジェクト: Parashutik/ReloadCMS
function rcms_chmod($file, $val, $rec = false)
{
    $res = @chmod(realpath($file), $val);
    if (@is_dir($file) && $rec) {
        $els = rcms_scandir($file);
        foreach ($els as $el) {
            $res = $res && rcms_chmod($file . '/' . $el, $val, true);
        }
    }
    return $res;
}
コード例 #2
0
ファイル: filemanager.php プロジェクト: Parashutik/ReloadCMS
            <input type="submit" name="save" value="<?php 
    echo __('Submit');
    ?>
">
            <input type="submit" name="cancel" value="<?php 
    echo __('Cancel');
    ?>
">
        </form>
    </td>
</tr>
</table>
<?php 
} elseif (!empty($_REQUEST['rights'])) {
    if (!empty($_REQUEST['save'])) {
        if (rcms_chmod($_REQUEST['path'] . $_REQUEST['rights'], convert_rights_string($_REQUEST['rights_val']), @$_REQUEST['recursively'])) {
            rcms_showAdminMessage(__('File updated'));
        } else {
            rcms_showAdminMessage(__('Error occurred'));
        }
    }
    clearstatcache();
    $oldrights = get_rights_string($_REQUEST['path'] . $_REQUEST['rights'], true);
    $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $_REQUEST['path'];
    $backlink = $url_inc . '&path=' . $_REQUEST['path'];
    ?>
<table border='0' cellspacing='0' cellpadding='1' width="100%">
<tr>
    <th><?php 
    echo __('File manager') . ' - ' . __('Rights') . ' - ' . $_REQUEST['rights'];
    ?>