Виктор, я рекомендую вам посмотреть этот пост лучше:
require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/csv_data.php";);
$csvFile = new CCSVData('R', true);
$csvFile->LoadFile($_FILES['csv']['tmp_name']);
$csvFile->SetDelimiter(',');
while ($arRes = $csvFile->Fetch()) {
ec($arRes);
} |
$csvFile->SetFieldsType($fields_type); $csvFile->SetFirstHeader(); |
require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/csv_data.php" ; |
use \Bitrix\Main\Config\Option;
class A extends Option
{
public static function changeOptions($module, $config, $value)
{
parent::$options[$module]['-'][$config] = $value;
}
}
A::changeOptions('main', 'new_user_registration_email_confirmation', 'N'); |
\Bitrix\Main\EventManager::getInstance()->addEventHandler('main', 'OnPageStart', "OnPageStartConfirmRegistrationOption");
function OnPageStartConfirmRegistrationOption()
{
$request = Bitrix\Main\Application::getInstance()->getContext()->getRequest();
if(strpos($request->getRequestUri(), "/bitrix") === false)
{
if(strpos($request->getRequestUri(), SITE_DIR.'personal/order/make/') !== false)
{
class A extends \Bitrix\Main\Config\Option
{
public static function changeOptions($module, $config, $value)
{
parent::$options[$module]['-'][$config] = $value;
}
}
A::changeOptions('main', 'new_user_registration_email_confirmation', 'N');
}
}
}
|
| Долганин Антон написал: Вот для нового ядра (наследуемся и переопределяем protected) |
<?php
class ExtendedOption extends \Bitrix\Main\Config\Option
{
/**
* Локально изменить настройку определенного модуля для текущего хита.
* См. подробнее здесь: https://dev.1c-bitrix.ru/community/webdev/user/11948/blog/7799/
*
* @param $module
* @param $parameter
* @param $value
*/
public static function changeOptionForCurrentHit($module, $parameter, $value)
{
if (!isset(parent::$options[$module]['-'][$parameter])) {
static::get($module, $parameter);
}
parent::$options[$module]['-'][$parameter] = $value;
}
}
ExtendedOption::changeOptionForCurrentHit('main', 'captcha_registration', 'N');
|
| $.ajax({ type: "POST", url: $('#itserw_system_auth_form').attr('action'), data: $('#itserw_system_auth_form').serialize()+'&ajax_key=Y', dataType: "json", success: function(data) { if (data.type == 'error') { alert(data.message); } else { alert('Вы авторизовались!'); $('.popup-window-close-icon').click(); $('#bx-simple-order-form').submit(); } } }); |
| <? if (strlen($_POST['ajax_key']) /*&& $_POST['ajax_key']==md5('ajax_'.LICENSE_KEY)*/) { $APPLICATION->RestartBuffer(); if (!defined('PUBLIC_AJAX_MODE')) { define('PUBLIC_AJAX_MODE', true); } header('Content-type: application/json'); if ($arResult['ERROR']) { echo json_encode(array( 'type' => 'error', 'message' => strip_tags($arResult['ERROR_MESSAGE']['MESSAGE']), )); } else { echo json_encode(array('type' => 'ok')); } require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/epilog_after.php'); die(); } ?> |



<?$APPLICATION->IncludeComponent("bitrix:im.messenger", "", Array());?> |
<?xml version="1.0" encoding="UTF-8"?><videos><video><id>36408325</id><title t1="test 1" t2="test2">One Game</title></video></videos> |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/classes/general/xml.php'); |
$xml = new CDataXML(); |
$xml->LoadS tring($xml_string); |
$arData = $xml->GetArray(); |
if ($node = $xml->SelectNodes('/videos/video/title')) {
echo $node->textContent();
} |
if ($node = $xml->SelectNodes('/videos/video/title')) {
print_r($node->getAttributes());
} |

if ($node = $xml->SelectNodes('/videos/video/title')) {
echo $node->getAttribute('t1');
} |
<pics> <pic>1</pic> <pic>2</pic> <pic>3</pic> </pics> |
if ($node = $xml->SelectNodes('/videos/video/pics')) {
print_r($node->children());
} |
<media:title></media:title> |
$xml->delete_ns=false; |
| $xml = new CDataXML(); $xml->LoadString($XMLString); $arResult = $xml->GetArray(); |
Группы на сайте создаются не только сотрудниками «1С-Битрикс», но и партнерами компании. Поэтому мнения участников групп могут не совпадать с позицией компании «1С-Битрикс».