} 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) { if (!CFileMan::CheckOnAllowedComponents($filesrc_for_save)) { $str_err = $APPLICATION->GetException(); if($str_err && ($err = $str_err ->GetString())) $strWarning .= $err; $bVarsFromForm = true; } } if(strlen($strWarning) <= 0) { $f = $io->GetFile($abs_path); $arUndoParams = array( 'module' => 'fileman', 'undoType' => 'edit_file', 'undoHandler' => 'CFileman::UndoEditFile',
$body = '<body>'; $wa = '#WORK_AREA#'; $body_pos = strpos($ucont, $body); $sp_pos = strpos($ucont, strtolower($sp)); $wa_pos = strpos($ucont, strtolower($wa), $body_pos); if ($body_pos !== false && $sp_pos === false) // Add $APPLICATION->ShowPanel(); $CONTENT = substr($CONTENT, 0, $body_pos + strlen($body)).$sp.substr($CONTENT, $body_pos + strlen($body)); if ($wa_pos === false) $CONTENT .= $wa; } if(!class_exists('CFileMan')) CModule::IncludeModule("fileman"); if(class_exists('CFileMan') && method_exists(CFileMan, CheckOnAllowedComponents)) { if (!CFileMan::CheckOnAllowedComponents($CONTENT)) { $str_err = $APPLICATION->GetException(); if($str_err && ($err = $str_err ->GetString())) $strError .= $err; $bVarsFromForm = true; } } if(strlen($strError) <= 0) { $ST = new CSiteTemplate(); $arFields = Array( "ID" => $ID, "NAME" => $NAME, "DESCRIPTION" => $DESCRIPTION,