本文整理汇总了PHP中Rel2Abs函数的典型用法代码示例。如果您正苦于以下问题:PHP Rel2Abs函数的具体用法?PHP Rel2Abs怎么用?PHP Rel2Abs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Rel2Abs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MakeWizardPath
function MakeWizardPath($wizardName)
{
if (!CWizardUtil::CheckName($wizardName)) {
return "";
}
return Rel2Abs("/", "/" . str_replace(":", "/", $wizardName));
}
示例2: __ConvPathParam
function __ConvPathParam($path)
{
if (substr($path, 0, 1) == '/' || substr($path, 1, 2) == ":\\") {
$path_vhosts = $path;
} else {
$root = rtrim($_SERVER['DOCUMENT_ROOT'], '\\/');
$path_vhosts = Rel2Abs($root . '/', $path);
}
return $path_vhosts;
}
示例3: findCorrectFile
function findCorrectFile($path, &$strWarn, $warning = false)
{
$arUrl = CHTTP::ParseURL($path);
if ($arUrl && is_array($arUrl)) {
if (isset($arUrl['host'], $arUrl['scheme'])) {
if (strpos($arUrl['host'], 'xn--') !== false) {
// Do nothing
} else {
$originalPath = $path;
$path = $arUrl['scheme'] . '://' . $arUrl['host'];
$arErrors = array();
if (defined("BX_UTF")) {
$punicodedPath = CBXPunycode::ToUnicode($path, $arErrors);
} else {
$punicodedPath = CBXPunycode::ToASCII($path, $arErrors);
}
if ($pathPunicoded == $path) {
return $originalPath;
} else {
$path = $punicodedPath;
}
if ($arUrl['port'] && ($arUrl['scheme'] != 'http' || $arUrl['port'] != 80) && ($arUrl['scheme'] != 'https' || $arUrl['port'] != 443)) {
$path .= ':' . $arUrl['port'];
}
$path .= $arUrl['path_query'];
}
} else {
$DOC_ROOT = $_SERVER["DOCUMENT_ROOT"];
$path = Rel2Abs("/", $path);
$path_ = $path;
$io = CBXVirtualIo::GetInstance();
if (!$io->FileExists($DOC_ROOT . $path)) {
if (CModule::IncludeModule('clouds')) {
$path = CCloudStorage::FindFileURIByURN($path, "component:player");
if ($path == "") {
if ($warning) {
$strWarn .= $warning . "<br />";
}
$path = $path_;
}
} else {
if ($warning) {
$strWarn .= $warning . "<br />";
}
$path = $path_;
}
} elseif (strpos($_SERVER['HTTP_HOST'], 'xn--') !== false) {
$path = CHTTP::URN2URI($path);
}
}
}
return $path;
}
示例4: _IsItemSelected
function _IsItemSelected($arLinks = array())
{
if (!is_array($arLinks)) {
$arLinks = array($arLinks);
}
$cur_page = $GLOBALS["APPLICATION"]->GetCurPage(true);
$cur_dir = $GLOBALS["APPLICATION"]->GetCurDir();
$selected = false;
foreach ($arLinks as $tested_link) {
if (strlen($tested_link) <= 0) {
continue;
}
$tested_link = trim(Rel2Abs($cur_dir, $tested_link));
if (strpos($cur_page, $tested_link) === 0) {
$selected = true;
break;
}
if (($pos = strpos($tested_link, "?")) !== false) {
if (substr($tested_link, 0, $pos) == $cur_page) {
$params = explode("&", substr($tested_link, $pos + 1));
$bOK = true;
foreach ($params as $param) {
$eqpos = strpos($param, "=");
$varvalue = "";
if ($eqpos === false) {
$varname = $param;
} elseif ($eqpos == 0) {
continue;
} else {
$varname = substr($param, 0, $eqpos);
$varvalue = urldecode(substr($param, $eqpos + 1));
}
$globvarvalue = isset($GLOBALS[$varname]) ? $GLOBALS[$varname] : "";
if ($globvarvalue != $varvalue) {
$bOK = false;
break;
}
}
if ($bOK) {
$selected = true;
break;
}
}
}
}
return $selected;
}
示例5: getSkinsEx
function getSkinsEx($path)
{
$basePath = $_SERVER["DOCUMENT_ROOT"] . Rel2Abs("/", $path);
$arSkins = array();
if (!is_dir($basePath)) {
// Not valid folder
return $arSkins;
}
$arSkins = getSkinsFromDir($path);
$handle = @opendir($basePath);
while (false !== ($skinDir = @readdir($handle))) {
if (!is_dir($basePath . '/' . $skinDir) || $skinDir == "." || $skinDir == "..") {
continue;
}
$arDirSkins = getSkinsFromDir($path . '/' . $skinDir);
$arSkins = array_merge($arSkins, $arDirSkins);
}
return $arSkins;
}
示例6: OnPostForm
function OnPostForm()
{
$wizard =& $this->GetWizard();
$templateID = $wizard->GetSiteTemplateID();
$templatePath = BX_PERSONAL_ROOT . "/templates/" . $templateID;
$arReplace = array("COMPANY_NAME" => $wizard->GetVar("company_name"), "COMPANY_SLOGAN" => $wizard->GetVar("company_slogan"));
CWizardUtil::ReplaceMacros($_SERVER["DOCUMENT_ROOT"] . $templatePath . "/include_areas/company_name.php", $arReplace);
$server_name = $_SERVER["HTTP_HOST"] != '' ? $_SERVER["HTTP_HOST"] : $_SERVER["SERVER_NAME"];
if ($_SERVER["SERVER_PORT"] != 80 && $_SERVER["SERVER_PORT"] != 443 && $_SERVER["SERVER_PORT"] > 0 && strpos($_SERVER["HTTP_HOST"], ":") === false) {
$server_name .= ":" . $_SERVER["SERVER_PORT"];
}
COption::SetOptionString("main", "server_name", $server_name);
COption::SetOptionString("main", "site_name", htmlspecialcharsEx($wizard->GetVar("company_name")));
COption::SetOptionString("main", "wizard_company_slogan", $wizard->GetVar("company_slogan"));
$themeVarName = $templateID . "_themeID";
$themeID = $wizard->GetVar($themeVarName);
$themeID = Rel2Abs("/", $themeID);
$themePath = $_SERVER["DOCUMENT_ROOT"] . DemoSiteUtil::GetTemplatesPath($wizard->GetPath()) . "/" . $templateID . "/themes/" . $themeID;
CopyDirFiles($themePath, $_SERVER["DOCUMENT_ROOT"] . $templatePath, $rewrite = true, $recursive = true, $delete_after_copy = false, $exclude = "description.php");
$companyLogo = $wizard->GetVar("company_logo");
CWizardUtil::CopyFile($companyLogo, $templatePath . "/images/logo.gif", false);
COption::SetOptionString("main", "wizard_site_logo", $companyLogo);
}
示例7: require
<?
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php");
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_js.php");
$bFileMan = CModule::IncludeModule('fileman');
if(!$bFileMan)
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
CUtil::JSPostUnescape();
CComponentUtil::__IncludeLang(FX_PERSONAL_ROOT."/components/freetrix/player", "player_playlist_edit.php");
$strWarning = "";
$menufilename = "";
$path = Rel2Abs("/", $path);
$arPath = Array($site, $path);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$abs_path = $DOC_ROOT.$path;
$bCreate = !file_exists($abs_path);
if (($bCreate && (!$USER->CanDoFileOperation('fm_create_new_file', $arPath) || !$USER->CanDoOperation('fileman_edit_existent_files'))) ||
(!$bCreate && (!$USER->CanDoFileOperation('fm_edit_existent_file', $arPath) || !$USER->CanDoOperation('fileman_admin_files'))))
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
$arTracks = Array();
/* * * * * * * * * * * * * * POST * * * * * * * * * * * * * */
if($REQUEST_METHOD=="POST" && $_REQUEST['save'] == 'Y')
{
require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/classes/general/xml.php");
$objXML = new CDataXML();
$xmlsrc = '<?xml version="1.0" encoding="UTF-8"?>
示例8: array
}
if ($extended == "Y") {
$bSimple = false;
} else {
$bSimple = true;
}
$arPath_m = array($site, $menufilename);
$only_edit = !$USER->CanDoOperation('fileman_add_element_to_menu') || !$USER->CanDoFileOperation('fm_create_new_file', $arPath_m);
// Check access to folder
if (!$USER->CanDoOperation('fileman_edit_existent_files') || !$USER->CanDoFileOperation('fm_edit_existent_file', $arPath_m) || !$bEdit && $only_edit) {
$strWarning = GetMessage("ACCESS_DENIED");
} else {
if ($REQUEST_METHOD == "POST" && strlen($save) > 0 && is_array($ids) && check_bitrix_sessid()) {
$sMenuTemplateTmp = "";
if (strlen($template) > 0 && $template != GetMessage("FILEMAN_MENU_EDIT_DEF")) {
$sMenuTemplateTmp = Rel2Abs("/", $template);
}
$res = CFileMan::GetMenuArray($abs_path);
if ($bSimple) {
$aMenuLinksTmp = $res["aMenuLinks"];
$sMenuTemplateTmp = $res["sMenuTemplate"];
} else {
$aMenuLinksTmp = $res["aMenuLinks"];
$aMenuLinksTmp_ = array();
}
//соберем $aMenuLinksTmp из того что пришло с формы
$aMenuSort = array();
for ($i = 0, $l = count($ids); $i < $l; $i++) {
$num = $ids[$i];
if (!isset($aMenuLinksTmp[$num - 1]) && $only_edit) {
continue;
示例9: GetTDirList
}
$ph = "";
}
} else {
GetTDirList($path, true);
}
$strFile = '';
$arFileFilter = array();
if (isset($_REQUEST['file'])) {
$strFile = strval($_REQUEST['file']);
}
if (preg_match("#\\.\\.[\\/]#" . BX_UTF_PCRE_MODIFIER, $strFile)) {
$strFile = "";
}
if ('' != $strFile) {
$strFile = Rel2Abs("/", "/" . $strFile);
foreach ($arTLangs as $hlang) {
$ph = add_lang_id($strFile, $hlang, $arTLangs);
if ('' != $ph) {
$arFileFilter[] = $ph;
}
}
}
if (!empty($arFileFilter) && !empty($arFiles)) {
$arTemp = array();
foreach ($arFiles as &$arOneFile) {
if ('N' == $arOneFile['IS_DIR'] && in_array($arOneFile['PATH'], $arFileFilter)) {
$arTemp[] = $arOneFile;
}
}
if (isset($arOneFile)) {
示例10: IncludeModuleLangFile
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/filter_tools.php";
CModule::IncludeModule("controller");
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/controller/prolog.php";
$MOD_RIGHT = $APPLICATION->GetGroupRight("controller");
if ($MOD_RIGHT < "V") {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
IncludeModuleLangFile(__FILE__);
$maxSafeCount = isset($_REQUEST["force"]) && $_REQUEST["force"] == "Y" ? false : COption::GetOptionString("controller", "safe_count");
$cnt = 0;
$sTableID = "tbl_controller_upload";
$lAdmin = new CAdminList($sTableID);
$filename = Rel2Abs("/", trim($_REQUEST['filename']));
//Trailing slash indicates that we have a directory here
//never remove it due to security reasons
$path_to = Rel2Abs("/", trim($_REQUEST['path_to']) . "/");
if (strlen($filename) > 0 && strlen($path_to) > 0 && $USER->IsAdmin() && check_bitrix_sessid()) {
$lAdmin->BeginPrologContent();
$arFilter = array("CONTROLLER_GROUP_ID" => $_REQUEST['controller_group_id'], "DISCONNECTED" => "N");
$arFilter["ID"] = $_REQUEST['controller_member_id'];
if (!is_array($arFilter["ID"])) {
$IDs = explode(" ", $arFilter["ID"]);
$arFilter["ID"] = array();
foreach ($IDs as $id) {
$id = intval(trim($id));
if ($id > 0) {
$arFilter["ID"][] = $id;
}
}
}
if (is_array($arFilter["ID"]) && count($arFilter["ID"]) <= 0) {
示例11: BaseConvertToDB
function BaseConvertToDB($value)
{
$io = CBXVirtualIo::GetInstance();
$arRes = array("path" => "");
if (!is_array($value)) {
$value = array();
}
//In case of DB value just serialize it
if (implode("|", array_keys($value)) === 'path|width|height|title|duration|author|date|desc') {
return serialize($value);
}
if ($value["B_NEW_FILE"] != "N") {
if (strlen($value["CUR_PATH"]) > 0 && $value["DEL_CUR_FILE"] == "Y" && CIBlockPropertyVideo::CheckFileInUploadDir($value["CUR_PATH"])) {
// del current file
$cur_path_ = $_SERVER["DOCUMENT_ROOT"] . Rel2Abs("/", $value["CUR_PATH"]);
$flTmp = $io->GetFile($cur_path_);
$flSzTmp = $flTmp->GetFileSize();
if ($io->Delete($cur_path_)) {
// Quota
if (COption::GetOptionInt("main", "disk_space") > 0) {
CDiskQuota::updateDiskQuota("file", $flSzTmp, "delete");
}
}
}
// Get video
if (strlen($value["PATH"]) > 0) {
$arRes["path"] = $value["PATH"];
} else {
if (isset($value["FILE"]) && strlen($value["FILE"]["tmp_name"]) > 0) {
$pathToDir = CIBlockPropertyVideo::GetUploadDirPath();
if (!$io->DirectoryExists($_SERVER["DOCUMENT_ROOT"] . $pathToDir)) {
CFileMan::CreateDir($pathToDir);
}
// 1. Convert name
$name = preg_replace("/[^a-zA-Z0-9_:\\.]/is", "_", $value["FILE"]["name"]);
$baseNamePart = substr($name, 0, strpos($name, '.'));
$ext = GetFileExtension($name);
if (strlen($ext) > 0 && !HasScriptExtension($name) && !substr($name, 0, 1) != ".") {
$ind = 0;
// 2. Check if file already exists
while ($io->FileExists($_SERVER["DOCUMENT_ROOT"] . Rel2Abs($pathToDir, $name))) {
$name = $baseNamePart . "_(" . ++$ind . ")." . $ext;
}
// 3. Rename
$pathto = Rel2Abs($pathToDir, $name);
if (is_uploaded_file($value["FILE"]["tmp_name"]) && $io->Copy($value["FILE"]["tmp_name"], $_SERVER["DOCUMENT_ROOT"] . $pathto)) {
$arRes["path"] = Rel2Abs("/", $pathto);
// Quota
if (COption::GetOptionInt("main", "disk_space") > 0) {
CDiskQuota::updateDiskQuota("file", $value["FILE"]["size"], "add");
}
}
}
}
}
} elseif (strlen($value["CUR_PATH"]) > 0) {
if (preg_match("/^(http|https):\\/\\//", $value["CUR_PATH"])) {
$arRes["path"] = $value["CUR_PATH"];
} else {
$arRes["path"] = Rel2Abs("/", $value["CUR_PATH"]);
}
}
// Width & height
$arRes["width"] = intVal($value["WIDTH"]);
$arRes["height"] = intVal($value["HEIGHT"]);
if ($arRes["width"] < 0) {
$arRes["width"] = 400;
}
if ($arRes["height"] < 0) {
$arRes["height"] = 300;
}
// Video info
$arRes["title"] = $value["TITLE"];
$arRes["duration"] = $value["DURATION"];
$arRes["author"] = $value["AUTHOR"];
$arRes["date"] = $value["DATE"];
$arRes["desc"] = $value["DESC"];
$strRes = serialize($arRes);
if ($arRes["path"] == "" && $arRes["title"] == "" && $arRes["author"] == "") {
return "";
}
return $strRes;
}
示例12: CSVCheckTimeout
$max_execution_time = 0;
}
if (defined("CATALOG_LOAD_NO_STEP") && CATALOG_LOAD_NO_STEP) {
$max_execution_time = 0;
}
$bAllLinesLoaded = true;
$io = CBXVirtualIo::GetInstance();
if (!function_exists('CSVCheckTimeout')) {
function CSVCheckTimeout($max_execution_time)
{
return $max_execution_time <= 0 || getmicrotime() - START_EXEC_TIME <= $max_execution_time;
}
}
$DATA_FILE_NAME = "";
if (strlen($URL_DATA_FILE) > 0) {
$URL_DATA_FILE = Rel2Abs("/", $URL_DATA_FILE);
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $URL_DATA_FILE) && is_file($_SERVER["DOCUMENT_ROOT"] . $URL_DATA_FILE)) {
$DATA_FILE_NAME = $URL_DATA_FILE;
}
}
if (strlen($DATA_FILE_NAME) <= 0) {
$strImportErrorMessage .= GetMessage("CATI_NO_DATA_FILE") . "<br>";
}
$IBLOCK_ID = intval($IBLOCK_ID);
if ($IBLOCK_ID <= 0) {
$strImportErrorMessage .= GetMessage("CATI_NO_IBLOCK") . "<br>";
} else {
$arIBlock = CIBlock::GetArrayByID($IBLOCK_ID);
if (false === $arIBlock) {
$strImportErrorMessage .= GetMessage("CATI_NO_IBLOCK") . "<br>";
}
示例13: trim
Option::set('catalog', $name, $val, '');
}
}
$default_outfile_action = (isset($_REQUEST['default_outfile_action']) ? (string)$_REQUEST['default_outfile_action'] : '');
if ($default_outfile_action!="D" && $default_outfile_action!="H" && $default_outfile_action!="F")
{
$default_outfile_action = "D";
}
Option::set('catalog', 'default_outfile_action', $default_outfile_action, '');
$strYandexAgent = '';
$strYandexAgent = trim($_POST['yandex_agent_file']);
if (!empty($strYandexAgent))
{
$strYandexAgent = Rel2Abs('/', $strYandexAgent);
if (preg_match(BX_CATALOG_FILENAME_REG, $val) || (!file_exists($_SERVER['DOCUMENT_ROOT'].$strYandexAgent) || !is_file($_SERVER['DOCUMENT_ROOT'].$strYandexAgent)))
{
$strWarning .= Loc::getMessage('CAT_PATH_ERR_YANDEX_AGENT').'<br />';
$strYandexAgent = '';
}
}
Option::set('catalog', 'yandex_agent_file', $strYandexAgent, '');
$num_catalog_levels = (isset($_POST['num_catalog_levels']) ? (int)$_POST['num_catalog_levels'] : 3);
if ($num_catalog_levels <= 0)
$num_catalog_levels = 3;
Option::set('catalog', 'num_catalog_levels', $num_catalog_levels, '');
$serialSelectFields = array(
'allowed_product_fields',
示例14: GetTreeRecursive
function GetTreeRecursive($PARENT_PATH, $level, $max_depth, $get_description = false)
{
global $arrMainMenu, $arrChildMenu, $arrSearchPath, $APPLICATION, $USER;
static $arIndexes = false;
if ($arIndexes === false) {
$arIndexes = GetDirIndexArray();
}
$i = 0;
$arrMenu = $level == 0 ? $arrMainMenu : $arrChildMenu;
$map = array();
if (is_array($arrMenu) && count($arrMenu) > 0) {
foreach ($arrMenu as $mmenu) {
$menu_file = "." . trim($mmenu) . ".menu.php";
$menu_file_ext = "." . trim($mmenu) . ".menu_ext.php";
$aMenuLinks = array();
if (file_exists($PARENT_PATH . $menu_file)) {
include $PARENT_PATH . $menu_file;
$bExists = true;
}
if (file_exists($PARENT_PATH . $menu_file_ext)) {
include $PARENT_PATH . $menu_file_ext;
$bExists = true;
}
if ($bExists && is_array($aMenuLinks)) {
foreach ($aMenuLinks as $aMenu) {
if (strlen($aMenu[0]) <= 0) {
continue;
}
if (count($aMenu) > 4) {
$CONDITION = $aMenu[4];
if (strlen($CONDITION) > 0 && !eval("return " . $CONDITION . ";")) {
continue;
}
}
$search_child = false;
$search_path = '';
if (strlen($aMenu[1]) > 0) {
if (preg_match("'^(([A-Za-z]+://)|mailto:|javascript:)'i", $aMenu[1])) {
$full_path = $aMenu[1];
} else {
$full_path = trim(Rel2Abs(substr($PARENT_PATH, strlen($_SERVER["DOCUMENT_ROOT"])), $aMenu[1]));
$slash_pos = strrpos($full_path, "/");
if ($slash_pos !== false) {
$page = substr($full_path, $slash_pos + 1);
if (($pos = strpos($page, '?')) !== false) {
$page = substr($page, 0, $pos);
}
if ($page == '' || $page == 'index.php' || in_array($page, $arIndexes)) {
$search_path = substr($full_path, 0, $slash_pos + 1);
$search_child = true;
}
}
}
} else {
$full_path = $PARENT_PATH;
}
if (strlen($full_path) > 0) {
$FILE_ACCESS = preg_match("'^(([A-Za-z]+://)|mailto:|javascript:)'i", $full_path) ? "R" : $APPLICATION->GetFileAccessPermission($full_path);
if ($FILE_ACCESS != "D" && $aMenu[3]["SEPARATOR"] != "Y") {
$is_dir = $search_child && is_dir($_SERVER["DOCUMENT_ROOT"] . $search_path) ? "Y" : "N";
if ($is_dir == "Y") {
$search_child &= $level < $max_depth;
$search_child &= !in_array($search_path, $arrSearchPath);
} else {
$search_child = false;
}
$ar = array();
$ar["LEVEL"] = $level;
if (isset($aMenu[3]["DEPTH_LEVEL"]) && $aMenu[3]["DEPTH_LEVEL"] > 1) {
$ar["LEVEL"] += $aMenu[3]["DEPTH_LEVEL"] - 1;
}
if ($ar["LEVEL"] > $max_depth) {
continue;
}
$ar["ID"] = md5($full_path . $ar["COUNTER"]);
$ar["IS_DIR"] = is_dir($_SERVER["DOCUMENT_ROOT"] . $full_path) ? "Y" : "N";
$ar["NAME"] = $aMenu[0];
$ar["PATH"] = $PARENT_PATH;
$ar["FULL_PATH"] = $full_path;
$ar["SEARCH_PATH"] = $search_path;
$ar["DESCRIPTION"] = "";
if ($get_description && $ar["IS_DIR"] == "Y") {
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $full_path . ".section.php")) {
$arDirProperties = array();
include $_SERVER["DOCUMENT_ROOT"] . $full_path . ".section.php";
if ($arDirProperties["description"] != '') {
$ar["DESCRIPTION"] = $arDirProperties["description"];
}
}
}
if ($search_child) {
$arrSearchPath[] = $search_path;
$ar["CHILDREN"] = GetTreeRecursive($_SERVER["DOCUMENT_ROOT"] . $ar["SEARCH_PATH"], $level + 1, $max_depth, $get_description);
}
$map[] = $ar;
}
}
}
}
}
//.........这里部分代码省略.........
示例15: isset
$delimiter_r_char = isset($delimiter_other_r) ? substr($delimiter_other_r, 0, 1) : '';
$delimiter_other_r = $delimiter_r_char;
break;
case "TZP":
$delimiter_r_char = ";";
break;
}
}
if (strlen($delimiter_r_char) != 1) {
$arSetupErrors[] = GetMessage("CATI_NO_DELIMITER");
}
if (!isset($SETUP_FILE_NAME) || strlen($SETUP_FILE_NAME) <= 0) {
$arSetupErrors[] = GetMessage("CATI_NO_SAVE_FILE");
}
if (empty($arSetupErrors)) {
$SETUP_FILE_NAME = str_replace('//', '/', $strCatalogDefaultFolder . Rel2Abs("/", $SETUP_FILE_NAME));
if (preg_match(BX_CATALOG_FILENAME_REG, $SETUP_FILE_NAME)) {
$arSetupErrors[] = GetMessage("CES_ERROR_BAD_EXPORT_FILENAME");
} elseif ($strCatalogDefaultFolder == $SETUP_FILE_NAME) {
$arSetupErrors[] = GetMessage("CATI_NO_SAVE_FILE");
}
}
if (empty($arSetupErrors)) {
if (strtolower(substr($SETUP_FILE_NAME, strlen($SETUP_FILE_NAME) - 4)) != ".csv") {
$SETUP_FILE_NAME .= ".csv";
}
if (HasScriptExtension($SETUP_FILE_NAME)) {
$arSetupErrors[] = GetMessage("CES_ERROR_BAD_EXPORT_FILENAME_EXTENTIONS");
}
}
if (empty($arSetupErrors)) {