<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } CModule::IncludeModule("iblock"); global $USER; $arGroupPrice = array(); $Club = Club::getOBonTheUserID($USER->GetID()); if ($_POST['CLUB']) { if (!empty($_POST['CLUB']['NAME'])) { $clubID = Club::getClubID($USER->GetID()); $el = new CIBlockElement(); $PROP = array(); $PROP["PHONE"] = trim(strip_tags($_POST['CLUB']['PHONE'])); $PROP["ADDRESS"] = trim(strip_tags($_POST['CLUB']['ADDRESS'])); $PROP["METRO"] = trim(strip_tags($_POST['CLUB']['METRO'])); $PROP["SITE"] = trim(strip_tags($_POST['CLUB']['SITE'])); $PROP["PRICE_COCKTAIL"] = trim($_POST['CLUB']['PRICE_COCKTAIL']); $PROP["TIME_WORKING"] = trim($_POST['CLUB']['TIME_WORKING']); // "PROPERTY_TYPE_FACILITY"=>trim($_POST['CLUB']['TYPE_FACILITY']), // "PROPERTY_MUSIC"=>trim($_POST['CLUB']['MUSIC']), // "PROPERTY_FACE_CONTROL"=>trim($_POST['CLUB']['FACE_CONTROL']), // "PROPERTY_DRESS_CODE"=>trim($_POST['CLUB']['DRESS_CODE']), // "PROPERTY_EMAIL_MANAGER"=>trim($_POST['CLUB']['EMAIL_MANAGER']), // "PROPERTY_AVERAGE_TICKET"=>trim($_POST['CLUB']['AVERAGE_TICKET']), $arLoadProductArray = array("MODIFIED_BY" => $USER->GetID(), "NAME" => trim(strip_tags($_POST['CLUB']['NAME'])), "DETAIL_TEXT" => trim($_POST['CLUB']['DETAIL_TEXT']), "PROPERTY_VALUES" => $PROP); $res = $el->Update($clubID, $arLoadProductArray); } } $arField = $Club->getInfo(array("arSelect" => array("ID", "PROPERTY_PLAN", "NAME", "PREVIEW_PICTURE", "DETAIL_TEXT", "PROPERTY_PHONE", "PROPERTY_ADDRESS", "PROPERTY_METRO", "PROPERTY_SITE", "PROPERTY_PRICE_COCKTAIL", "PROPERTY_TYPE_FACILITY", "PROPERTY_MUSIC", "PROPERTY_FACE_CONTROL", "PROPERTY_DRESS_CODE", "PROPERTY_TIME_WORKING", "PROPERTY_EMAIL_MANAGER", "PROPERTY_AVERAGE_TICKET"), "arFilter" => array()), true);
<?php /** * Created by JetBrains PhpStorm. * User: oleg * Date: 12.09.12 * Time: 21:15 * To change this template use File | Settings | File Templates. */ require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; CModule::IncludeModule("iblock"); global $USER; $userID = intval($USER::GetID()); $stockID = intval($_POST['stockID']); $clubID = Club::getClubID($userID); if ($userID <= 0) { die; } $filename = translate(basename($_FILES['myfile']['name'])); if (!preg_match("#^.*\\.(jpg|png|gif)\$#i", $filename)) { die; } $uploaddir = $_SERVER['DOCUMENT_ROOT'] . "/upload/tmp/" . $userID . "/"; if (!file_exists($uploaddir)) { @mkdir($uploaddir); } $uploadfile = $uploaddir . $filename; move_uploaded_file($_FILES['myfile']['tmp_name'], $uploadfile); $BX_image = CFile::MakeFileArray($uploadfile); $el = new CIBlockElement(); $arLoadProductArray = array("MODIFIED_BY" => $USER->GetID(), "DETAIL_PICTURE" => $BX_image);