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


PHP GetDirPath函数代码示例

本文整理汇总了PHP中GetDirPath函数的典型用法代码示例。如果您正苦于以下问题:PHP GetDirPath函数的具体用法?PHP GetDirPath怎么用?PHP GetDirPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: array

    if ($default_outfile_action == "F") {
        echo "selected";
    }
    ?>
><?php 
    echo Loc::getMessage("CAT_DEF_OUTFILE_F");
    ?>
</option>
			</select>
		</td>
	</tr>
	<tr>
		<td width="40%">
		<?php 
    $yandex_agent_file = Option::get('catalog', 'yandex_agent_file');
    CAdminFileDialog::ShowScript(array("event" => "BtnClick", "arResultDest" => array("FORM_NAME" => "ara", "FORM_ELEMENT_NAME" => "yandex_agent_file"), "arPath" => array("PATH" => GetDirPath($yandex_agent_file)), "select" => 'F', "operation" => 'O', "showUploadTab" => true, "showAddToMenuTab" => false, "fileFilter" => 'php', "allowAllFiles" => true, "SaveConfig" => true));
    ?>
		<?php 
    echo Loc::getMessage("CAT_AGENT_FILE");
    ?>
</td>
		<td width="60%"><input type="text" name="yandex_agent_file" size="50" maxlength="255" value="<?php 
    echo $yandex_agent_file;
    ?>
">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick()"></td>
	</tr>
	<tr class="heading">
		<td colspan="2"><?php 
    echo Loc::getMessage("CO_PAR_IE_CSV");
    ?>
</td>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:options.php

示例2: GetMessage

     $arRunErrors[] = GetMessage("CES_ERROR_BAD_EXPORT_FILENAME");
 } else {
     $SETUP_FILE_NAME = Rel2Abs("/", $SETUP_FILE_NAME);
     if (strtolower(substr($SETUP_FILE_NAME, strlen($SETUP_FILE_NAME) - 4)) != ".csv") {
         $SETUP_FILE_NAME .= ".csv";
     }
     if (0 !== strpos($SETUP_FILE_NAME, $strCatalogDefaultFolder)) {
         $arRunErrors[] = GetMessage('CES_ERROR_PATH_WITHOUT_DEFAUT');
     } else {
         CheckDirPath($_SERVER["DOCUMENT_ROOT"] . $SETUP_FILE_NAME);
         if (!($fp = fopen($_SERVER["DOCUMENT_ROOT"] . $SETUP_FILE_NAME, "wb"))) {
             $arRunErrors[] = GetMessage("CATI_CANNOT_CREATE_FILE");
         }
         @fclose($fp);
         if ('Y' == $export_files) {
             $strExportPath = GetDirPath($SETUP_FILE_NAME);
             $strFilePath = str_replace($strExportPath, '', substr($SETUP_FILE_NAME, 0, -4)) . '_files/';
             if (!CheckDirPath($_SERVER['DOCUMENT_ROOT'] . $strExportPath . $strFilePath)) {
                 $arRunErrors[] = str_replace('#PATH#', $strExportPath . $strFilePath, GetMessage('CATI_NO_RIGHTS_EXPORT_FILES_PATH'));
                 $export_files = 'N';
             }
         }
     }
 }
 $bFieldsPres = !empty($field_needed) && is_array($field_needed) && in_array('Y', $field_needed);
 if ($bFieldsPres && (empty($field_code) || !is_array($field_code))) {
     $bFieldsPres = false;
 }
 if (!$bFieldsPres) {
     $arRunErrors[] = GetMessage("CATI_NO_FIELDS");
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:csv_new_run.php

示例3: GetMessage

echo GetMessage("FLOW_TITLE");
?>
</td>
		<td><input type="text" name="TITLE" maxlength="255" value="<?php 
echo $str_TITLE;
?>
" style="width:60%"></td>
	</tr>
	<?php 
if (COption::GetOptionString("workflow", "USE_HTML_EDIT", "Y") == "Y" && CModule::IncludeModule("fileman")) {
    ?>
	<tr>
		<td colspan="2" align="center"><?php 
    $limit_php_access = $USER->CanDoFileOperation('fm_lpa', array($str_SITE_ID, $str_FILENAME)) && !$USER->CanDoOperation('edit_php');
    $bWithoutPHP = !$USER->CanDoOperation('edit_php') && !$limit_php_access;
    CFileMan::AddHTMLEditorFrame("BODY", $str_BODY, "BODY_TYPE", $str_BODY_TYPE, 400, "Y", $ID, GetDirPath($str_FILENAME), "", false, $bWithoutPHP, false, array('limit_php_access' => $limit_php_access));
    ?>
</td>
	</tr>
	<?php 
} else {
    ?>
	<tr>
		<td colspan="2" align="center"><?php 
    echo InputType("radio", "BODY_TYPE", "text", $str_BODY_TYPE, false);
    ?>
&nbsp;<?php 
    echo GetMessage("FLOW_TEXT");
    ?>
/&nbsp;<?php 
    echo InputType("radio", "BODY_TYPE", "html", $str_BODY_TYPE, false);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:workflow_edit.php

示例4: GetFileContent

 public static function GetFileContent($did, $fname, $wf_path = "", $site = false)
 {
     $err_mess = CAllWorkflow::err_mess() . "<br>Function: GetFileContent<br>Line: ";
     global $DB, $APPLICATION, $USER;
     $did = intval($did);
     // check if executable
     if ($USER->IsAdmin() || CBXVirtualIoFileSystem::ValidatePathString($fname) && !HasScriptExtension($fname)) {
         if ($did > 0) {
             // check if it is associated wtih document
             $z = CWorkflow::GetFileByID($did, $fname);
             // found one
             if ($zr = $z->Fetch()) {
                 // get it's contents
                 $path = CWorkflow::GetTempDir() . $zr["TEMP_FILENAME"];
                 if (file_exists($path)) {
                     return $APPLICATION->GetFileContent($path);
                 }
             } else {
                 // lookup in database
                 $strSql = "SELECT FILENAME, SITE_ID FROM b_workflow_document WHERE ID='{$did}'";
                 $y = $DB->Query($strSql, false, $err_mess . __LINE__);
                 // found
                 if ($yr = $y->Fetch()) {
                     // get it's directory
                     $path = GetDirPath($yr["FILENAME"]);
                     // absolute path
                     $pathto = Rel2Abs($path, $fname);
                     $DOC_ROOT = CSite::GetSiteDocRoot($yr["SITE_ID"]);
                     $path = $DOC_ROOT . $pathto;
                     // give it another try
                     $u = CWorkflow::GetFileByID($did, $pathto);
                     // found
                     if ($ur = $u->Fetch()) {
                         // get it's contents
                         $path = CWorkflow::GetTempDir() . $ur["TEMP_FILENAME"];
                         if (file_exists($path)) {
                             return $APPLICATION->GetFileContent($path);
                         }
                     } elseif (file_exists($path)) {
                         // get it's contents
                         if ($USER->CanDoFileOperation('fm_view_file', array($yr["SITE_ID"], $pathto))) {
                             return $APPLICATION->GetFileContent($path);
                         }
                     }
                 }
             }
         }
         $DOC_ROOT = CSite::GetSiteDocRoot($site);
         // new one
         if (strlen($wf_path) > 0) {
             $pathto = Rel2Abs($wf_path, $fname);
             $path = $DOC_ROOT . $pathto;
             if (file_exists($path)) {
                 // get it's contents
                 if ($USER->CanDoFileOperation('fm_view_file', array($site, $pathto))) {
                     $src = $APPLICATION->GetFileContent($path);
                     return $src;
                 }
             }
         }
         // still failed to find
         // get path
         $path = $DOC_ROOT . $fname;
         if (file_exists($path)) {
             // get it's contents
             if ($USER->CanDoFileOperation('fm_view_file', array($site, $fname))) {
                 return $APPLICATION->GetFileContent($path);
             }
         }
     } else {
         return GetMessage("FLOW_ACCESS_DENIED_PHP_VIEW");
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:73,代码来源:workflow.php

示例5: UndoNewFile

    function UndoNewFile($Params, $type)
    {
        global $APPLICATION;
        $documentRoot = CSite::GetSiteDocRoot($Params['site']);
        $io = CBXVirtualIo::GetInstance();
        // Delete file
        $f = $io->GetFile($Params['absPath']);
        $f->MarkWritable();
        if (COption::GetOptionInt("main", "disk_space") > 0) {
            $file_size = $f->GetFileSize();
            $quota = new CDiskQuota();
            $quota->UpdateDiskQuota("file", $file_size, "delete");
        }
        $sucess = $io->Delete($Params['absPath']);
        if (!$sucess) {
            return;
        }
        $APPLICATION->RemoveFileAccessPermission(array($Params['site'], $Params['path']));
        if (CModule::IncludeModule("search")) {
            CSearch::DeleteIndex("main", $Params['site'] . "|" . $Params['path']);
        }
        // Find and clean file from menu
        if ($Params['menu']) {
            $arMenu = CFileman::GetMenuArray($documentRoot . $Params['menu']['menuFile']);
            if (!empty($arMenu["aMenuLinks"])) {
                $found = false;
                foreach ($arMenu["aMenuLinks"] as $menuIndex => $arItem) {
                    if ($arItem[1] == $Params['menu']['menuPath'] && $arItem[0] == $Params['menu']['menuName']) {
                        unset($arMenu["aMenuLinks"][$menuIndex]);
                        $found = true;
                        break;
                    }
                }
                if ($found) {
                    CFileMan::SaveMenu(array($Params['site'], $Params['menu']['menuFile']), $arMenu["aMenuLinks"], $arMenu["sMenuTemplate"]);
                }
            }
        }
        if (isset($Params['public']) && $Params['public'] == 'Y') {
            ?>
			<script type="text/javascript">
				window.location = '<?php 
            echo CUtil::JSEscape(CHTTP::URN2URI(GetDirPath($Params['path'])));
            ?>
';
			</script>
		<?php 
        }
        $GLOBALS["CACHE_MANAGER"]->CleanDir("menu");
    }
开发者ID:Satariall,项目名称:izurit,代码行数:50,代码来源:fileman.php

示例6: StrLen

</td>
		<td>
<?php 
            }
            if (!array_key_exists($ID, $arValues)) {
                if (SubStr($ID, 0, StrLen("SEF_URL_TEMPLATES_")) == "SEF_URL_TEMPLATES_" && is_array($arValues["SEF_URL_TEMPLATES"]) && array_key_exists(SubStr($ID, StrLen("SEF_URL_TEMPLATES_")), $arValues["SEF_URL_TEMPLATES"])) {
                    $arValues[$ID] = $arValues["SEF_URL_TEMPLATES"][SubStr($ID, StrLen("SEF_URL_TEMPLATES_"))];
                } elseif (SubStr($ID, 0, StrLen("VARIABLE_ALIASES_")) == "VARIABLE_ALIASES_" && is_array($arValues["VARIABLE_ALIASES"]) && array_key_exists(SubStr($ID, StrLen("VARIABLE_ALIASES_")), $arValues["VARIABLE_ALIASES"])) {
                    $arValues[$ID] = $arValues["VARIABLE_ALIASES"][SubStr($ID, StrLen("VARIABLE_ALIASES_"))];
                }
            }
            if (!array_key_exists($ID, $arValues) && isset($prop["DEFAULT"])) {
                $arValues[$ID] = $prop["DEFAULT"];
            }
            if ($arValues["SEF_FOLDER"] == "") {
                $arValues["SEF_FOLDER"] = GetDirPath($_GET["src_page"]);
            }
            if ($prop["MULTIPLE"] == 'Y' && !is_array($arValues[$ID])) {
                if (isset($arValues[$ID])) {
                    $val = array($arValues[$ID]);
                } else {
                    $val = array();
                }
            } elseif ($prop["TYPE"] == "LIST" && !is_array($arValues[$ID])) {
                $val = array($arValues[$ID]);
            } else {
                $val = $arValues[$ID];
            }
            $res = "";
            if ($prop["COLS"] < 1) {
                $prop["COLS"] = '30';
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component_props2.php

示例7: array

echo Loc::getMessage("CAT_DEF_OUTFILE_F");
?>
</option>
			</select>
		</td>
	</tr>
	<tr>
		<td width="40%">
		<?
		$yandex_agent_file = Option::get('catalog', 'yandex_agent_file');
		CAdminFileDialog::ShowScript
		(
			Array(
				"event" => "BtnClick",
				"arResultDest" => array("FORM_NAME" => "ara", "FORM_ELEMENT_NAME" => "yandex_agent_file"),
				"arPath" => array("PATH" => GetDirPath($yandex_agent_file)),
				"select" => 'F',// F - file only, D - folder only
				"operation" => 'O',// O - open, S - save
				"showUploadTab" => true,
				"showAddToMenuTab" => false,
				"fileFilter" => 'php',
				"allowAllFiles" => true,
				"SaveConfig" => true,
			)
		);
		?>
		<?echo Loc::getMessage("CAT_AGENT_FILE")?></td>
		<td width="60%"><input type="text" name="yandex_agent_file" size="50" maxlength="255" value="<?echo $yandex_agent_file?>">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick()"></td>
	</tr>
	<tr class="heading">
		<td colspan="2"><?echo Loc::getMessage("CO_PAR_IE_CSV") ?></td>
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:31,代码来源:options.php

示例8: GetMessage

				<div class="adm-list-item"
					id="SETTINGS[<?echo $FIELD_ID?>][DEFAULT_VALUE][USE_WATERMARK_TEXT]"
					style="padding-left:16px;display:<?
						if($arFields[$FIELD_ID]["DEFAULT_VALUE"]["USE_WATERMARK_TEXT"]==="Y") echo 'block'; else echo 'none';
					?>"
				>
					<?echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_TEXT")?>:&nbsp;<input
						name="FIELDS[<?echo $FIELD_ID?>][DEFAULT_VALUE][WATERMARK_TEXT]"
						type="text"
						value="<?echo htmlspecialcharsbx($arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT"])?>"
						size="35"
					>
					<?CAdminFileDialog::ShowScript(array(
						"event" => "BtnClickFont".$FIELD_ID,
						"arResultDest" => array("ELEMENT_ID" => "FIELDS_".$FIELD_ID."__DEFAULT_VALUE__WATERMARK_TEXT_FONT_"),
						"arPath" => array("PATH" => GetDirPath(($arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_FONT"]))),
						"select" => 'F',// F - file only, D - folder only
						"operation" => 'O',// O - open, S - save
						"showUploadTab" => true,
						"showAddToMenuTab" => false,
						"fileFilter" => 'ttf',
						"allowAllFiles" => false,
						"SaveConfig" => true,
					));?>
				</div>
				<div class="adm-list-item"
					id="SETTINGS[<?echo $FIELD_ID?>][DEFAULT_VALUE][WATERMARK_TEXT_FONT]"
					style="padding-left:16px;display:<?
						if($arFields[$FIELD_ID]["DEFAULT_VALUE"]["USE_WATERMARK_TEXT"]==="Y") echo 'block'; else echo 'none';
					?>"
				>
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:31,代码来源:iblock_edit.php

示例9: array

		<?php 
CAdminFileDialog::ShowScript(array("event" => "BtnClick", "arResultDest" => array("FORM_NAME" => "form", "FORM_ELEMENT_NAME" => "EDIT_FILE_BEFORE"), "arPath" => array("SITE" => SITE_ID, "PATH" => GetDirPath($str_EDIT_FILE_BEFORE)), "select" => 'F', "operation" => 'O', "showUploadTab" => true, "showAddToMenuTab" => false, "fileFilter" => 'php', "allowAllFiles" => true, "SaveConfig" => true));
?>
		<?php 
echo GetMessage("IBTYPE_E_FILE_BEFORE");
?>
</td>
		<td><input type="text" name="EDIT_FILE_BEFORE" size="50"  maxlength="255" value="<?php 
echo $str_EDIT_FILE_BEFORE;
?>
">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick()"></td>
	</tr>
	<tr>
		<td>
		<?php 
CAdminFileDialog::ShowScript(array("event" => "BtnClick2", "arResultDest" => array("FORM_NAME" => "form", "FORM_ELEMENT_NAME" => "EDIT_FILE_AFTER"), "arPath" => array("SITE" => SITE_ID, "PATH" => GetDirPath($str_EDIT_FILE_AFTER)), "select" => 'F', "operation" => 'O', "showUploadTab" => true, "showAddToMenuTab" => false, "fileFilter" => 'php', "allowAllFiles" => true, "SaveConfig" => true));
?>
		<?php 
echo GetMessage("IBTYPE_E_FILE_AFTER");
?>
</td>
		<td><input type="text" name="EDIT_FILE_AFTER" size="50"  maxlength="255" value="<?php 
echo $str_EDIT_FILE_AFTER;
?>
">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick2()"></td>
	</tr>


<?php 
$tabControl->Buttons(array("disabled" => false, "back_url" => $back_url));
$tabControl->End();
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_type_edit.php

示例10: drawSelectPath

 public static function drawSelectPath($name, $value, $form_name)
 {
     $event_name = 'btnClick_' . uniqid();
     \CAdminFileDialog::ShowScript(array('event' => $event_name, 'arResultDest' => array('FORM_NAME' => $form_name, 'FORM_ELEMENT_NAME' => $name), 'arPath' => array('PATH' => GetDirPath($value)), 'select' => 'F', 'operation' => 'O', 'showUploadTab' => false, 'showAddToMenuTab' => false, 'fileFilter' => 'php', 'allowAllFiles' => true, 'SaveConfig' => true));
     return '<input type="text" name="' . $name . '" size="50"  maxlength="255" value="' . htmlspecialchars($value) . '">&nbsp;<input type="button"' . ' name="browse" value="..." onClick="' . $event_name . '()">';
 }
开发者ID:ASDAFF,项目名称:ummailtemplates,代码行数:6,代码来源:options.helper.php

示例11: COPY

 function COPY($options, $drop = false)
 {
     $statusSymlinkDelete = false;
     $arCacheCleanID = array();
     if (!$this->CheckWebRights("", array("action" => "create"), true)) {
         return $this->ThrowAccessDenied(__LINE__);
     } elseif ($_SERVER['REQUEST_METHOD'] == "MOVE" && !empty($_SERVER["CONTENT_LENGTH"])) {
         return "415 Unsupported media type";
     } elseif ($options["path"] == $options["dest_url"]) {
         return "204 No Content";
     } elseif (empty($options["dest_url"])) {
         return $this->ThrowError("502 bad gateway", "EMPTY_DESTINATION_URL", GetMessage("WD_FILE_ERROR2"), __LINE__);
     }
     $destUrl = $options["dest_url"];
     if (substr($destUrl, -1) === "/") {
         $destUrl = substr($destUrl, 0, -1);
     }
     $destName = GetFileName($destUrl);
     if ($destUrl !== "" && $destName !== "") {
         $destParentDir = GetDirPath($destUrl);
         $destParentDir = count($destParentDir) > 0 ? $destParentDir : "/";
         $o = array("path" => $destParentDir, "depth" => 1);
         $result = $this->PROPFIND($o, $files, array("COLUMNS" => array("ID", "NAME"), "return" => "array"));
         if (!empty($result["RESULT"])) {
             foreach ($result["RESULT"] as $key => $res) {
                 if ($res["NAME"] === $destName) {
                     if (strlen(GetFileExtension($destName)) > 0) {
                         return $this->ThrowError("400 Bad Request", "FOLDER_IS_EXISTS", str_replace("#FILE#", '"' . $res["NAME"] . '"', GetMessage("WD_FILE_ERROR8")), __LINE__);
                     } elseif (isset($options['section_id']) && $res['ID'] == $options['section_id']) {
                         return $this->ThrowError("400 Bad Request", "SAME_FOLDER_IS_EXISTS", str_replace("#FOLDER#", '"' . $res["NAME"] . '"', GetMessage("WD_FILE_ERROR5")), __LINE__);
                     } else {
                         return $this->ThrowError("400 Bad Request", "FOLDER_IS_EXISTS", str_replace("#FOLDER#", '"' . $res["NAME"] . '"', GetMessage("WD_FILE_ERROR5")), __LINE__);
                     }
                 }
             }
         }
     }
     //$this->CheckUniqueName($basename, $section_id, &$res)
     //GetFileName()
     $arFrom = array();
     $arTo = array();
     $is_dir = false;
     ////////////// CHECK FROM
     $this->IsDir($options);
     $arFrom = $this->arParams;
     if ($this->arParams["not_found"]) {
         return $this->ThrowError("404 Not Found", "DESTINATION_FILE_OR_FOLDER_IS_NOT_FOUND", GetMessage("WD_FILE_ERROR3"), __LINE__);
     } elseif ($this->arParams["is_dir"] === true) {
         $is_dir = true;
         if ($_SERVER['REQUEST_METHOD'] == "MOVE" && $options["depth"] != "infinity") {
             return "400 Bad request";
         } elseif ($this->check_creator) {
             return $this->ThrowAccessDenied("USER_IS_NOT_CREATOR", __LINE__);
         } elseif (empty($options["path"])) {
             $options["path"] = $this->_get_path($arFrom["item_id"], false);
         }
         $res = $this->_udecode($options["dest_url"]);
         $res2 = str_replace("//", "/", $res . "/");
         $res1 = str_replace("//", "/", $options["path"] . "/");
         if ($res1 === $res2) {
             return "204 No Content";
         } elseif (strtolower(substr($res2, 0, strlen($res1))) == strtolower($res1) && strlen($res1) != strlen($res2)) {
             return $this->ThrowError("400 Bad Request", "SECTION_IS_NOT_UPDATED", GetMessage("WD_FILE_ERROR100"), __LINE__);
         }
     } else {
         // found and is_file
     }
     if (!empty($arFrom['parent_id'])) {
         list($contextType, $contextEntityId) = $this->getContextData();
         $sectionData = $this->getSectionDataForLinkAnalyze($arFrom['parent_id']);
         if (CWebDavSymlinkHelper::isLink($contextType, $contextEntityId, $sectionData)) {
             $arFrom['is_symlink'] = true;
             $arFrom['symlink_section_data'] = $sectionData;
             $arFrom['symlink_section_data_link'] = CWebDavSymlinkHelper::getLinkData($contextType, $contextEntityId, $sectionData);
         }
     }
     ////////////// CHECK TO
     $arToParams = array("path" => $options['dest_url']);
     if (strpos($options['dest_url'], '.Trash') !== false) {
         $arToParams['check_permissions'] = false;
     }
     $this->IsDir($arToParams);
     $arTo = $this->arParams;
     if (!empty($arTo['parent_id'])) {
         list($contextType, $contextEntityId) = $this->getContextData();
         $sectionData = $this->getSectionDataForLinkAnalyze($arTo['parent_id']);
         if (CWebDavSymlinkHelper::isLink($contextType, $contextEntityId, $sectionData)) {
             $arTo['is_symlink'] = true;
             $arTo['symlink_section_data'] = $sectionData;
             $arTo['symlink_section_data_link'] = CWebDavSymlinkHelper::getLinkData($contextType, $contextEntityId, $sectionData);
         }
     }
     if ($this->arParams["not_found"] == true) {
         if ($this->e_rights && strpos($options['dest_url'], '.Trash') === false && !$this->CheckWebRights("COPY", array('action' => $drop ? 'move' : 'copy', 'from' => array($arFrom), 'to' => array($arTo)), false)) {
             return $this->ThrowAccessDenied(__LINE__);
         }
         //$arTo = false;
     } elseif ($arFrom["is_dir"] === true && $arTo["is_file"] === true || $arFrom["is_file"] === true && $arTo["is_dir"] === true) {
         return $this->ThrowError("400 Bad Request", "FOLDER_IS_EXISTS", str_replace("#FOLDER#", $this->arParams["item_id"], GetMessage("WD_FILE_ERROR5")), __LINE__);
     } elseif (!$this->CheckWebRights("COPY", array('action' => $drop ? 'move' : 'copy', 'from' => array($arFrom), 'to' => array($arTo)), false)) {
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:iblock.php

示例12: GetMessage

				"SaveConfig" => true,
			)
		);
		?>
		<?echo GetMessage("IBTYPE_E_FILE_BEFORE")?></td>
		<td><input type="text" name="EDIT_FILE_BEFORE" size="50"  maxlength="255" value="<?echo $str_EDIT_FILE_BEFORE?>">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick()"></td>
	</tr>
	<tr>
		<td>
		<?
		CAdminFileDialog::ShowScript
		(
			Array(
				"event" => "BtnClick2",
				"arResultDest" => array("FORM_NAME" => "form", "FORM_ELEMENT_NAME" => "EDIT_FILE_AFTER"),
				"arPath" => array("SITE" => SITE_ID, "PATH" => GetDirPath($str_EDIT_FILE_AFTER)),
				"select" => 'F',// F - file only, D - folder only
				"operation" => 'O',// O - open, S - save
				"showUploadTab" => true,
				"showAddToMenuTab" => false,
				"fileFilter" => 'php',
				"allowAllFiles" => true,
				"SaveConfig" => true,
			)
		);
		?>
		<?echo GetMessage("IBTYPE_E_FILE_AFTER")?></td>
		<td><input type="text" name="EDIT_FILE_AFTER" size="50"  maxlength="255" value="<?echo $str_EDIT_FILE_AFTER?>">&nbsp;<input type="button" name="browse" value="..." onClick="BtnClick2()"></td>
	</tr>

开发者ID:ASDAFF,项目名称:open_bx,代码行数:29,代码来源:iblock_type_edit.php

示例13: getDiff

if ($ID > 0 && $PREV_ID > 0) {
    ?>
	<tr>
		<td colspan=2>
		<?php 
    echo getDiff($prev_ar["BODY"], $ar["BODY"]);
    ?>
		</td>
	</tr>
	<?php 
} elseif (COption::GetOptionString("workflow", "USE_HTML_EDIT", "Y") == "Y" && CModule::IncludeModule("fileman")) {
    ?>
	<tr>
		<td align="center" colspan="2"><?php 
    $bWithoutPHP = !$USER->IsAdmin();
    CFileMan::AddHTMLEditorFrame("BODY", $str_BODY, "BODY_TYPE", $str_BODY_TYPE, 300, "Y", $str_DOCUMENT_ID, GetDirPath($str_FILENAME), "", false, $bWithoutPHP);
    ?>
</td>
	</tr>
	<?php 
} else {
    ?>
	<tr>
		<td align="center" colspan="2"><?php 
    echo GetMessage("FLOW_TEXT");
    ?>
&nbsp;<?php 
    echo InputType("radio", "BODY_TYPE", "text", $str_BODY_TYPE, false);
    ?>
&nbsp;HTML&nbsp;<?php 
    echo InputType("radio", "BODY_TYPE", "html", $str_BODY_TYPE, false);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:workflow_history_view.php

示例14: COPY

 protected function COPY($dest, $httpDestination, $overwrite, $delete = false)
 {
     /** @var CDavRequest $request */
     $request = $this->request;
     $v = $request->GetParameter('CONTENT_LENGTH');
     if (!empty($v)) {
         return "415 Unsupported media type";
     }
     //if (isset($httpDestination))
     //{
     //	return "502 bad gateway";
     //}
     $requestDocument = $request->GetXmlDocument();
     //todo откуда мы узнаем хранилище относительно которого вести поиск?
     /** @var Storage $storage */
     list($storage, $path) = $this->parsePath($request->getPath());
     $objectId = Driver::getInstance()->getUrlManager()->resolveObjectIdFromPath($storage, $path);
     if (!$objectId) {
         return '404 Not Found';
     }
     /** @var File|Folder $object */
     $object = BaseObject::loadById($objectId);
     if (!$object) {
         return '404 Not Found';
     }
     $securityContext = $object->getStorage()->getCurrentUserSecurityContext();
     if (!$object->canRead($securityContext)) {
         return '403 Forbidden';
     }
     list($destStorage, $poludest) = $this->parsePath($dest);
     if (!$destStorage) {
         return '404 Not Found';
     }
     $srcPath = GetDirPath(rtrim($path, '/'));
     $destPath = GetDirPath($poludest);
     if ($srcPath == $destPath) {
         if (!$object->canRename($securityContext)) {
             return '403 Forbidden';
         }
         if (!$object->rename(GetFileName($poludest))) {
             return '400 Bad Request';
         }
         return "201 Created";
     }
     //		$ret = $this->createFolderPath($destStorage, $poludest);
     //		if ($ret !== true)
     //			return $ret;
     $poludestExploded = explode('/', $poludest);
     $poludestFolderName = array_pop($poludestExploded);
     $targetObjectId = Driver::getInstance()->getUrlManager()->resolveObjectIdFromPath($destStorage, implode('/', $poludestExploded));
     if (!$targetObjectId) {
         return '404 Not Found';
     }
     /** @var File|Folder $folder */
     $folder = Folder::loadById($targetObjectId);
     if (!$targetObjectId) {
         return '404 Not Found';
     }
     if ($delete) {
         if (!$object->canMove($securityContext, $folder)) {
             return '403 Forbidden';
         }
     } else {
         if (!$folder->canAdd($folder->getStorage()->getCurrentUserSecurityContext())) {
             return '403 Forbidden';
         }
     }
     $opponent = false;
     if ($overwrite) {
         $opponent = BaseObject::getList(array('select' => array('ID'), 'filter' => array('NAME' => GetFileName($poludest), 'PARENT_ID' => $folder->getRealObjectId()), 'limit' => 1))->fetch();
         if ($opponent) {
             /** @var File|Folder $opponentObject */
             $opponentObject = BaseObject::loadById($opponent['ID']);
             if (!$opponentObject->canMarkDeleted($opponentObject->getStorage()->getCurrentUserSecurityContext())) {
                 return '403 Forbidden';
             }
             if (!$opponentObject->markDeleted($this->getUser()->getId())) {
                 return '400 Bad Request';
             }
         }
     }
     if ($delete) {
         if (!$object->moveTo($folder, $this->getUser()->getId(), true)) {
             return '400 Bad Request';
         }
     } else {
         if (!$object->copyTo($folder, $this->getUser()->getId(), true)) {
             return '400 Bad Request';
         }
     }
     if (GetFileName($poludest) != $object->getName()) {
         $object->rename(GetFileName($poludest));
     }
     return $opponent ? "201 Created" : "204 No Content";
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:95,代码来源:webdavserver.php

示例15: GetDirIndex

function GetDirIndex($path, $strDirIndex=false)
{
	$doc_root = ($_SERVER["DOCUMENT_ROOT"] <> ''? $_SERVER["DOCUMENT_ROOT"] : $GLOBALS["DOCUMENT_ROOT"]);
	$dir = GetDirPath($path);
	$arrDirIndex = GetDirIndexArray($strDirIndex);
	if(is_array($arrDirIndex) && !empty($arrDirIndex))
	{
		foreach($arrDirIndex as $page_index)
			if(file_exists($doc_root.$dir.$page_index))
				return $page_index;
	}
	return "index.php";
}
开发者ID:nProfessor,项目名称:Mytb,代码行数:13,代码来源:tools.php


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