addSErver('/var/run/memcached.sock', 0); $Re = new Redis(); $Re->connect('/var/run/redis/redis.sock'); ?> addServer('/var/run/memcached.sock', 0); $Redis = new Redis(); $Redis->connect('/var/run/redis/redis.sock'); class Push { private $channel; function __construct() { global $Redis; $this->channel = 'ANIZONE_GLOBAL'; $this->redis = &$Redis; } function channel($channel) { $this->channel = $channel; } function trigger($event, $data, $channel = null) { if($channel == null) $channel = $this->channel; $json['channel'] = $channel; $json['data']['event'] = $event; $json['data']['data'] = $data; $json = json_encode($json); $this->redis->publish('juggernaut', $json); } } class PushWing { function queue($phone, $subject, $contents, $url, $timestamp = null) { if($timestamp === null) $timestamp = time(); $odb = &oDB::getInstance(); $contents = str_replace( "
", '\n', $contents ); $contents = str_replace( "
", '\n', $contents ); $contents = str_replace( "
", '\n', $contents ); $contents = str_replace( "

", '\n', $contents ); $contents = strip_tags($contents); $odb->insert('anizone_push_queue', ['phone' => $phone, 'subject' => $subject, 'contents' => $contents, 'url' => $url, 'timestamp' => $timestamp]); } function getGroupFavPhones($group_srl, $except_member_srl = []) { $oCacheHandler = CacheHandler::getInstance('object'); $cache_key = 'anizone:group_fav_phones_cache:'.$group_srl; $output = $oCacheHandler->get($cache_key); if(!$output) { $output = []; $odb = &oDB::getInstance(); $list = $odb->select('xe_member_fav', ['target_srl' => $group_srl]); $oMemberModel = &getModel('member'); foreach($list as $val) { $mem = $oMemberModel->getMemberInfoByMemberSrl($val->member_srl); if(in_array('즐겨찾기한 그룹의 새로운 글 작성', $mem->push_trigger) && is_array($mem->phone)) $output[] = implode('', $mem->phone); } $oCacheHandler->put($cache_key, $output); } foreach($except_member_srl as $except) { if(($key = array_search($except, $output)) !== false) { unset($messages[$key]); } } $phone = implode(',', $output); return $phone; } function clearGroupFavPhoneCache($group_srl) { $oCacheHandler = CacheHandler::getInstance('object'); $cache_key = 'anizone:group_fav_phones_cache:'.$group_srl; $oCacheHandler->delete($cache_key); } } ?> 자유 게시판

  1. 다들 건강하신가요?

    Date2019.06.24 By롤빵 Views255 Votes0
    Read More
  2. 아니 진짜 이 글 쓰냐?

    Date2019.06.23 ByBC둘기 Views211 Votes0
    Read More
  3. 이게 팀이냐

    Date2019.06.23 ByPrimary Views196 Votes0
    Read More
  4. 1학기가 끝났습니다

    Date2019.06.23 ByResurrection Views261 Votes0
    Read More
  5. 아아아니 4일동안 글이 없다니

    Date2019.06.23 By거냥거냥 Views170 Votes0
    Read More
  6. 오랜만에 애니플러스샵을 다녀와스빈다~

    Date2019.06.17 By1+1=2 Views204 Votes0
    Read More
  7. U20 결승 우크라이나전 선발 라인업

    Date2019.06.16 ByPrimary Views427 Votes0
    Read More
  8. 은덩쨩 없지? 19금 달린다!

    Date2019.06.14 ByResurrection Views389 Votes0
    Read More
  9. 대한민국 피파주관대회 두번째 결승진출이자 남자팀 첫 결승진출!!

    Date2019.06.12 By운명의DESTINY Views252 Votes0
    Read More
  10. 국가대표 평가전 이란전 선발 라인업

    Date2019.06.11 ByPrimary Views180 Votes0
    Read More
  11. 안휘 여긴 고대로

    Date2019.06.11 ByMSYB Views251 Votes0
    Read More
  12. 와..36년만의 u-20 월드컵 4강신화 ㅠㅠ

    Date2019.06.09 By운명의DESTINY Views233 Votes0
    Read More
  13. 한국이 호주 상대로 이겼네요

    Date2019.06.07 ByPrimary Views221 Votes0
    Read More
  14. 으어아아아아아아아아아 구글 어시스턴트으아아아아아

    Date2019.06.07 ByResurrection Views187 Votes0
    Read More
  15. 가입했어요~ 오늘 처음으로 ㅎㅎㅎ

    Date2019.06.06 By로독스 Views247 Votes0
    Read More
  16. 소전 음악회 가시는분 있으신가요?

    Date2019.06.03 By냥프☆시롤 Views294 Votes0
    Read More
  17. 리버풀이 우승했네요

    Date2019.06.02 ByPrimary Views226 Votes0
    Read More
  18. 이것이 인간사료인가...

    Date2019.06.02 By울트라빅슈 Views233 Votes0
    Read More
  19. 기생충 보고 왔습니다(스포 거의X)

    Date2019.06.01 ByResurrection Views182 Votes0
    Read More
  20. 젠카이노!

    Date2019.06.01 By미니키오 Views249 Votes0
    Read More
  21. 오늘 칼퇴했습니다.

    Date2019.05.29 ByPrimary Views222 Votes0
    Read More
  22. 주식 시작했습니다

    Date2019.05.29 ByResurrection Views254 Votes0
    Read More
  23. 게임 중독이 질병이면

    Date2019.05.29 ByResurrection Views256 Votes0
    Read More
  24. 10년만에 여기 들려봄

    Date2019.05.26 Byani12345 Views274 Votes0
    Read More
  25. 오랜만이군요

    Date2019.05.21 By소렐리 Views270 Votes0
    Read More
  26. 장식장을 샀어요

    Date2019.05.20 By롤빵 Views320 Votes0
    Read More
  27. 다녀왔습니다

    Date2019.05.20 By하루디4 Views224 Votes0
    Read More
  28. 5252믿고있었다구~

    Date2019.05.18 By1+1=2 Views504 Votes0
    Read More
  29. 다시 살아났군요

    Date2019.05.17 By작살나게달려 Views393 Votes0
    Read More
  30. 와 다시 살아났네요

    Date2019.05.17 ByPrimary Views369 Votes0
    Read More
목록
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 365 Next
/ 365
서버에 요청 중입니다. 잠시만 기다려 주십시오...