This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type = "text/javascript" > | |
console.log(<?=json_encode($array)?>); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
//Дополнительные поля к уведомлению о заказе | |
AddEventHandler("main", "OnBeforeEventAdd", "OnSaleDeliveryOrderSendEmail"); | |
function OnSaleDeliveryOrderSendEmail (&$event, &$lid, &$arFields, &$message_id) { | |
if ($event=="SALE_NEW_ORDER") { | |
if ($arFields['ORDER_ID']>0) { | |
$order = CSaleOrder::GetByID($arFields['ORDER_ID']); | |
$arFields['COMMENT'] = $order["USER_DESCRIPTION"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?//Запись переменно в файл | |
function putFile($data, $append = FILE_APPEND, $file = 'temp_put.txt', $head = ''){ | |
$str = Date('d.m.Y H:i:s').": ".$head." ---------------------------\n"; | |
if($data){ | |
if(is_array($data)){ | |
$str .= print_r($data, 1); | |
}else{ | |
$str .= $data."\n"; | |
} | |
$str .= "END ---------------------------\n\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?if($_POST["fullname"] != ""){ | |
if($_FILES["photo"]["name"]){ /// если новое фото подгружено | |
$dir_upl = $_SERVER['DOCUMENT_ROOT']."/upload/"; | |
if (is_uploaded_file($_FILES[photo][tmp_name])){ | |
move_uploaded_file($_FILES[photo][tmp_name], $dir_upl.$_FILES[photo][name]); | |
}else{ | |
echo 'Упс... Картинка не загрузилась'; | |
} | |
$arFile = CFile::MakeFileArray($dir_upl.$_FILES[photo][name]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$this->addExternalCss(SITE_TEMPLATE_PATH."/local/styles.css"); | |
$this->addExternalJS("/local/liba.js"); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$arrFilter = array( | |
array( | |
"LOGIC" => "OR", | |
'NAME' => "%".$_GET['q']."%", | |
'PROPERTY_ARTNUMBER' => "%".(string)$_GET['q']."%", | |
'ID' => CIBlockElement::SubQuery("PROPERTY_CML2_LINK", array( | |
"PROPERTY_ARTNUMBER" => "%".(string)$_GET['q']."%", | |
)), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
method: "POST", | |
url: "/ajax/autoriz.php", | |
data: { | |
p: phone, | |
pass: pass | |
} | |
}) | |
.done(function(msg) { | |
if (msg == 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (CModule::IncludeModule('highloadblock')) { | |
$arHLBlock = Bitrix\Highloadblock\HighloadBlockTable::getById(1)->fetch(); | |
$obEntity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arHLBlock); | |
$strEntityDataClass = $obEntity->getDataClass(); | |
} | |
if (CModule::IncludeModule('highloadblock')) { | |
$rsData = $strEntityDataClass::getList(array( | |
'select' => array('ID','UF_NAME', 'UF_XML_ID'), | |
'order' => array('ID' => 'ASC'), | |
'limit' => '50', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?$file = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"], array('width'=>360,'height' => 360), BX_RESIZE_IMAGE_EXACT, true);?> |
OlderNewer