This file contains hidden or 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
<? | |
<? | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/main/include.php"); | |
?> | |
<? | |
use Bitrix\Main\Context, | |
Bitrix\Currency\CurrencyManager, | |
Bitrix\Sale\Order, | |
Bitrix\Sale\Basket, |
This file contains hidden or 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 serialize_corrector($serialized_string){ | |
// at first, check if "fixing" is really needed at all. After that, security checkup. | |
if ( @unserialize($serialized_string) !== true && preg_match('/^[aOs]:/', $serialized_string) ) { | |
$serialized_string = preg_replace_callback( '/s\:(\d+)\:\"(.*?)\";/s', function($matches){return 's:'.strlen($matches[2]).':"'.$matches[2].'";'; }, $serialized_string ); | |
} | |
return $serialized_string; | |
} | |
unserialize( serialize_corrector( $serialized_string ) ) ; |
This file contains hidden or 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
<? | |
protected function sort_array($key) | |
{ | |
return function($a,$b) use($key){ | |
return $a[$key] <=> $b[$key]; | |
}; | |
} | |
usort($this->arResult['BASKET'], $this->sort_array('PROVIDER')); |
This file contains hidden or 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
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
chrome_options = Options() | |
chrome_options.add_extension("proxy.zip") | |
driver = webdriver.Chrome(executable_path='chromedriver.exe', chrome_options=chrome_options) | |
driver.get("http://google.com") | |
driver.close() |
This file contains hidden or 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
<? | |
$entityContact->CreateRequisite($contactId, 3); |
This file contains hidden or 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
<? | |
\Bitrix\Main\Loader::includeModule('sale'); | |
$order = \Bitrix\Sale\Order::load(36065); | |
$basket = $order->getBasket(); | |
\Bitrix\Sale\DiscountCouponsManager::init( | |
\Bitrix\Sale\DiscountCouponsManager::MODE_ORDER, array('orderId' => $order->getId(), 'userId' => $order->getUserId()) | |
); | |
$basketItem = $basket->createItem('catalog', 456279); | |
$fields = array( | |
'QUANTITY' => 2, |
This file contains hidden or 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
CTaskComments::add($taskId, $userId, $text, ['UF_FORUM_MESSAGE_DOC' => ['n'.$fileId]]); |
This file contains hidden or 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
<? | |
$dealId = false; | |
$dealId = str_replace('DEAL_', '', $_REQUEST['document_id'][2]); | |
function query($param){ | |
$appParams = array( | |
'halt' => 0, | |
'cmd' => $param | |
); |
This file contains hidden or 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 query($param) | |
{ | |
// /* AUTH */ | |
$domain = ''; | |
$auth = ''; | |
$user = ''; | |
$appParams = array( |
This file contains hidden or 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
$(document).ready(function() { | |
$('body').on('change', '.add_image_zamena input', function(){ | |
var th = $(this); | |
var tr = $(th).parents('.reports-list-item'); | |
var file = []; | |
file_temp = $(this)[0].files; | |
file[0] = file_temp[0]; |
NewerOlder