} } } } $aTabs = array(); if (IntVal($ID) > 0) { $aTabs[] = array("DIV" => "edit1", "TAB" => GetMessage("FLOW_EDIT_RECORD"), "ICON" => "workflow_edit", "TITLE" => GetMessage("FLOW_EDIT_RECORD_TIT")); } else { $aTabs[] = array("DIV" => "edit1", "TAB" => GetMessage("FLOW_EDIT_RECORD"), "ICON" => "workflow_edit", "TITLE" => GetMessage("FLOW_NEW_RECORD")); } $aTabs[] = array("DIV" => "edit2", "TAB" => GetMessage("FLOW_UPLOADED_FILES"), "ICON" => "workflow_edit", "TITLE" => GetMessage("FLOW_UPLOADED_FILES_TITLE")); $aTabs[] = array("DIV" => "edit3", "TAB" => GetMessage("FLOW_COMMENTS"), "ICON" => "workflow_edit", "TITLE" => GetMessage("FLOW_COMMENTS_TITLE")); $tabControl = new CAdminTabControl("tabControl", $aTabs); // Save or Apply was clicked if ((strlen($save) > 0 || strlen($apply) > 0) && $WORKFLOW_RIGHT > "R" && $REQUEST_METHOD == "POST" && check_bitrix_sessid()) { if (CheckFields()) { $nums = intval($nums); if ($nums > 0) { for ($i = 1; $i <= $nums; $i++) { $arFile = $HTTP_POST_FILES["file_" . $i]; if (strlen($arFile["name"]) <= 0 || $arFile["tmp_name"] == "none") { continue; } $arFile["name"] = GetFileName($arFile["name"]); $fname = ${"fname_" . $i}; if (strlen($fname) <= 0) { $fname = $arFile["name"]; } $path = GetDirPath($FILENAME); $pathto = Rel2Abs($path, $fname); $ext = GetFileExtension($pathto);
return false; } } foreach ($PROFILE['XMLDATA'] as $id => $field) { if ($field['REQUIRED'] == 'Y') { if ($field['TYPE'] == 'field' && !$field['VALUE'] || $field['TYPE'] == 'const' && !$field['CONTVALUE_TRUE'] || $field['TYPE'] == 'none') { $APPLICATION->ThrowException(GetMessage('ACRIT_EXPORTPRO_REQUIRED_FIELD_FAIL', array('#CODE#' => $field['CODE'], '#NAME#' => $field['NAME']))); return false; } } } return true; } $fieldsCheck = true; if ($_SERVER['REQUEST_METHOD'] == 'POST' && (!empty($save) || !empty($apply)) && check_bitrix_sessid()) { if ($fieldsCheck = CheckFields()) { if (CModule::IncludeModule("catalog")) { $obCond = new CCatalogCondTree(); $boolCond = $obCond->Init(BT_COND_MODE_PARSE, 0, array()); if (!$boolCond) { if ($ex = $APPLICATION->GetException()) { echo $ex->GetString() . "<br>"; } } } foreach ($PROFILE['XMLDATA'] as $id => $field) { if (intval($id) > 0) { $PROFILE['XMLDATA'][$field['CODE']] = $field; unset($PROFILE['XMLDATA'][$id]); } }