本文整理汇总了PHP中CIBlock::GetProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlock::GetProperties方法的具体用法?PHP CIBlock::GetProperties怎么用?PHP CIBlock::GetProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlock
的用法示例。
在下文中一共展示了CIBlock::GetProperties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __IRM_InitReservation
function __IRM_InitReservation($iblockId)
{
$arResult = array();
$arResult["ALLOWED_FIELDS"] = array("ID" => array("NAME" => GetMessage("INAF_F_ID"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "int", "IS_FIELD" => true), "NAME" => array("NAME" => GetMessage("INAF_F_NAME"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "string", "IS_FIELD" => true), "DESCRIPTION" => array("NAME" => GetMessage("INAF_F_DESCRIPTION"), "ORDERABLE" => false, "FILTERABLE" => false, "TYPE" => "text", "IS_FIELD" => true), "UF_FLOOR" => array("NAME" => GetMessage("INAF_F_FLOOR"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "integer", "IS_FIELD" => false), "UF_PLACE" => array("NAME" => GetMessage("INAF_F_PLACE"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "integer", "IS_FIELD" => false), "UF_PHONE" => array("NAME" => GetMessage("INAF_F_PHONE"), "ORDERABLE" => false, "FILTERABLE" => false, "TYPE" => "string", "IS_FIELD" => false));
$arUserFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("IBLOCK_" . $iblockId . "_SECTION", 0, LANGUAGE_ID);
$arKeys = Array_Keys($arResult["ALLOWED_FIELDS"]);
foreach ($arKeys as $key) {
if (!$arResult["ALLOWED_FIELDS"][$key]["IS_FIELD"]) {
if (!Array_Key_Exists($key, $arUserFields)) {
$arFields = array("ENTITY_ID" => "IBLOCK_" . $iblockId . "_SECTION", "FIELD_NAME" => $key, "USER_TYPE_ID" => $arResult["ALLOWED_FIELDS"][$key]["TYPE"]);
$obUserField = new CUserTypeEntity();
$obUserField->Add($arFields);
}
}
}
$arResult["ALLOWED_ITEM_PROPERTIES"] = array("UF_PERSONS" => array("NAME" => GetMessage("INTASK_C29_UF_PERSONS"), "ACTIVE" => "Y", "SORT" => 300, "CODE" => "UF_PERSONS", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "UF_RES_TYPE" => array("NAME" => GetMessage("INTASK_C29_UF_RES_TYPE"), "ACTIVE" => "Y", "SORT" => 200, "CODE" => "UF_RES_TYPE", "PROPERTY_TYPE" => "L", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId, "VALUES" => array(array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPEA"), "DEF" => "Y", "SORT" => 100, "XML_ID" => "A"), array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPEB"), "DEF" => "N", "SORT" => 200, "XML_ID" => "B"), array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPEC"), "DEF" => "N", "SORT" => 200, "XML_ID" => "C"), array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPED"), "DEF" => "N", "SORT" => 300, "XML_ID" => "D"))), "UF_PREPARE_ROOM" => array("NAME" => GetMessage("INTASK_C29_UF_PREPARE_ROOM"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "UF_PREPARE_ROOM", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "Y", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "PERIOD_TYPE" => array("NAME" => GetMessage("INTASK_C29_PERIOD_TYPE"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "PERIOD_TYPE", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "NONE", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "PERIOD_COUNT" => array("NAME" => GetMessage("INTASK_C29_PERIOD_COUNT"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "PERIOD_COUNT", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "DEFAULT_VALUE" => "", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "EVENT_LENGTH" => array("NAME" => GetMessage("INTASK_C29_EVENT_LENGTH"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "EVENT_LENGTH", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "DEFAULT_VALUE" => "", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "PERIOD_ADDITIONAL" => array("NAME" => GetMessage("INTASK_C29_PERIOD_ADDITIONAL"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "PERIOD_ADDITIONAL", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId));
$dbIBlockProps = CIBlock::GetProperties($iblockId);
while ($arIBlockProps = $dbIBlockProps->Fetch()) {
if (Array_Key_Exists($arIBlockProps["CODE"], $arResult["ALLOWED_ITEM_PROPERTIES"])) {
$arResult["ALLOWED_ITEM_PROPERTIES"][$arIBlockProps["CODE"]]["ID"] = $arIBlockProps["ID"];
}
}
$keys = Array_Keys($arResult["ALLOWED_ITEM_PROPERTIES"]);
foreach ($keys as $key) {
if (IntVal($arResult["ALLOWED_ITEM_PROPERTIES"][$key]["ID"]) <= 0) {
$ibp = new CIBlockProperty();
$arResult["ALLOWED_ITEM_PROPERTIES"][$key]["ID"] = $ibp->Add($arResult["ALLOWED_ITEM_PROPERTIES"][$key]);
}
}
return $arResult;
}
示例2: onBeforeUpload
function onBeforeUpload($Params)
{
CModule::IncludeModule("iblock");
$_SESSION['arUploadedPhotos'] = array();
$arParams = $Params['arParams'];
$savedData = CImageUploader::GetSavedData();
$savedData['UPLOADING_START'] = "Y";
CImageUploader::SetSavedData($savedData);
if ($savedData["SECTION_ID"] <= 0) {
$arParams["SECTION_ID"] = GetAlbumId(array('id' => $Params['packageFields']['photo_album_id'], 'name' => $Params['packageFields']['new_album_name'], 'arParams' => $arParams, '~arResult' => $Params['~arResult']));
$savedData = CImageUploader::GetSavedData();
$savedData["SECTION_ID"] = $arParams["SECTION_ID"];
} else {
$arParams["SECTION_ID"] = $savedData["SECTION_ID"];
}
// Check and create properties
if (count($savedData['arError']) == 0) {
$arPropertiesNeed = array();
// Array of properties needed to create
foreach ($arParams['converters'] as $key => $val) {
if ($val['code'] == "real_picture" || $val['code'] == "thumbnail") {
continue;
}
$db_res = CIBlock::GetProperties($arParams["IBLOCK_ID"], array(), array("CODE" => $val['code']));
if (!($db_res && ($res = $db_res->Fetch()))) {
$arPropertiesNeed[] = $val['code'];
}
}
if (count($arPropertiesNeed) > 0) {
$obProperty = new CIBlockProperty();
foreach ($arPropertiesNeed as $key) {
$res = $obProperty->Add(array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "ACTIVE" => "Y", "PROPERTY_TYPE" => "F", "MULTIPLE" => "N", "NAME" => strLen(GetMessage("P_" . strToUpper($key))) > 0 ? GetMessage("P_" . strToUpper($key)) : strToUpper($key), "CODE" => strToUpper($key), "FILE_TYPE" => "jpg, gif, bmp, png, jpeg"));
}
}
// Check Public property
$arPropertiesNeed = array();
foreach (array("PUBLIC_ELEMENT", "APPROVE_ELEMENT") as $key) {
$db_res = CIBlock::GetProperties($arParams["IBLOCK_ID"], array(), array("CODE" => $key));
if (!$db_res || !($res = $db_res->Fetch())) {
$arPropertiesNeed[] = $key;
}
}
if (count($arPropertiesNeed) > 0) {
$obProperty = new CIBlockProperty();
foreach ($arPropertiesNeed as $key) {
$res = $obProperty->Add(array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "ACTIVE" => "Y", "PROPERTY_TYPE" => "S", "MULTIPLE" => "N", "NAME" => strLen(GetMessage("P_" . $key)) > 0 ? GetMessage("P_" . $key) : $key, "DEFAULT_VALUE" => "N", "CODE" => $key));
}
}
}
CImageUploader::SetSavedData($savedData);
return true;
}
示例3: array
if ( isset( $arforRequest [ $propertyID ] ) ){
array_push( $arforRequest [ $propertyID ], $values );
}else{
$arforRequest [ $propertyID ] = $values;
}
}
if ($arResult["ELEMENT_PROPERTIES"][$propertyID][0]["VALUE"]!=""){
$arOrder = array("NAME"=>"ACS");
$arFilter = array("IBLOCK_ID"=>$arResult["PROPERTY_LIST_FULL"][$propertyID]["LINK_IBLOCK_ID"], "ID"=>$arforRequest[$propertyID]);
$arSelectFields = array("IBLOCK_ID", "ID", "NAME");
if ($arParams["ADD_BUTTON"][$propertyID]["VIEW_FILED"])
{
$res = CIBlock::GetProperties($arResult["PROPERTY_LIST_FULL"][$propertyID]["LINK_IBLOCK_ID"], Array(), Array("ID"=>$arParams["ADD_BUTTON"][$propertyID]["VIEW_FILED"]));
if($res_arr = $res->Fetch())
{
$SrcPropID = $res_arr["CODE"];
}
else
$SrcPropID = "NAME";
if ($SrcPropID && $SrcPropID!="NAME")
{
$arSelectFields[]="PROPERTY_".$SrcPropID;
}
}
$dbEl = CIBlockElement::GetList( $arOrder, $arFilter, false, false, $arSelectFields );
$value = array ();
示例4: __InTaskPrepareIBlock
function __InTaskPrepareIBlock($iblockId)
{
$iblockId = IntVal($iblockId);
if ($iblockId <= 0) {
return;
}
$dbIBlock = CIBlock::GetList(array(), array("ID" => $iblockId, "ACTIVE" => "Y"));
if ($arIBlock = $dbIBlock->Fetch()) {
$arIBlockProperties = array();
$dbIBlockProps = CIBlock::GetProperties($iblockId);
while ($arIBlockProps = $dbIBlockProps->Fetch()) {
$ind = StrLen($arIBlockProps["CODE"]) > 0 ? $arIBlockProps["CODE"] : $arIBlockProps["ID"];
$arIBlockProperties[StrToUpper($ind)] = $arIBlockProps;
}
$arTasksProps = array("TASKPRIORITY" => array("NAME" => GetMessage("INTI_TASKPRIORITY"), "ACTIVE" => "Y", "SORT" => 100, "CODE" => "TaskPriority", "PROPERTY_TYPE" => "L", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId, "VALUES" => array(array("VALUE" => " " . GetMessage("INTI_TASKPRIORITY_1"), "DEF" => "N", "SORT" => 100, "XML_ID" => "1"), array("VALUE" => " " . GetMessage("INTI_TASKPRIORITY_2"), "DEF" => "Y", "SORT" => 200, "XML_ID" => "2"), array("VALUE" => " " . GetMessage("INTI_TASKPRIORITY_3"), "DEF" => "N", "SORT" => 300, "XML_ID" => "3"))), "TASKSTATUS" => array("NAME" => GetMessage("INTI_TASKSTATUS"), "ACTIVE" => "Y", "SORT" => 200, "CODE" => "TaskStatus", "PROPERTY_TYPE" => "L", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId, "VALUES" => array(array("VALUE" => GetMessage("INTI_TASKSTATUS_1"), "DEF" => "Y", "SORT" => 100, "XML_ID" => "NotAccepted"), array("VALUE" => GetMessage("INTI_TASKSTATUS_2"), "DEF" => "N", "SORT" => 200, "XML_ID" => "NotStarted"), array("VALUE" => GetMessage("INTI_TASKSTATUS_3"), "DEF" => "N", "SORT" => 300, "XML_ID" => "InProgress"), array("VALUE" => GetMessage("INTI_TASKSTATUS_4"), "DEF" => "N", "SORT" => 400, "XML_ID" => "Completed"), array("VALUE" => GetMessage("INTI_TASKSTATUS_5"), "DEF" => "N", "SORT" => 500, "XML_ID" => "Waiting"), array("VALUE" => GetMessage("INTI_TASKSTATUS_6"), "DEF" => "N", "SORT" => 600, "XML_ID" => "Deferred"))), "TASKCOMPLETE" => array("NAME" => GetMessage("INTI_TASKCOMPLETE"), "ACTIVE" => "Y", "SORT" => 300, "CODE" => "TaskComplete", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKASSIGNEDTO" => array("NAME" => GetMessage("INTI_TASKASSIGNEDTO"), "ACTIVE" => "Y", "SORT" => 400, "CODE" => "TaskAssignedTo", "PROPERTY_TYPE" => "S", "USER_TYPE" => "UserID", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKALERT" => array("NAME" => GetMessage("INTI_TASKALERT"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "TaskAlert", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "Y", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKSIZE" => array("NAME" => GetMessage("INTI_TASKSIZE"), "ACTIVE" => "Y", "SORT" => 600, "CODE" => "TaskSize", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKSIZEREAL" => array("NAME" => GetMessage("INTI_TASKSIZEREAL"), "ACTIVE" => "Y", "SORT" => 700, "CODE" => "TaskSizeReal", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKFINISH" => array("NAME" => GetMessage("INTI_TASKFINISH"), "ACTIVE" => "Y", "SORT" => 800, "CODE" => "TaskFinish", "PROPERTY_TYPE" => "S", "USER_TYPE" => "DateTime", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKFILES" => array("NAME" => GetMessage("INTI_TASKFILES"), "ACTIVE" => "Y", "SORT" => 900, "CODE" => "TaskFiles", "PROPERTY_TYPE" => "F", "USER_TYPE" => false, "ROW_COUNT" => 10, "COL_COUNT" => 60, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "Y", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKREPORT" => array("NAME" => GetMessage("INTI_TASKREPORT"), "ACTIVE" => "Y", "SORT" => 1000, "CODE" => "TaskReport", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "ROW_COUNT" => 10, "COL_COUNT" => 60, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKREMIND" => array("NAME" => GetMessage("INTI_TASKREMIND"), "ACTIVE" => "Y", "SORT" => 300, "CODE" => "TaskRemind", "PROPERTY_TYPE" => "S", "USER_TYPE" => "DateTime", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "VERSION" => array("NAME" => GetMessage("INTI_VERSION"), "ACTIVE" => "Y", "SORT" => 1100, "CODE" => "VERSION", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 10, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId));
foreach ($arTasksProps as $propKey => $arProp) {
if (!Array_Key_Exists($propKey, $arIBlockProperties)) {
$ibp = new CIBlockProperty();
$ibp->Add($arProp);
}
}
}
}
示例5: array
$xPropNode = $props[$j];
$PROP_XML_ID = $xPropNode->GetAttribute($nameUTF['ID']);
$PROP_TYPE = $xPropNode->GetAttribute($nameUTF['DataType']);
$PROP_MULTIPLE = ($xPropNode->GetAttribute($nameUTF['Multiple'])=="1"?"Y":"N");
$PROP_NAME = $xPropNode->GetAttribute($nameUTF['Name']);
$PROP_DEF = $xPropNode->GetAttribute($nameUTF['DefaultValue']);
if($PROP_TYPE == "enumeration")
$PROP_TYPE = "L";
else
$PROP_TYPE = "S";
if($arPriceType[$IBLOCK_XML_ID]==$PROP_XML_ID)
continue;
$res = CIBlock::GetProperties($IBLOCK_ID, array(), Array("IBLOCK_ID"=>$IBLOCK_ID, "XML_ID"=>$PROP_XML_ID));
$bNewRecord_tmp = False;
if($res_arr = $res->Fetch())
{
$PROP_ID = $res_arr["ID"];
$res = $ibp->Update($PROP_ID,
Array(
"NAME" => $PROP_NAME,
"TYPE" => $PROP_TYPE,
"MULTIPLE" => $PROP_MULTIPLE,
"DEFAULT_VALUE" => $PROP_DEF,
"TMP_ID" => $tmpid
)
);
}
else
示例6: LocalRedirect
<?php
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php";
$APPLICATION->SetTitle("GeekCon");
?>
<?php
if (CModule::IncludeModule("iblock")) {
if ($_GET["delete"] == "Y") {
if (CIBlockElement::Delete($_GET["CODE"])) {
LocalRedirect("/profile/");
}
}
}
$res = CIBlock::GetProperties("10", array(), array());
$idCity = 0;
$idMember = 0;
while ($arItem = $res->GetNext()) {
if ($arItem["CODE"] == "CITY") {
$idCity = $arItem["ID"];
}
if ($arItem["CODE"] == "MEMBER") {
$idMember = $arItem["ID"];
}
}
?>
<?php
$APPLICATION->IncludeComponent("bitrix:iblock.element.add.form", "team", array("SEF_MODE" => "Y", "IBLOCK_TYPE" => "comand", "IBLOCK_ID" => "10", "PROPERTY_CODES" => array("NAME", "DETAIL_PICTURE", "ACTIVE", $idMember, $idCity), "PROPERTY_CODES_REQUIRED" => array("NAME"), "GROUPS" => array("1", "2"), "STATUS_NEW" => "2", "STATUS" => array("2"), "LIST_URL" => "", "ELEMENT_ASSOC" => "CREATED_BY", "ELEMENT_ASSOC_PROPERTY" => "", "MAX_USER_ENTRIES" => "100000", "MAX_LEVELS" => "100000", "LEVEL_LAST" => "Y", "USE_CAPTCHA" => "N", "USER_MESSAGE_EDIT" => "", "USER_MESSAGE_ADD" => "", "DEFAULT_INPUT_SIZE" => "30", "RESIZE_IMAGES" => "Y", "MAX_FILE_SIZE" => "0", "PREVIEW_TEXT_USE_HTML_EDITOR" => "Y", "DETAIL_TEXT_USE_HTML_EDITOR" => "Y", "CUSTOM_TITLE_NAME" => "", "CUSTOM_TITLE_TAGS" => "", "CUSTOM_TITLE_DATE_ACTIVE_FROM" => "", "CUSTOM_TITLE_DATE_ACTIVE_TO" => "", "CUSTOM_TITLE_IBLOCK_SECTION" => "", "CUSTOM_TITLE_PREVIEW_TEXT" => "", "CUSTOM_TITLE_PREVIEW_PICTURE" => "", "CUSTOM_TITLE_DETAIL_TEXT" => "", "CUSTOM_TITLE_DETAIL_PICTURE" => "", "SEF_FOLDER" => "/", "VARIABLE_ALIASES" => array()));
?>
示例7: GetMessage
echo GetMessage("IB_E_PROP_CODE_SHORT");
?>
</td>
<td><?php
echo GetMessage("IB_E_PROP_MODIFY_SHORT");
?>
</td>
<td><?php
echo GetMessage("IB_E_PROP_DELETE_SHORT");
?>
</td>
</tr>
<?php
$arOFPropList = array();
if (0 < intval($str_OF_IBLOCK_ID)) {
$rsProps = CIBlock::GetProperties($str_OF_IBLOCK_ID, array("SORT" => "ASC", 'ID' => 'ASC'));
while ($arProp = $rsProps->Fetch()) {
ConvProp($arProp, $arHiddenPropFields);
if ($bVarsFromForm) {
$intPropID = $arProp['ID'];
$arTempo = GetPropertyInfo($strPREFIX_OF_PROPERTY, $intPropID, false, $arHiddenPropFields);
if (is_array($arTempo)) {
$arProp = $arTempo;
}
$arProp['ID'] = $intPropID;
}
$arProp = ConvertToSafe($arProp, $arDisabledPropFields);
$arProp['SHOW_DEL'] = 'Y';
$arOFPropList[$arProp['ID']] = $arProp;
}
}
示例8: GetSetItems
public static function GetSetItems($productID, $intType, $arProducInfo = array())
{
$arProductId = array();
static $proxyCatalogProductSet = array();
static $proxyCatalogSkuData = array();
static $proxyCatalogProduct = array();
static $proxyIblockProperty = array();
static $proxyProductProperty = array();
$proxyCatalogProductSetKey = $productID . "|" . $intType;
if (!empty($proxyCatalogProductSet[$proxyCatalogProductSetKey]) && is_array($proxyCatalogProductSet[$proxyCatalogProductSetKey])) {
$arSets = $proxyCatalogProductSet[$proxyCatalogProductSetKey];
} else {
$arSets = CCatalogProductSet::getAllSetsByProduct($productID, $intType);
if (!empty($arSets) && is_array($arSets)) {
$proxyCatalogProductSet[$proxyCatalogProductSetKey] = $arSets;
}
}
if (is_array($arSets)) {
foreach ($arSets as $k => $arSet) {
foreach ($arSet["ITEMS"] as $k1 => $item) {
$arItem = self::GetProductData(array("PRODUCT_ID" => $item["ITEM_ID"], "QUANTITY" => $item["QUANTITY"], "CHECK_QUANTITY" => "N", "CHECK_PRICE" => "N"));
if (array_key_exists('QUANTITY_TRACE', $arItem)) {
unset($arItem['QUANTITY_TRACE']);
}
$arItem["PRODUCT_ID"] = $item["ITEM_ID"];
$arItem["MODULE"] = "catalog";
$arItem["PRODUCT_PROVIDER_CLASS"] = "CCatalogProductProvider";
if ($intType == CCatalogProductSet::TYPE_SET) {
$arItem['SET_DISCOUNT_PERCENT'] = $item['DISCOUNT_PERCENT'] == '' ? false : (double) $item['DISCOUNT_PERCENT'];
}
$arProductId[] = $item["ITEM_ID"];
$arItem["PROPS"] = array();
if (!empty($proxyCatalogSkuData[$item["ITEM_ID"]]) && is_array($proxyCatalogSkuData[$item["ITEM_ID"]])) {
$arParentSku = $proxyCatalogSkuData[$item["ITEM_ID"]];
} else {
if ($arParentSku = CCatalogSku::GetProductInfo($item["ITEM_ID"])) {
$proxyCatalogSkuData[$item["ITEM_ID"]] = $arParentSku;
}
}
if (!empty($arParentSku)) {
$arPropsSku = array();
if (!($arProduct = static::getHitCache('IBLOCK_ELEMENT', $item["ITEM_ID"]))) {
$dbProduct = CIBlockElement::GetList(array(), array("ID" => $item["ITEM_ID"]), false, false, array('ID', 'IBLOCK_ID', 'NAME', 'IBLOCK_SECTION_ID'));
if ($arProduct = $dbProduct->Fetch()) {
static::setHitCache('IBLOCK_ELEMENT', $item["ITEM_ID"], $arProduct);
}
}
if (!($arPropsSku = static::getHitCache('IBLOCK_PROPERTY', $arProduct["IBLOCK_ID"]))) {
$dbOfferProperties = CIBlock::GetProperties($arProduct["IBLOCK_ID"], array(), array("!XML_ID" => "CML2_LINK"));
while ($arOfferProperties = $dbOfferProperties->Fetch()) {
$arPropsSku[] = $arOfferProperties["CODE"];
}
static::setHitCache('IBLOCK_PROPERTY', $arProduct["IBLOCK_ID"], $arPropsSku);
}
$proxyProductPropertyKey = $item["ITEM_ID"] . "_" . $arParentSku["IBLOCK_ID"] . "_" . md5(join('|', $arPropsSku));
if (!($product_properties = static::getHitCache('PRODUCT_PROPERTY', $proxyProductPropertyKey))) {
$product_properties = CIBlockPriceTools::GetOfferProperties($item["ITEM_ID"], $arParentSku["IBLOCK_ID"], $arPropsSku);
static::setHitCache('PRODUCT_PROPERTY', $proxyProductPropertyKey, $product_properties);
}
foreach ($product_properties as $propData) {
$arItem["PROPS"][] = array("NAME" => $propData["NAME"], "CODE" => $propData["CODE"], "VALUE" => $propData["VALUE"], "SORT" => $propData["SORT"]);
}
}
$arSets[$k]["ITEMS"][$k1] = array_merge($item, $arItem);
}
}
if (!($productList = static::getHitCache('IBLOCK_ELEMENT_LIST', $productID))) {
$rsProducts = CIBlockElement::GetList(array(), array('ID' => $arProductId), false, false, array("ID", "IBLOCK_ID", "IBLOCK_SECTION_ID", "PREVIEW_PICTURE", "DETAIL_PICTURE", "IBLOCK_TYPE_ID", "XML_ID"));
while ($arProduct = $rsProducts->GetNext()) {
$productList[] = $arProduct;
}
if (!empty($productList) && is_array($productList)) {
static::setHitCache('IBLOCK_ELEMENT_LIST', $productID, $productList);
}
}
if (!empty($productList) && is_array($productList)) {
foreach ($productList as $arProduct) {
foreach ($arSets as $k => $arSet) {
foreach ($arSet["ITEMS"] as $k1 => $item) {
if ($item["ITEM_ID"] == $arProduct["ID"]) {
$arProps = array();
$strIBlockXmlID = strval(CIBlock::GetArrayByID($arProduct['IBLOCK_ID'], 'XML_ID'));
if ($strIBlockXmlID != "") {
$arProps[] = array("NAME" => "Catalog XML_ID", "CODE" => "CATALOG.XML_ID", "VALUE" => $strIBlockXmlID);
}
$arProps[] = array("NAME" => "Product XML_ID", "CODE" => "PRODUCT.XML_ID", "VALUE" => $arProduct["XML_ID"]);
$arSets["{$k}"]["ITEMS"][$k1]["IBLOCK_ID"] = $arProduct["IBLOCK_ID"];
$arSets["{$k}"]["ITEMS"][$k1]["IBLOCK_SECTION_ID"] = $arProduct["IBLOCK_SECTION_ID"];
$arSets["{$k}"]["ITEMS"][$k1]["PREVIEW_PICTURE"] = $arProduct["PREVIEW_PICTURE"];
$arSets["{$k}"]["ITEMS"][$k1]["DETAIL_PICTURE"] = $arProduct["DETAIL_PICTURE"];
$arSets["{$k}"]["ITEMS"][$k1]["PROPS"] = array_merge($arSets["{$k}"]["ITEMS"][$k1]["PROPS"], $arProps);
}
}
}
}
}
}
foreach (GetModuleEvents("sale", "OnGetSetItems", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array(&$arSets));
}
//.........这里部分代码省略.........
示例9: adjustIBlock
/**
* Adds new properties in block
* @param $arParams
* @return bool
*/
public static function adjustIBlock($arParams)
{
$arPropertiesNeed = array();
// Array of properties needed to create
foreach ($arParams['converters'] as $key => $val) {
if ($val['code'] == "real_picture" || $val['code'] == "thumbnail") {
continue;
}
$db_res = CIBlock::GetProperties($arParams["IBLOCK_ID"], array(), array("CODE" => $val['code']));
if (!($db_res && ($res = $db_res->Fetch()))) {
$arPropertiesNeed[] = $val['code'];
}
}
if (count($arPropertiesNeed) > 0) {
$obProperty = new CIBlockProperty();
foreach ($arPropertiesNeed as $key) {
$res = $obProperty->Add(array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "ACTIVE" => "Y", "PROPERTY_TYPE" => "F", "MULTIPLE" => "N", "NAME" => strLen(GetMessage("P_" . strToUpper($key))) > 0 ? GetMessage("P_" . strToUpper($key)) : strToUpper($key), "CODE" => strToUpper($key), "FILE_TYPE" => "jpg, gif, bmp, png, jpeg"));
}
}
// Check Public property
$arPropertiesNeed = array();
foreach (array("PUBLIC_ELEMENT", "APPROVE_ELEMENT") as $key) {
$db_res = CIBlock::GetProperties($arParams["IBLOCK_ID"], array(), array("CODE" => $key));
if (!$db_res || !($res = $db_res->Fetch())) {
$arPropertiesNeed[] = $key;
}
}
if (count($arPropertiesNeed) > 0) {
$obProperty = new CIBlockProperty();
foreach ($arPropertiesNeed as $key) {
$res = $obProperty->Add(array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "ACTIVE" => "Y", "PROPERTY_TYPE" => "S", "MULTIPLE" => "N", "NAME" => strLen(GetMessage("P_" . $key)) > 0 ? GetMessage("P_" . $key) : $key, "DEFAULT_VALUE" => "N", "CODE" => $key));
}
}
return true;
}
示例10: ini_set
ini_set('display_errors', 1);
/*
require_once( $_SERVER["DOCUMENT_ROOT"]."/service/contract/c_search_form.php" );
*/
$include_file = getenv("DOCUMENT_ROOT") . '/bitrix/templates/work_copy/class/class_search_form.php';
include_once $include_file;
global $APPLICATION;
//$APPLICATION->ShowHeadStrings();
//$APPLICATION->ShowHead();
/* */
// $APPLICATION -> AddHeadScript ( '/js/service/event-listner-message.js', false );
$arShowFields = array("vhcl_vin", "vhcl_chassis", "vhcl_engine", "vhcl_regnum", "vhcl_type");
$arHiddenFields = array("vhcl_type");
CModule::IncludeModule('iblock');
$SrcPropID = array("vhcl_chassis", "vhcl_regnum");
$res = CIBlock::GetProperties(IBLOCK_SK_CHASSIS_ID, array(), array("ID" => $_REQUEST["show"]));
/* // update 18/08/2015 task CAR_BY_ACTION
$SrcPropID = "vhcl_chassis";
if($res_arr = $res->Fetch()){
$SrcPropID = $res_arr["CODE"];
}else{
$SrcPropID = "vhcl_chassis";
}
*/
if ($res_arr = $res->Fetch()) {
//$SrcPropID = $res_arr["CODE"];
array_unshift($SrcPropID, $res_arr["CODE"]);
}
$sub_filter = array();
// Получаю Ид Т/С с активными договорами
$carIDs = array();
示例11: InitializeIBlock
function InitializeIBlock($taskType, $ownerId, $forumId)
{
$iblockId = COption::GetOptionInt("intranet", "iblock_tasks", 0);
if ($iblockId <= 0) {
return 0;
}
$forumId = intval($forumId);
$arTasksConverted2BP = array();
$keyTasksConverted2BP = $iblockId . "_" . $taskType . ($taskType == "group" ? "_" . $ownerId : "");
global $CACHE_MANAGER;
if ($CACHE_MANAGER->Read(2592000, "IntranetTasksConverted2BP")) {
$arTasksConverted2BP = $CACHE_MANAGER->Get("IntranetTasksConverted2BP");
if (array_key_exists($keyTasksConverted2BP, $arTasksConverted2BP)) {
return $arTasksConverted2BP[$keyTasksConverted2BP];
}
}
$globalParentSectionId = 0;
$dbIBlock = CIBlock::GetList(array(), array("ID" => $iblockId, "ACTIVE" => "Y"));
if ($arIBlock = $dbIBlock->Fetch()) {
$arIBlockProperties = array();
$dbIBlockProps = CIBlock::GetProperties($iblockId);
while ($arIBlockProps = $dbIBlockProps->Fetch()) {
$ind = StrLen($arIBlockProps["CODE"]) > 0 ? $arIBlockProps["CODE"] : $arIBlockProps["ID"];
$arIBlockProperties[StrToUpper($ind)] = $arIBlockProps;
}
$arTasksProps = array("TASKPRIORITY" => array("NAME" => GetMessage("INTI_TASKPRIORITY"), "ACTIVE" => "Y", "SORT" => 100, "CODE" => "TaskPriority", "PROPERTY_TYPE" => "L", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId, "VALUES" => array(array("VALUE" => " " . GetMessage("INTI_TASKPRIORITY_1"), "DEF" => "N", "SORT" => 100, "XML_ID" => "1"), array("VALUE" => " " . GetMessage("INTI_TASKPRIORITY_2"), "DEF" => "Y", "SORT" => 200, "XML_ID" => "2"), array("VALUE" => " " . GetMessage("INTI_TASKPRIORITY_3"), "DEF" => "N", "SORT" => 300, "XML_ID" => "3"))), "TASKCOMPLETE" => array("NAME" => GetMessage("INTI_TASKCOMPLETE"), "ACTIVE" => "Y", "SORT" => 300, "CODE" => "TaskComplete", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKASSIGNEDTO" => array("NAME" => GetMessage("INTI_TASKASSIGNEDTO"), "ACTIVE" => "Y", "SORT" => 400, "CODE" => "TaskAssignedTo", "PROPERTY_TYPE" => "S", "USER_TYPE" => "UserID", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKTRACKERS" => array("NAME" => GetMessage("INTI_TASKTRACKERS"), "ACTIVE" => "Y", "SORT" => 400, "CODE" => "TaskTrackers", "PROPERTY_TYPE" => "S", "USER_TYPE" => "UserID", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "Y", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKALERT" => array("NAME" => GetMessage("INTI_TASKALERT"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "TaskAlert", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "Y", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKSIZE" => array("NAME" => GetMessage("INTI_TASKSIZE"), "ACTIVE" => "Y", "SORT" => 600, "CODE" => "TaskSize", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKSIZEREAL" => array("NAME" => GetMessage("INTI_TASKSIZEREAL"), "ACTIVE" => "Y", "SORT" => 700, "CODE" => "TaskSizeReal", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKFINISH" => array("NAME" => GetMessage("INTI_TASKFINISH"), "ACTIVE" => "Y", "SORT" => 800, "CODE" => "TaskFinish", "PROPERTY_TYPE" => "S", "USER_TYPE" => "DateTime", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKFILES" => array("NAME" => GetMessage("INTI_TASKFILES"), "ACTIVE" => "Y", "SORT" => 900, "CODE" => "TaskFiles", "PROPERTY_TYPE" => "F", "USER_TYPE" => false, "ROW_COUNT" => 10, "COL_COUNT" => 60, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "Y", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKREPORT" => array("NAME" => GetMessage("INTI_TASKREPORT"), "ACTIVE" => "Y", "SORT" => 1000, "CODE" => "TaskReport", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "ROW_COUNT" => 10, "COL_COUNT" => 60, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKREMIND" => array("NAME" => GetMessage("INTI_TASKREMIND"), "ACTIVE" => "Y", "SORT" => 300, "CODE" => "TaskRemind", "PROPERTY_TYPE" => "S", "USER_TYPE" => "DateTime", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "VERSION" => array("NAME" => GetMessage("INTI_VERSION"), "ACTIVE" => "Y", "SORT" => 1100, "CODE" => "VERSION", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 10, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "TASKVERSION" => array("NAME" => GetMessage("INTI_TASKVERSION"), "ACTIVE" => "Y", "SORT" => 1100, "CODE" => "TASKVERSION", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 10, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId));
foreach ($arTasksProps as $propKey => $arProp) {
if (!array_key_exists($propKey, $arIBlockProperties)) {
$ibp = new CIBlockProperty();
$ibp->Add($arProp);
}
}
$dbSectionsList = CIBlockSection::GetList(array(), array("GLOBAL_ACTIVE" => "Y", "XML_ID" => $taskType == "group" ? $ownerId : "users_tasks", "IBLOCK_ID" => $iblockId, "SECTION_ID" => 0), false);
if ($arSection = $dbSectionsList->GetNext()) {
$globalParentSectionId = $arSection["ID"];
}
if ($globalParentSectionId <= 0) {
if ($taskType == "group") {
$folderName = "-";
$folderXmlId = $ownerId;
if ($arGroup = CSocNetGroup::GetByID($ownerId)) {
$folderName = $arGroup["NAME"] . " [" . $ownerId . "]";
$folderXmlId = $ownerId;
}
} else {
$folderName = "User Tasks";
$folderXmlId = "users_tasks";
}
$arFields = array("IBLOCK_ID" => $iblockId, "IBLOCK_SECTION_ID" => 0, "ACTIVE" => "Y", "NAME" => $folderName, "XML_ID" => $folderXmlId);
$iblockSection = new CIBlockSection();
$globalParentSectionId = $iblockSection->Add($arFields, true);
CIntranetTasks::InstallDefaultViews($taskType, $ownerId);
}
$db = CBPWorkflowTemplateLoader::GetList(array(), array("DOCUMENT_TYPE" => array("intranet", "CIntranetTasksDocument", "x" . $iblockId)), false, false, array("ID"));
// while ($ar = $db->Fetch())
// {
// try
// {
// CBPWorkflowTemplateLoader::Delete($ar["ID"]);
// }
// catch(Exception $e)
// {
// CBPWorkflowTemplateLoader::Update($ar["ID"], array("AUTO_EXECUTE" => 0));
// }
// }
$workflowTemplateId = 0;
if ($ar = $db->Fetch()) {
$workflowTemplateId = $ar["ID"];
} else {
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/intranet/classes/general/tasks_wf_template.php";
$workflowTemplateId = CBPWorkflowTemplateLoader::Add($arFields);
}
$arTaskStatusTmp = array();
$arTaskStatusTmpAlt = array();
$dbRes = CIBlockProperty::GetPropertyEnum("TaskStatus", array("SORT" => "ASC"), array("IBLOCK_ID" => $iblockId));
while ($arRes = $dbRes->Fetch()) {
$arTaskStatusTmp[StrToUpper($arRes["XML_ID"])] = $arRes["ID"];
$arTaskStatusTmpAlt[$arRes["ID"]] = $arRes["XML_ID"];
}
$dbResult = CIBlockElement::GetList(array(), array("IBLOCK_ID" => $iblockId, "INCLUDE_SUBSECTIONS" => "Y", "!PROPERTY_TASKVERSION" => 2), false, false, array("ID", "PROPERTY_TASKSTATUS", "PROPERTY_TASKASSIGNEDTO", "IBLOCK_SECTION_ID"));
if ($arResult = $dbResult->Fetch()) {
$arOldTasksWFs = array();
$arOldTasksSTs = array();
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/intranet/classes/general/tasks_wf_template1.php";
$arOldTasksWFsTmp = array();
foreach ($arOldTasksWFs as $t1 => $t2) {
if (array_key_exists($t1, $arTaskStatusTmp)) {
$arOldTasksWFsTmp[$arTaskStatusTmp[$t1]] = $t2;
}
}
$arOldTasksSTsTmp = array();
foreach ($arOldTasksSTs as $t1 => $t2) {
if (array_key_exists($t1, $arTaskStatusTmp)) {
$arOldTasksSTsTmp[$arTaskStatusTmp[$t1]] = $t2;
}
}
do {
$taskTypeTmp = "";
$ownerIdTmp = "";
$v = CIntranetTasks::PrepareSectionForPrint($arResult["IBLOCK_SECTION_ID"]);
//.........这里部分代码省略.........
示例12: Array
<?
if(count($error) > 0)
{
echo CAdminMessage::ShowMessage(array(
"MESSAGE" => $error['message'],
"DETAILS" => "#PROGRESS_BAR#",
"HTML" => true,
"TYPE" => "PROGRESS",
"PROGRESS_TOTAL" => 100,
"PROGRESS_VALUE" => $error['progress'],
));
}
else
{
echo '<ul class="pr_sortable">';
$PROPS_ESTATE = CIBlock::GetProperties($RECRM->getIBId('estate'), Array('SORT'=>'ASC'), Array());
while ($P = $PROPS_ESTATE->Fetch())
{
echo '
<li id="'.$P['ID'].'">
'.GetMessage("PR_RECRM_PROPS_NAME").': <input type="text" name="IB_P_NAME['.$P['ID'].']" value="'.htmlspecialcharsEx($P['NAME']).'"/>
'.GetMessage("PR_RECRM_PROPS_HINT").': <input type="text" name="IB_P_HINT['.$P['ID'].']" value="'.htmlspecialcharsEx($P['HINT']).'"/>
'.GetMessage("PR_RECRM_PROPS_SORT").': <input type="text" name="IB_P_SORT['.$P['ID'].']" class="s_sort" value="'.intval($P['SORT']).'" style="width: 20px"/>
</li>';
}
echo '</ul>';
}
?>
<?
/* Tab Cron */
示例13: while
while ($arFields = $rsGroup->GetNext())
{
$arModGroups[] = array(
"ID" => $arFields['ID'],
"REFERENCE" => $arFields['REFERENCE'],
"SELECTED" => in_array($arFields['ID'], $arGroups) ? "selected" : "",
);
}
$restGroup = COption::GetOptionString($MODULE_ID, 'restricted_property');
$rsIblock = CIBlock::GetList(array(), array());
$arPropsRes = array();
while ($arIblock = $rsIblock->GetNext())
{
$resProp = CIBlock::GetProperties($arIblock["ID"], array(), array("PROPERTY_TYPE" => "L"));
while ($arProp = $resProp->GetNext())
{
$arPropsRes[] = array(
"CODE" => $arProp["CODE"],
"NAME" => $arProp["NAME"],
"SELECTED" => ($restGroup == $arProp["CODE"]) ? "selected" : ""
);
}
}
?>
<form method="post" enctype="multipart/form-data" action="<?php
echo $APPLICATION->GetCurPage();
?>
?mid=<?php
示例14: getIBAllProps
public function getIBAllProps($type = '')
{
$ARR = array();
$IB_ID = $this->getIBId($type);
$PROPS = CIBlock::GetProperties($IB_ID, Array('SORT'=>'ASC'), Array());
while ($PROP = $PROPS->Fetch())
{
$ARR[] = $PROP['CODE'];
}
return $ARR;
}
示例15: array
$priceMin = 0;
$arItems = $arViewed[$arElements["ID"]];
$arItems["IBLOCK_ID"] = $arElements["IBLOCK_ID"];
if (!is_set($arCacheOffersIblock[$arElements["IBLOCK_ID"]])) {
$mxResult = CCatalogSKU::GetInfoByProductIBlock($arElements["IBLOCK_ID"]);
if (is_array($mxResult)) {
$arOffersIblock["OFFERS_IBLOCK_ID"] = $mxResult["IBLOCK_ID"];
$arCacheOffersIblock[$arElements["IBLOCK_ID"]] = $arOffersIblock;
}
} else {
$arOffersIblock = $arCacheOffersIblock[$arElements["IBLOCK_ID"]];
}
if (IntVal($arOffersIblock["OFFERS_IBLOCK_ID"]) > 0) {
static $arCacheOfferProperties = array();
if (!is_set($arCacheOfferProperties[$arOffersIblock["OFFERS_IBLOCK_ID"]])) {
$dbOfferProperties = CIBlock::GetProperties($arOffersIblock["OFFERS_IBLOCK_ID"], array(), array("!XML_ID" => "CML2_LINK"));
while ($arOfferProperties = $dbOfferProperties->Fetch()) {
$arCacheOfferProperties[$arOffersIblock["OFFERS_IBLOCK_ID"]][] = $arOfferProperties["CODE"];
}
}
$arIblockOfferPropsFilter = $arCacheOfferProperties[$arOffersIblock["OFFERS_IBLOCK_ID"]];
$arIblockOfferProps = array();
$arIblockOfferPropsFilter = array();
foreach ($arIblockOfferPropsFilter as $val) {
$arIblockOfferProps[] = array("CODE" => $val["CODE"], "NAME" => $val["NAME"]);
$arIblockOfferPropsFilter[] = $val["CODE"];
}
static $arCacheResultPrices = array();
if (!is_set($arCacheResultPrices[$arElements["IBLOCK_ID"]])) {
$dbPriceType = CCatalogGroup::GetList(array(), array('NAME_LANG' => $arItems['NOTES'], 'CAN_BUY' => 'Y'), false, false, array('NAME', 'ID'));
$arPriceType = $dbPriceType->Fetch();