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


PHP CFileMan::ParsePath方法代码示例

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


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

示例1: while

            $site = $arSite["ID"];
            break;
        }
    }
} else {
    while ($arSite = $dbSitesList->GetNext()) {
        $dir = rtrim($arSite["DIR"], "/");
        if (substr($path, 0, strlen($dir)) == $dir) {
            $site = $arSite["ID"];
            break;
        }
    }
}
$site = CFileMan::__CheckSite($site);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$arParsedPath = CFileMan::ParsePath(array($site, $path), true, false, "", $logical == "Y");
$menufilename = $path;
$bExists = false;
$arTypes = array();
$armt = GetMenuTypes($site, "left=" . GetMessage("FILEMAN_MENU_EDIT_LEFT_MENU") . ",top=" . GetMessage("FILEMAN_MENU_EDIT_TOP_MENU"));
foreach ($armt as $key => $title) {
    if (!$USER->CanDoFileOperation('fm_edit_existent_file', array($site, $path . "/." . $key . ".menu.php"))) {
        continue;
    }
    $arTypes[] = array($key, $title);
    if ($key == $name) {
        $bExists = true;
    }
}
if (!$bExists) {
    $name = $arTypes[0][0];
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_menu_edit.php

示例2: array

    }
    $handle_action = false;
}
// Handling actions: group and single
if (($arID = $lAdmin->GroupAction()) && ($USER->CanDoOperation('fileman_admin_files') || $USER->CanDoOperation('fileman_admin_folders')) && $handle_action) {
    if ($_REQUEST['action_target'] == 'selected') {
        $arID = array();
        if ($bSearch) {
            $searchRes = CFilemanSearch::GetSearchResult($searchSess);
            for ($i = 0, $l = count($searchRes); $i < $l; $i++) {
                $arID[] = $searchRes[$i]['path'];
            }
        } elseif (!CSite::IsDistinctDocRoots() || strlen($site) > 0 || strlen($path) > 0) {
            $DOC_ROOT = CSite::GetSiteDocRoot($site);
            $path = $io->CombinePath("/", $path);
            $arParsedPath = CFileMan::ParsePath(array($site, $path));
            $abs_path = $DOC_ROOT . $path;
            CFileMan::GetDirList(array($site, $path), $arDirs, $arFiles, $arFilter, array($by => $order), "DF", false, true);
            foreach ($arDirs as $Dir) {
                $arID[] = $Dir["NAME"];
            }
            foreach ($arFiles as $File) {
                $arID[] = $File["NAME"];
            }
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0 || $ID == '.') {
            continue;
        }
        // For search results we have full pathes
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:fileman_admin.php

示例3: Rel2Abs

<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/prolog.php";
if (!$USER->CanDoOperation('fileman_view_file_structure')) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/fileman/include.php";
$site = CFileMan::__CheckSite($site);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$strWarning = "";
$path = Rel2Abs("/", $path);
$arParsedPath = CFileMan::ParsePath($path);
$arPath = array($site, $path);
if ($type == "flash") {
    $ext = "swf,fla";
} elseif ($type == "image") {
    $ext = "gif,jpg,jpeg,bmp,png";
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_popup_admin.php";
if (!$USER->CanDoFileOperation('fm_download_file', $arPath) || HasScriptExtension($path)) {
    ShowError($arParsedPath["HTML"] . '<br><br><img src="/bitrix/images/fileman/deny.gif" width="28" height="28" border="0" align="left" alt="">' . GetMessage("ACCESS_DENIED"));
} else {
    CFileMan::GetDirList(array($site, $path), $arDirs, $arFiles, array("EXTENSIONS" => $ext, "MIN_PERMISSION" => "R"), array("name" => "asc"));
    ?>
<script>
<!--
function DoEvent(str)
{
	try
	{
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:fileman_file_list.php

示例4: LocalRedirect

                        } else {
                            if ($USER->CanDoFileOperation('fm_create_new_file', $arPath) && $USER->CanDoOperation('fileman_admin_files') && $mkindex == "Y") {
                                if ($toedit == "Y") {
                                    LocalRedirect("/bitrix/admin/fileman_html_edit.php?" . $addUrl . "&site=" . $site . "&template=" . Urlencode($template) . "&path=" . UrlEncode($pathto) . "&filename=index.php&new=Y" . (strlen($back_url) <= 0 ? "" : "&back_url=" . UrlEncode($back_url)) . (strlen($gotonewpage) <= 0 ? "" : "&gotonewpage=" . UrlEncode($gotonewpage)) . (strlen($backnewurl) <= 0 ? "" : "&backnewurl=" . UrlEncode($backnewurl)));
                                } else {
                                    $APPLICATION->SaveFileContent($DOC_ROOT . $pathto . "/index.php", CFileman::GetTemplateContent($template));
                                }
                            }
                        }
                        if ($e = $APPLICATION->GetException()) {
                            $strNotice = $e->msg;
                        } elseif (strlen($apply) <= 0 && $strNotice == '') {
                            if (strlen($back_url) > 0) {
                                LocalRedirect("/" . ltrim($back_url, "/"));
                            } else {
                                $arPathtoParsed = CFileMan::ParsePath(array($site, $pathto), false, false, "", $logical == "Y");
                                LocalRedirect("/bitrix/admin/fileman_admin.php?" . $addUrl . "&site=" . $site . "&path=" . UrlEncode($arPathtoParsed["PREV"]));
                            }
                        }
                    }
                }
            }
        } else {
            $mkindex = "Y";
            $toedit = "Y";
        }
    }
}
foreach ($arParsedPath["AR_PATH"] as $chainLevel) {
    $adminChain->AddItem(array("TEXT" => htmlspecialcharsex($chainLevel["TITLE"]), "LINK" => strlen($chainLevel["LINK"]) > 0 ? $chainLevel["LINK"] : ""));
}
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:fileman_newfolder.php

示例5: require_once

require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/fileman/prolog.php");
$FM_RIGHT = $APPLICATION->GetGroupRight("fileman");
if (!($USER->CanDoOperation('fileman_admin_files') || $USER->CanDoOperation('fileman_edit_existent_files')))
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/fileman/include.php");

require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_popup_admin.php");

$io = CBXVirtualIo::GetInstance();

$site = CFileMan::__CheckSite($site);
$DOC_ROOT = CSite::GetSiteDocRoot($site);

$path = $io->CombinePath("/", $path);
$arParsedPath = CFileMan::ParsePath(Array($site, $path), true);
$abs_path = $DOC_ROOT.$path;
$arPath = Array($site, $path);
$bUploaded = false;
$file_name = "";
$strWarning = "";
if($REQUEST_METHOD=="POST" && strlen($saveimg)>0 && check_freetrix_sessid())
{
	if(!$USER->CanDoOperation('fileman_edit_existent_files') ||
	!$USER->CanDoFileOperation('fm_edit_existent_file',$arPath))
	{
		$strWarning = GetMessage('FILEMAN_CAN_NOT_WRITE')."<br>";
	}
	else
	{
		$file_name = CFileman::GetFileName($newfilename);
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:fileman_fck_browser.php


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