本文整理汇总了PHP中CFileman::GetTemplateContent方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileman::GetTemplateContent方法的具体用法?PHP CFileman::GetTemplateContent怎么用?PHP CFileman::GetTemplateContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileman
的用法示例。
在下文中一共展示了CFileman::GetTemplateContent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
$arTemplates = CFileman::GetFileTemplates(LANGUAGE_ID, array($site_template));
if(strlen($template)>0)
{
for ($i=0; $i<count($arTemplates); $i++)
{
if($arTemplates[$i]["file"] == $template)
{
$filesrc_tmp = CFileman::GetTemplateContent($arTemplates[$i]["file"], LANGUAGE_ID, array($site_template));
break;
}
}
}
else
$filesrc_tmp = CFileman::GetTemplateContent($arTemplates[0]["file"], LANGUAGE_ID, array($site_template));
}
if($REQUEST_METHOD=="POST" && strlen($save)>0)
{
if(!check_freetrix_sessid())
{
$strWarning = GetMessage("FILEMAN_SESSION_EXPIRED");
$bVarsFromForm = true;
}
// lpa was denied earlier, so use file src as is
$filesrc_for_save = $_POST['filesrc'];
if(strlen($strWarning) <= 0)
{
示例2: substr
}
if (strlen($sectionname) > 0) {
if (COption::GetOptionString($module_id, "log_page", "Y") == "Y") {
$res_log['path'] = substr($pathto, 1);
CEventLog::Log("content", "SECTION_ADD", "fileman", "", serialize($res_log));
}
$APPLICATION->SaveFileContent($DOC_ROOT . $pathto . "/.section.php", "<?\n\$sSectionName=\"" . CFileMan::EscapePHPString($sectionname) . "\";\n?>");
}
if ($e = $APPLICATION->GetException()) {
$strNotice = $e->msg;
} 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"]));
}
}
}
}