programming:1c-bitrix:usefull_classes
Полязняшки
ПРавильный иклюд джаваскрипта
$js = '/bitrix/js/main/popup_menu.js'; $GLOBALS['APPLICATION']->AddHeadString('<script type="text/javascript" src="'.$js.'?v='.filemtime($_SERVER['DOCUMENT_ROOT'].$js).'"></script>');
Получить информацию о подразделении
$arUser['UF_DEPARTMENT'] = CIntranetUtils::GetDepartmentsData($arUser['UF_DEPARTMENT']);
$GLOBALS['APPLICATION']->AddHeadString('<script type="text/javascript">BX.message('.CUtil::PhpToJSObject($mess_lang, false).')</script>', true);
class CUtil { function addslashes($s); function JSEscape($s); function JSUrlEscape($s); function PhpToJSObject($arData); function JsObjectToPhp($data); function JSPostUnescape(); function decodeURIComponent(&$item); function DetectUTF8($url, $bBinary=false); } class CHTTP { var $url = ''; var $status = 0; var $result = ''; var $headers = array(); var $cookies = array(); var $http_timeout = 120; var $user_agent; var $follow_redirect = false; var $errno; var $errstr; function CHTTP(); function Get($url); function Post($url, $arPostData); function HTTPQuery($method, $url, $postdata = ''); function Query($method, $host, $port, $path, $postdata = false, $proto = '', $post_content_type = 'N'); function ParseURL($url, $arUrlOld = false); function ParseHeaders($strHeaders); function setFollowRedirect($follow); /*public static*/ function sGet($url, $follow_redirect = false); /*public static*/ function sPost($url, $arPostData, $follow_redirect = false); /*public static*/ function SetStatus($status); }
programming/1c-bitrix/usefull_classes.txt · Последнее изменение: 2017/03/27 11:26 — artur