当前位置: 首页>>代码示例>>PHP>>正文


PHP CFileMan::FetchFileAccessPerm方法代码示例

本文整理汇总了PHP中CFileMan::FetchFileAccessPerm方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileMan::FetchFileAccessPerm方法的具体用法?PHP CFileMan::FetchFileAccessPerm怎么用?PHP CFileMan::FetchFileAccessPerm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFileMan的用法示例。


在下文中一共展示了CFileMan::FetchFileAccessPerm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_REQUEST["save"]) && $strWarning == "")
{
	CUtil::JSPostUnescape();
	CModule::IncludeModule("fileman");

	$f = $io->GetFile($absoluteFilePath);

	$arUndoParams = array(
		'module' => 'fileman',
		'undoType' => 'delete_file',
		'undoHandler' => 'CFileman::UndoFileDelete',
		'arContent' => array(
			'path' => $path,
			'content' => $f->GetContents(),
			'site' => $site,
			'perm' => CFileMan::FetchFileAccessPerm(Array($site, $path)),
			'SEF' => CUrlRewriter::GetList(array("PATH" => $path))
		)
	);

	$success = BXDeleteFromSystem($absoluteFilePath, $path, $site);
	if ($success)
	{
		if ($deleteFromMenu)
			$arUndoParams['arContent']['menu'] = BXDeleteFromMenu($documentRoot, $path, $site);

		if($_GET['subdialog'] == 'Y')
			echo "<script>structReload('".urlencode($_REQUEST["path"])."');</script>";

		$ID = CUndo::Add($arUndoParams);
开发者ID:ASDAFF,项目名称:open_bx,代码行数:30,代码来源:file_delete.php

示例2: preg_replace

$io = CBXVirtualIo::GetInstance();
$path = $io->CombinePath("/", $path);
$arParsedPath = CFileMan::ParsePath(array($site, $path), true, false, "", $logical == "Y");
$menufilename = $path;
$name = preg_replace("/[^a-z0-9_]/i", "", $_REQUEST["name"]);
$menufilename = $io->CombinePath($path, "." . $name . ".menu.php");
$arPath_m = array($site, $menufilename);
$abs_path = $io->CombinePath($DOC_ROOT, $menufilename);
$strWarning = "";
$module_id = "fileman";
//delete menu file
if ($_REQUEST["action"] == "delete" && check_bitrix_sessid()) {
    $success = false;
    if ($io->FileExists($abs_path) && $USER->CanDoFileOperation('fm_delete_file', $arPath_m)) {
        $f = $io->GetFile($abs_path);
        $arUndoParams = array('module' => 'fileman', 'undoType' => 'delete_menu', 'undoHandler' => 'CFileman::UndoFileDelete', 'arContent' => array('site' => $site, 'path' => $menufilename, 'content' => $f->GetContents(), 'perm' => CFileMan::FetchFileAccessPerm($arPath_m, true)));
        if (COption::GetOptionInt("main", "disk_space") > 0) {
            $quota = new CDiskQuota();
            $quota->UpdateDiskQuota("file", $f->GetFileSize(), "delete");
        }
        $f->MarkWritable();
        $success = $io->Delete($abs_path);
        if (COption::GetOptionString($module_id, "log_menu", "Y") == "Y") {
            $mt = COption::GetOptionString("fileman", "menutypes", $default_value, $site);
            $mt = unserialize(str_replace("\\", "", $mt));
            $res_log['menu_name'] = $mt[$name];
            $res_log['path'] = substr($path, 1);
            CEventLog::Log("content", "MENU_DELETE", "main", "", serialize($res_log));
        }
        if ($success) {
            $GLOBALS["APPLICATION"]->RemoveFileAccessPermission($arPath_m);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:menu_edit.php

示例3: array

//delete menu file
if($_REQUEST["action"] == "delete" && check_freetrix_sessid())
{
	$success = false;
	if($io->FileExists($abs_path) && $USER->CanDoFileOperation('fm_delete_file', $arPath_m))
	{
		$f = $io->GetFile($abs_path);
		$arUndoParams = array(
			'module' => 'fileman',
			'undoType' => 'delete_menu',
			'undoHandler' => 'CFileman::UndoFileDelete',
			'arContent' => array(
				'site' => $site,
				'path' => $menufilename,
				'content' => $f->GetContents(),
				'perm' => CFileMan::FetchFileAccessPerm($arPath_m, true),
			)
		);

		if (COption::GetOptionInt("main", "disk_space") > 0)
		{
			$quota = new CDiskQuota();
			$quota->UpdateDiskQuota("file", $f->GetFileSize(), "delete");
		}

		$f->MarkWritable();
		$success = $io->Delete($abs_path);

		if(COption::GetOptionString($module_id, "log_menu", "Y")=="Y")
		{
			$mt = COption::GetOptionString("fileman", "menutypes", $default_value, $site);
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:menu_edit.php

示例4: isset

    $deleteFromMenu = isset($_REQUEST["delete_from_menu"]) && $_REQUEST["delete_from_menu"] == "Y";
    if (!check_bitrix_sessid()) {
        $strWarning = GetMessage("MAIN_SESSION_EXPIRED");
    }
} else {
    if ($io->ExtractNameFromPath($path) == "index.php") {
        $strNotice = GetMessage("PAGE_DELETE_INDEX_WARNING");
    }
    $deleteFromMenu = true;
}
//Delete File
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_REQUEST["save"]) && $strWarning == "") {
    CUtil::JSPostUnescape();
    CModule::IncludeModule("fileman");
    $f = $io->GetFile($absoluteFilePath);
    $arUndoParams = array('module' => 'fileman', 'undoType' => 'delete_file', 'undoHandler' => 'CFileman::UndoFileDelete', 'arContent' => array('path' => $path, 'content' => $f->GetContents(), 'site' => $site, 'perm' => CFileMan::FetchFileAccessPerm(array($site, $path)), 'SEF' => CUrlRewriter::GetList(array("PATH" => $path))));
    $success = BXDeleteFromSystem($absoluteFilePath, $path, $site);
    if ($success) {
        if ($deleteFromMenu) {
            $arUndoParams['arContent']['menu'] = BXDeleteFromMenu($documentRoot, $path, $site);
        }
        if ($_GET['subdialog'] == 'Y') {
            echo "<script>structReload('" . urlencode($_REQUEST["path"]) . "');</script>";
        }
        $ID = CUndo::Add($arUndoParams);
        CUndo::ShowUndoMessage($ID);
        //CUndo::Escape($ID);
        $popupWindow->Close($bReload = $_GET['subdialog'] != 'Y', $back_url);
    } else {
        $strWarning = GetMessage("PAGE_DELETE_ERROR_OCCURED");
    }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:file_delete.php


注:本文中的CFileMan::FetchFileAccessPerm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。