当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlockElement::SetPropertyValues方法代码示例

本文整理汇总了PHP中CIBlockElement::SetPropertyValues方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockElement::SetPropertyValues方法的具体用法?PHP CIBlockElement::SetPropertyValues怎么用?PHP CIBlockElement::SetPropertyValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlockElement的用法示例。


在下文中一共展示了CIBlockElement::SetPropertyValues方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updateResult

function updateResult($ID_RESULT, $STEP, $RES, $MSG){
	if (!CModule::IncludeModule("iblock")):
		return false;
	endif;
	global $USER;
	$actionStr = getActionStr($STEP);
	if ($RES == "success"):
		$STATUS = "success";
		$MESSAGE = "Успешно";
	elseif ($RES == "fail"):
		$STATUS = "fail";
		$MESSAGE = "Ошибка";
	else:
		$STATUS = "processed";
		$MESSAGE = "Исполняется";
	endif;
	if ($MSG):
		$MESSAGE = $MSG;
	endif;
	$PROP = array();
	$PROP = array(
		"ACTION" => $actionStr,
		"STATUS" => $STATUS,
		"MESSAGE" => $MESSAGE,
		"OFF_TIME" => mktime(),
		"TYPE" => $STEP
		);
	foreach ($PROP as $code => $value) :
		CIBlockElement::SetPropertyValues($ID_RESULT, 23, $value, $code);
	endforeach;
	return $ID_RESULT;
}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:32,代码来源:addProcess.php

示例2: Execute

 public function Execute()
 {
     if (!CModule::IncludeModule("forum")) {
         return CBPActivityExecutionStatus::Closed;
     }
     if (!CModule::IncludeModule("iblock")) {
         return CBPActivityExecutionStatus::Closed;
     }
     $forumId = intval($this->ForumId);
     if ($forumId <= 0) {
         return CBPActivityExecutionStatus::Closed;
     }
     $rootActivity = $this->GetRootActivity();
     $documentId = $rootActivity->GetDocumentId();
     $iblockId = $this->IBlockId;
     $dbResult = CIBlockElement::GetProperty($iblockId, $documentId[2], false, false, array("CODE" => "FORUM_TOPIC_ID"));
     $arResult = $dbResult->Fetch();
     if (!$arResult) {
         $obProperty = new CIBlockProperty();
         $obProperty->Add(array("IBLOCK_ID" => $iblockId, "ACTIVE" => "Y", "PROPERTY_TYPE" => "N", "MULTIPLE" => "N", "NAME" => "Forum topic", "CODE" => "FORUM_TOPIC_ID"));
         $obProperty->Add(array("IBLOCK_ID" => $iblockId, "ACTIVE" => "Y", "PROPERTY_TYPE" => "N", "MULTIPLE" => "N", "NAME" => "Forum message count", "CODE" => "FORUM_MESSAGE_CNT"));
         $dbResult = CIBlockElement::GetProperty($iblockId, $documentId[2], false, false, array("CODE" => "FORUM_TOPIC_ID"));
         $arResult = $dbResult->Fetch();
     }
     $forumTopicId = intval($arResult["VALUE"]);
     $arForumUserTmp = $this->ForumUser;
     $arForumUser = CBPHelper::ExtractUsers($arForumUserTmp, $documentId, true);
     $forumUserId = 1;
     $forumUserName = "Admin";
     if ($arForumUser != null) {
         $forumUserId = $arForumUser;
         $dbResult = CUser::GetByID($forumUserId);
         if ($arResult = $dbResult->Fetch()) {
             $forumUserName = CUser::FormatName(COption::GetOptionString("bizproc", "name_template", CSite::GetNameFormat(false), SITE_ID), $arResult, true);
         }
     }
     $newTopic = "N";
     if ($forumTopicId <= 0) {
         $documentService = $this->workflow->GetService("DocumentService");
         $document = $documentService->GetDocument($documentId);
         $newTopic = "Y";
         $arFields = array("TITLE" => $document["NAME"], "FORUM_ID" => $forumId, "USER_START_ID" => $forumUserId, "USER_START_NAME" => $forumUserName, "LAST_POSTER_NAME" => $forumUserName, "APPROVED" => "Y");
         $forumTopicId = CForumTopic::Add($arFields);
         CIBlockElement::SetPropertyValues($documentId[2], $iblockId, $forumTopicId, "FORUM_TOPIC_ID");
     }
     $arFields = array("POST_MESSAGE" => $this->ForumPostMessage, "AUTHOR_ID" => $forumUserId, "AUTHOR_NAME" => $forumUserName, "FORUM_ID" => $forumId, "TOPIC_ID" => $forumTopicId, "APPROVED" => "Y", "NEW_TOPIC" => $newTopic, "PARAM2" => $documentId[2]);
     $forumMessageId = CForumMessage::Add($arFields, false, array("SKIP_INDEXING" => "Y", "SKIP_STATISTIC" => "N"));
     return CBPActivityExecutionStatus::Closed;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:49,代码来源:forumreviewactivity.php

示例3: DeleteImage

 /**
  * <p>Удаляет изображение из Wiki-страницы. Динамичный метод.</p>
  *
  *
  * @param int $IMAGE_ID  Идентификатор изображения.
  *
  * @param int $ID  Идентификатор Wiki-страницы. До версии 10.0.0 назывался <b>ELEMENT_ID</b>
  *
  * @param int $IBLOCK_ID  Идентификатор Инфоблока.
  *
  * @return void 
  *
  * <h4>Example</h4> 
  * <pre>
  * &lt;?<br>
  * // Удалим изображение с идентификатором 5 из страницы с идентификатором 13 из инфо.блока с идентификатором 2
  * $IMAGE_ID = 5;
  * $ID = 13;
  * $IBLOCK_ID = 2;
  * 
  * $CWiki = new CWiki();
  * $CWiki-&gt;DeleteImage($IMAGE_ID, $ID, $IBLOCK_ID);<br>?&gt;
  * </pre>
  *
  *
  * <h4>See Also</h4> 
  * <ul> <li> <a href="http://dev.1c-bitrix.ru/api_help/wiki/classes/cwiki/AddImage.php">CWiki::AddImage</a> </li> </ul><a
  * name="examples"></a>
  *
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/wiki/classes/cwiki/DeleteImage.php
  * @author Bitrix
  */
 public function DeleteImage($IMAGE_ID, $ID, $IBLOCK_ID)
 {
     $rsProperties = CIBlockElement::GetProperty($IBLOCK_ID, $ID, 'value_id', 'asc', array('ACTIVE' => 'Y', 'CODE' => 'IMAGES'));
     $_iPropertyId = 0;
     while ($arProperty = $rsProperties->Fetch()) {
         if ($arProperty['CODE'] == 'IMAGES' && $arProperty['VALUE'] == $IMAGE_ID) {
             $_iPropertyId = $arProperty['PROPERTY_VALUE_ID'];
             break;
         }
     }
     if (!empty($_iPropertyId)) {
         $arPropertyValues = array();
         $arPropertyValues[$_iPropertyId] = array('VALUE' => array('del' => 'Y'), 'DESCRIPTION' => '');
         $this->cIB_E->SetPropertyValues($ID, $IBLOCK_ID, $arPropertyValues, 'IMAGES');
     }
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:50,代码来源:wiki.php

示例4: OnBeforeUserUpdateHandler

function OnBeforeUserUpdateHandler(&$arFields)
{
    if (isset($arFields['UF_GROUPS']) && in_array(1, $arFields['UF_GROUPS'])) {
        $user = CUser::GetByID($arFields['ID'])->Fetch();
        if (!in_array(1, $user['UF_GROUPS'])) {
            AddMessage2Log('update users');
            CModule::IncludeModule("iblock");
            CIBlockElement::SetPropertyValues(1, 4, getKentLabUsers(), "USERS");
            $groups = CUser::GetUserGroup($user['UF_USER_PARENT']);
            $fields = array_flip(getValuesList('UF_STATUS', 'USER', 'ID'));
            if (intval($user['UF_USER_PARENT']) > 0 && $fields[$user['UF_STATUS']] == 4) {
                if (in_array(8, $groups)) {
                    changeUserStatus($user['ID'], $user['UF_USER_PARENT'], $user['UF_STATUS'], 6, "Регистрация в KENT Lab");
                }
            }
        }
    }
}
开发者ID:dayAlone,项目名称:MyQube,代码行数:18,代码来源:init.php

示例5: array

 $arFile = CFile::MakeFileArray($full_path);
 $arFile['MODULE_ID'] = 'main';
 $fid = CFile::SaveFile($arFile, "selfie");
 $Fields = array("PERSONAL_PHOTO" => CFile::MakeFileArray($fid), "UF_STATUS" => 32, "UF_EVENT" => $_REQUEST['UF_EVENT']);
 $userType = $USER->GetByID($_REQUEST['UF_USER'])->Fetch();
 $user = new CUser();
 $res = $user->Update($_REQUEST['UF_USER'], $Fields);
 $contact_type_ret = array(28 => 1, 29 => 2, 30 => 3, 31 => 4, 32 => 5, 45 => 6);
 $arKpi = CIBlockElement::GetList(array(), array("IBLOCK_ID" => 17, "PROPERTY_USER_ID" => $USER->GetID(), "><DATE_ACTIVE_FROM" => array(date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT")), mktime(0, 0, 0, date("n"), 1, date("Y"))), date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT")), mktime(0, 0, 0, date("n") + 1, 1, date("Y"))))), false, false, array("*"));
 while ($obKpi = $arKpi->GetNextElement()) {
     $kpi = $obKpi->GetFields();
 }
 if ($kpi["ID"] > 0) {
     $kpiCount = CIBlockElement::GetProperty(17, $kpi["ID"], array("sort" => "asc"), array("CODE" => "KPI_5"))->Fetch();
     $kpiCount["VALUE"]++;
     CIBlockElement::SetPropertyValues($kpi["ID"], 17, $kpiCount["VALUE"], "KPI_5");
 } else {
     $kpi = array(1 => 103, 2 => 104, 3 => 105, 4 => 106, 5 => 107);
     $el = new CIBlockElement();
     $PROP = array();
     $PROP[101] = $USER->GetID();
     $PROP[$kpi[5]] = 1;
     $arLoadProductArray = array("IBLOCK_ID" => 17, "PROPERTY_VALUES" => $PROP, "NAME" => $USER->GetLogin(), "DATE_ACTIVE_FROM" => date("Y.m.d H:i"));
     $el->Add($arLoadProductArray);
 }
 $data = array("UF_USER" => $_REQUEST['UF_USER'], "UF_AMPLIFIER" => $USER->GetID(), "UF_EVENT" => $_REQUEST['UF_EVENT'] ? $_REQUEST['UF_EVENT'] : 0, "UF_DATE_TIME" => date("d.m.Y H:i:s"), "UF_ACTION_CODE" => 103, "UF_ACTION_TEXT" => "change_status", "UF_TYPE" => $contact_type_ret[$userType["UF_STATUS"]], "UF_TYPE_2" => 5);
 addToHLBlock(4, $data);
 $data = array('UF_AMPLIFIER' => $USER->GetID(), 'UF_USER' => $_REQUEST['UF_USER'], 'UF_EVENT' => $_REQUEST['UF_EVENT'] ? $_REQUEST['UF_EVENT'] : 0, 'UF_IMAGE' => $fid);
 addToHLBlock(3, $data);
 // Запись в лог об изменение статуса пользователя
 $logKPI::add(array('UF_USER' => IntVal($_REQUEST['UF_USER']), 'UF_AMPLIFIER' => $USER->GetID(), 'UF_EVENT' => $_REQUEST['UF_EVENT'] ? $_REQUEST['UF_EVENT'] : 0, 'UF_DATE_TIME' => date("Y-m-d H:i:s"), 'UF_ACTION_CODE' => 103, 'UF_ACTION_TEXT' => "change_status", 'UF_TYPE' => $arUserType[1][getUserType(IntVal($_REQUEST['UF_USER']))], 'UF_TYPE_2' => $arUserType[2][5]));
开发者ID:dayAlone,项目名称:MyQube,代码行数:31,代码来源:app.php

示例6: array

 } else {
     CModule::IncludeModule("photogallery");
     CModule::IncludeModule("iblock");
     $arSections = array();
     @set_time_limit(0);
     foreach ($_REQUEST["items"] as $item) {
         $db_res = CIBlockElement::GetList(array(), array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "ID" => $item), false, false, array("ID", "ACTIVE", "IBLOCK_SECTION_ID", "PROPERTY_REAL_PICTURE"));
         if (!($db_res && ($res = $db_res->Fetch()))) {
             continue;
         }
         if ($_REQUEST["ACTION"] == "approve" || $_REQUEST["ACTION"] == "not_approve") {
             if ($_REQUEST["ACTION"] == "approve") {
                 CIBlockElement::SetPropertyValues($item, $arParams["IBLOCK_ID"], "Y", "APPROVE_ELEMENT");
                 CIBlockElement::SetPropertyValues($item, $arParams["IBLOCK_ID"], "Y", "PUBLIC_ELEMENT");
             } else {
                 CIBlockElement::SetPropertyValues($item, $arParams["IBLOCK_ID"], "N", "APPROVE_ELEMENT");
             }
             if ($res["ACTIVE"] != "Y") {
                 $_REQUEST["ACTION"] = "active";
             }
             PClearComponentCacheEx($arParams["IBLOCK_ID"]);
         }
         if ($_REQUEST["ACTION"] == "active" || $_REQUEST["ACTION"] == "drop") {
             if ($_REQUEST["ACTION"] == "active") {
                 $arFields = array("ACTIVE" => "Y");
                 $be = new CIBlockElement();
                 $be->Update($item, $arFields);
             } else {
                 CIBlockElement::Delete($item);
             }
             // section
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:result_modifier.php

示例7: ForumAddMessage

 $MID = ForumAddMessage($TOPIC_ID > 0 ? "REPLY" : "NEW", $arParams["FORUM_ID"], $TOPIC_ID, 0, $arFieldsG, $strErrorMessage, $strOKMessage, false, $_POST["captcha_word"], 0, $_POST["captcha_code"], $arParams["NAME_TEMPLATE"]);
 if ($MID <= 0 || !empty($strErrorMessage)) {
     $arError[] = array("code" => "message is not added 2", "title" => empty($strErrorMessage) ? GetMessage("F_ERR_ADD_MESSAGE") : $strErrorMessage);
     $arResult['RESULT'] = false;
     $arResult["OK_MESSAGE"] = '';
 } else {
     if ($TOPIC_ID <= 0) {
         $res = CForumMessage::GetByID($MID);
         $FORUM_TOPIC_ID = $TID = intVal($res["TOPIC_ID"]);
     }
     if ($arParams["AUTOSAVE"]) {
         $arParams["AUTOSAVE"]->Reset();
     }
     // 1.7 Update Iblock Property
     if ($TID > 0) {
         CIBlockElement::SetPropertyValues($arParams["ELEMENT_ID"], $PRODUCT_IBLOCK_ID, intVal($TID), "FORUM_TOPIC_ID");
     } else {
         if ($TOPIC_ID > 0) {
             $TID = $TOPIC_ID;
         }
         if ($FORUM_TOPIC_ID > 0) {
             $TID = $FORUM_TOPIC_ID;
         }
     }
     $strOKMessage = GetMessage("COMM_COMMENT_OK");
     $arResult["FORUM_TOPIC_ID"] = intVal($FORUM_TOPIC_ID);
     ForumClearComponentCache($componentName);
     // SUBSCRIBE
     if ($_REQUEST["TOPIC_SUBSCRIBE"] == "Y") {
         ForumSubscribeNewMessagesEx($arParams["FORUM_ID"], $FORUM_TOPIC_ID, "N", $strErrorMessage, $strOKMessage);
         BXClearCache(true, "/bitrix/forum/user/" . $GLOBALS["USER"]->GetID() . "/subscribe/");
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:action.php

示例8: UpdateOWSVersion

 function UpdateOWSVersion($IBLOCK_ID, $ID, $value = null)
 {
     if (!defined('INTR_WS_OUTLOOK_UPDATE')) {
         if (null === $value) {
             $dbRes = CIBlockElement::GetProperty($IBLOCK_ID, $ID, 'sort', 'asc', array('CODE' => 'VERSION'));
             $arProperty = $dbRes->Fetch();
             if ($arProperty) {
                 $value = intval($arProperty['VALUE']);
                 if (!$value) {
                     $value = 1;
                 }
                 $value++;
             }
         }
         if (null !== $value) {
             CIBlockElement::SetPropertyValues($ID, $IBLOCK_ID, $value, 'VERSION');
         }
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:19,代码来源:utils.php

示例9: saveToIBProp

 /**
  * @param int $iblockID
  * @param int $elementID
  * @param int|string $propCode
  * @param int $action
  * @param string $description
  * @throws RequestError
  * @return bool
  */
 public function saveToIBProp($iblockID, $elementID, $propCode, $action = self::F_IB_IMG_PROP_APPEND, $description = '')
 {
     if (true !== $this->_bRequestSuccess && true !== $this->_bDownloadSuccess) {
         return false;
     }
     $arProp = array();
     $arErr = array();
     if (is_numeric($propCode)) {
         $propID = intval($propCode);
         $propCode = Tools::getPropCodeById($iblockID, $propID, $arProp, $arErr);
         if ($propCode === false) {
             throw new RequestError('', RequestError::E_BX_FILE_PROP_NOT_FOUND);
         }
     } else {
         $propID = Tools::getPropIdByCode($iblockID, $propCode, $arProp, $arErr);
         if ($propID === false) {
             throw new RequestError('', RequestError::E_BX_FILE_PROP_NOT_FOUND);
         }
     }
     if ($arProp['PROPERTY_TYPE'] != 'F') {
         throw new RequestError('', RequestError::E_BX_FILE_PROP_WRONG_TYPE);
     }
     if ($this->_ID === null) {
         $this->_ID = static::generateID();
     }
     if (!CheckDirPath(OBX_DOC_ROOT . static::DOWNLOAD_FOLDER . '/' . $this->_ID)) {
         throw new RequestError('', RequestError::E_PERM_DENIED);
     }
     $downloadFileRelPath = $this->getDownloadFilePath(false);
     if ($this->_bDownloadSuccess) {
         $arFile = \CFile::MakeFileArray($downloadFileRelPath);
     } elseif ($this->_bRequestSuccess) {
         $this->saveToFile($downloadFileRelPath);
         $arFile = \CFile::MakeFileArray($downloadFileRelPath);
     }
     $arFile['name'] = $this->_originalName . '.' . $this->_originalExt;
     if (is_string($description) && !empty($description)) {
         $arFile['description'] = $description;
     }
     switch ($action) {
         case self::F_IB_IMG_PROP_REPLACE:
             \CIBlockElement::SetPropertyValuesEx($elementID, $iblockID, array($arProp['ID'] => $arFile));
             break;
         case self::F_IB_IMG_PROP_APPEND:
             \CIBlockElement::SetPropertyValues($elementID, $iblockID, $arFile, $arProp['ID']);
             break;
     }
     return true;
 }
开发者ID:OpenBX,项目名称:obx.core,代码行数:58,代码来源:requestbxfile.php

示例10: array

         } else {
             $vote_value = -1;
         }
     }
     if (CModule::IncludeModule("iblock")) {
         $iblock_id = CIBlockElement::GetIBlockByID($element_id);
         if ($iblock_id !== FALSE) {
             $arOrder = array("ID" => "ASC");
             $arFilter = array("ID" => $element_id);
             $arSelect = array("ID", "PROPERTY_VOTE_PLUS", "PROPERTY_VOTE_MINUS");
             $dbElement = CIBlockElement::GetList($arOrder, $arFilter, $arSelect);
             if ($arElement = $dbElement->GetNext()) {
                 $property_code = $vote_value > 0 ? "VOTE_PLUS" : "VOTE_MINUS";
                 $arElement["PROPERTY_" . $property_code . "_VALUE"] += $vote_value;
                 $property_value = $arElement["PROPERTY_" . $property_code . "_VALUE"];
                 CIBlockElement::SetPropertyValues($element_id, $iblock_id, $property_value, $property_code);
                 $result["result"] = true;
                 $result["VOTE_PLUS"] = $arElement["PROPERTY_VOTE_PLUS_VALUE"];
                 $result["VOTE_MINUS"] = $arElement["PROPERTY_VOTE_MINUS_VALUE"];
             } else {
                 $result["ERROR_CODE"] = -4;
             }
         } else {
             $result["ERROR_CODE"] = -3;
         }
     } else {
         $result["ERROR_CODE"] = -2;
     }
 } else {
     $result["ERROR_CODE"] = -5;
     //update 0.0.1
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:31,代码来源:ajax.php

示例11: array

<?php

require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
CModule::IncludeModule("iblock");
$iblock_id = 1;
$user_id = $USER->GetID();
if (!empty($_POST["project_vote"])) {
    $res = CIBlockElement::GetList(array(), array("IBLOCK_ID" => 22, "PROPERTY_USER" => $user_id));
    while ($ob = $res->GetNextElement()) {
        $Fields = $ob->GetFields();
    }
    if (empty($Fields["ID"])) {
        $arFields = array("IBLOCK_ID" => 22, "NAME" => "Голос", "PROPERTY_VALUES" => array("VOTE" => $_POST["project_vote"], "USER" => $user_id));
        $oElement = new CIBlockElement();
        $idElement = $oElement->Add($arFields, false, false, true);
        $countVotes = CIBlockElement::GetProperty($iblock_id, $_POST["project_vote"], array("sort" => "asc"), array("CODE" => "VOTES"))->Fetch();
        $userFields = $USER->GetByID($user_id)->Fetch();
        if ($userFields["UF_AMBASSADOR"]) {
            $countVotes["VALUE"] = $countVotes["VALUE"] + 100;
        } else {
            $countVotes["VALUE"]++;
        }
        CIBlockElement::SetPropertyValues($_POST["project_vote"], $iblock_id, $countVotes["VALUE"], "VOTES");
        $data = array('success' => 1, 'id' => $_POST["project_vote"], 'vote' => $countVotes["VALUE"]);
    }
} else {
    $data = array('success' => 0);
}
echo json_encode($data);
开发者ID:dayAlone,项目名称:MyQube,代码行数:29,代码来源:vote_submit.php

示例12: Reset

 public static function Reset($nam)
 {
     $result = 0;
     $ib = new CIBlockElement();
     $arFilter = array("IBLOCK_ID" => 68, "NAME" => $nam);
     $ibres = $ib->GetList(array(), $arFilter);
     if ($ob = $ibres->GetNextElement()) {
         $arFlds = $ob->GetFields();
         $curID = $arFlds["ID"];
         $dbRes = $ib->GetProperty(68, $curID, array(), array("CODE" => "valu"));
         if ($arProps = $dbRes->Fetch()) {
             $result = 1;
             $ib->SetPropertyValues($curID, 68, 1, 'VALU');
         }
     }
     return $result;
 }
开发者ID:konvita2,项目名称:portal_php,代码行数:17,代码来源:arka_classes.php

示例13: DeleteAttachment

 function DeleteAttachment($listName, $listItemID, $url)
 {
     if (!$this->__Init()) {
         return $this->error;
     }
     if (!($listName_original = CIntranetUtils::checkGUID($listName))) {
         return new CSoapFault('Data error', 'Wrong GUID - ' . $listName);
     }
     $listItemID = intval($listItemID);
     $dbRes = CIBlockElement::GetByID($listItemID);
     if (($obElement = $dbRes->GetNextElement()) && CIntranetTasksDocument::CanUserOperateDocument(INTASK_DOCUMENT_OPERATION_WRITE_DOCUMENT, $USER->GetID(), $listItemID, array())) {
         $pos = strrpos($url, '/');
         if ($pos) {
             $fileName = ToLower(str_replace(array('/', '\\', '..'), '', substr($url, $pos + 1)));
         }
         // minor security
         if (!$fileName) {
             return new CSoapFault('Wrong file', 'Wrong file URL');
         }
         $arNewValue = null;
         $arElement = $obElement->GetFields();
         $arProperty = $obElement->GetProperty('TaskFiles');
         foreach ($arProperty['VALUE'] as $key => $FILE_ID) {
             $FILE_NAME = ToLower(basename(CFile::GetPath($FILE_ID)));
             if ($FILE_NAME == $fileName) {
                 $arNewValue = array($arProperty['PROPERTY_VALUE_ID'][$key] => array('VALUE' => array('del' => 'Y'), 'DESCRIPTION' => false));
                 break;
             }
         }
         if (is_array($arNewValue)) {
             CIBlockElement::SetPropertyValues($arElement['ID'], $arElement['IBLOCK_ID'], $arNewValue, 'TaskFiles');
         }
         return array('DeleteAttachmentResult' => '');
     } else {
         return new CSoapFault('0x81020016', 'List item not found');
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:37,代码来源:ws_tasks.php

示例14: array

                     if ($arItems[$itemID]["PREVIEW_PICTURE"] > 0) {
                         $arImg = CFile::MakeFileArray($arItems[$itemID]["PREVIEW_PICTURE"]);
                         CFile::ImageRotate($arImg['tmp_name'], $item['angle']);
                         $arFields["PREVIEW_PICTURE"] = CFile::MakeFileArray($arImg['tmp_name']);
                     }
                     // Detail
                     if ($arItems[$itemID]["DETAIL_PICTURE"] > 0) {
                         $arImg = CFile::MakeFileArray($arItems[$itemID]["DETAIL_PICTURE"]);
                         CFile::ImageRotate($arImg['tmp_name'], $item['angle']);
                         $arFields["DETAIL_PICTURE"] = CFile::MakeFileArray($arImg['tmp_name']);
                     }
                     // Real
                     if ($arItems[$itemID]["PROPERTY_REAL_PICTURE_VALUE"] > 0) {
                         $arImg = CFile::MakeFileArray($arItems[$itemID]["PROPERTY_REAL_PICTURE_VALUE"]);
                         CFile::ImageRotate($arImg['tmp_name'], $item['angle']);
                         CIBlockElement::SetPropertyValues($itemID, $iblockId, array("REAL_PICTURE" => CFile::MakeFileArray($arImg['tmp_name'])));
                     }
                 }
                 $bs = new CIBlockElement();
                 if (!$bs->Update($itemID, $arFields)) {
                     $arError[] = array("id" => "update", "text" => $bs->LAST_ERROR);
                 }
             }
         }
     }
 } elseif ($arParams["ACTION"] == "NEW") {
     if ($arParams["AJAX_CALL"] == "Y") {
         CUtil::JSPostUnEscape();
     }
     $arFields = array("ACTIVE" => "Y", "IBLOCK_ID" => $iblockId, "DATE" => $_REQUEST["UF_DATE"], "UF_DATE" => $_REQUEST["UF_DATE"], "NAME" => trim($_REQUEST["NAME"]), "DESCRIPTION" => trim($_REQUEST["DESCRIPTION"]));
     if (isset($_REQUEST["ACTIVE"])) {
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php

示例15: AddComment_Review_UpdateElement_Blog

 function AddComment_Review_UpdateElement_Blog($arElement, $postID, $blogID, $bNewPost)
 {
     if (!CModule::IncludeModule("blog")) {
         return false;
     }
     if ($bNewPost) {
         CIBlockElement::SetPropertyValues($arElement["ID"], $arElement["IBLOCK_ID"], intVal($postID), "BLOG_POST_ID");
         $BLOG_COMMENT_CNT = 1;
     } else {
         $BLOG_COMMENT_CNT = CBlogComment::GetList(array(), array("POST_ID" => $postID), array());
     }
     CIBlockElement::SetPropertyValues($arElement["ID"], $arElement["IBLOCK_ID"], intVal($BLOG_COMMENT_CNT), "BLOG_COMMENT_CNT");
     $arBlog = CBlog::GetByID($blogID);
     BXClearCache(True, "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/comment/" . $postID . "/");
     BXClearCache(True, "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/post/" . $postID . "/");
     BXClearCache(True, "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/first_page/");
     BXClearCache(True, "/" . SITE_ID . "/blog/last_comments/");
     BXClearCache(True, "/" . SITE_ID . "/blog/" . $arBlog["URL"] . "/rss_out/" . $postID . "/C/");
     BXClearCache(True, "/" . SITE_ID . "/blog/last_messages/");
     BXClearCache(True, "/" . SITE_ID . "/blog/commented_posts/");
     BXClearCache(True, "/" . SITE_ID . "/blog/popular_posts/");
 }
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:log_tools.php


注:本文中的CIBlockElement::SetPropertyValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。