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
| AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", Array("Handler", "OnBeforeIBlockElementUpdate")); | |
| class Handler | |
| { | |
| // создаем обработчик события "OnBeforeIBlockElementUpdate" | |
| function OnBeforeIBlockElementUpdate(&$arFields) | |
| { | |
| $iblock_id = 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
| /** | |
| * vk likes | |
| * @param $links | |
| * @param $vk_app_id | |
| * @return array | |
| */ | |
| function vk($links, $vk_app_id) | |
| { | |
| $vk_likes = 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
| <?php | |
| /** | |
| * User: marsel | |
| * Date: 16.02.14 | |
| * Time: 11:56 | |
| */ | |
| namespace bitrixlib; | |
| require_once(dirname(__FILE__).'/query.php'); |
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 news_date($time) | |
| { | |
| $date = new DateTime($time); | |
| $out = array(); | |
| $out[] = $date->format('d'); | |
| $out[] = rus_month($date->format('m'), 1, 1); | |
| $out[] = $date->format('Y'); |
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 | |
| //$useCache = true; | |
| $useCache = false; | |
| $cacheValid = false; | |
| $this_iblock_id = (int)$this_iblock_id; | |
| if ($useCache) | |
| { |
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('phpmailer.php'); | |
| require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
| $a = $b = null; | |
| $res = CEventMessage::GetList($a, $b, array('EVENT_NAME' => 'USER_QUESTION')); | |
| $mess = $res->Fetch(); | |
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
| // news.list | |
| // костыль для правильного кеширования, чтобы страницы с гет параметрами кешировались отдельно | |
| global $PAGE_ID ; | |
| $PAGE_ID = array(); | |
| if(isset($_GET['id'])){ | |
| $PAGE_ID['id']=$_GET['id']; | |
| } | |
| // |
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 plural($number, $suffix) | |
| { | |
| $keys = array(2, 0, 1, 1, 1, 2); | |
| $mod = $number % 100; | |
| $suffix_key = ($mod > 7 && $mod < 20) ? 2 : $keys[min($mod % 10, 5)]; | |
| return $suffix[$suffix_key]; | |
| } |
NewerOlder