Exemplo n.º 1
0
 function Init($Params = array())
 {
     global $APPLICATION, $USER;
     if (!CSticker::CanDoOperation('sticker_view')) {
         return;
     }
     // Dectect - show stickers or No
     $bGetStickers = CSticker::GetBShowStickers();
     $Stickers = array();
     if ($bGetStickers) {
         $Stickers = CSticker::GetList(array('arFilter' => array('USER_ID' => $USER->GetId(), 'PAGE_URL' => $APPLICATION->GetCurPage(), 'CLOSED' => 'N', 'DELETED' => 'N', 'SITE_ID' => SITE_ID)));
     } else {
         $Stickers = array();
     }
     $curPageCount = isset($Params['curPageCount']) ? $Params['curPageCount'] : CSticker::GetCurPageCount();
     CSticker::InitJS(array('bInit' => $bGetStickers, 'stickers' => $Stickers, 'curPageCount' => $curPageCount));
 }