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. 애니존 진짜 그립네요

    Date2021.01.19 By인덱스색인 Views7
    Read More
  2. 아아 중앙재해대책본부입니다

    Date2021.01.18 ByResurrection Views11
    Read More
  3. 와 여기 살아있다니

    Date2020.11.18 By오다ㅋ Views125
    Read More
  4. 에헤떼난다yo

    Date2020.11.10 By리파 Views95
    Read More
  5. 헤븐즈 필 3장 보고 왔습니다

    Date2020.10.26 ByResurrection Views128
    Read More
  6. 페이트 3장 보고 왔는데요

    Date2020.10.25 ByBelle Views69
    Read More
  7. 속보) 동급생1 리메이크 확정

    Date2020.10.23 ByResurrection Views95
    Read More
  8. 오랜만에 접속했습니당

    Date2020.10.20 ByLN타치바나 Views99
    Read More
  9. 애니존에 글을 쓰지 못하는 이유

    Date2020.10.09 ByResurrection Views188
    Read More
  10. 세상에

    Date2020.10.03 By신현[神現] Views144
    Read More
  11. 결국 LG 노트북으로 샀습니다

    Date2020.09.15 ByResurrection Views159
    Read More
  12. 오 개쩜

    Date2020.09.14 By리파 Views147
    Read More
  13. 컴잘알님들 도와주세요 흐규흐규

    Date2020.09.10 ByResurrection Views190
    Read More
  14. 11/25 하루히 신작 발매

    Date2020.08.31 By왕따쿨엑스 Views199
    Read More
  15. 오랜만에 왔는데 dev 어디갔어요

    Date2020.08.23 ByBC둘기 Views224
    Read More
  16. 코로나!!! 올해 덕질은 이대로 끝이겠죠.. ㅠ

    Date2020.08.18 By1+1=2 Views1596
    Read More
  17. 길 가다가 발견한 주유소.jpg

    Date2020.08.18 ByResurrection Views182
    Read More
  18. dev 어디갓죠

    Date2020.08.13 ByBelle Views230
    Read More
  19. 드디어 가챠논문이 출판됐습니다

    Date2020.08.12 ByResurrection Views254
    Read More
  20. 10년만에 근황

    Date2020.08.12 By히코 Views256
    Read More
  21. 응애 나 애기 부활

    Date2020.08.10 ByResurrection Views169
    Read More
  22. 부-활

    Date2020.08.09 By거냥거냥 Views266
    Read More
  23. 살아났다! 저도 근황?

    Date2020.06.10 By1+1=2 Views265
    Read More
  24. 저도 근황

    Date2020.06.02 ByResurrection Views181
    Read More
  25. 근황

    Date2020.06.01 By롤빵 Views172
    Read More
  26. 생존신고

    Date2020.04.20 ByMSYB Views225
    Read More
  27. 여기 아직도 있네요?

    Date2020.04.07 Byera-n Views418
    Read More
  28. ?? 신입이 있네....

    Date2020.03.09 By리파 Views316
    Read More
  29. 코로나 진짜 엄청나네요...

    Date2020.02.28 By수동동 Views218
    Read More
  30. 우한폐럼이 어느새 1천명에 근접했네요

    Date2020.02.25 By하루디4 Views395
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 768 Next
/ 768
서버에 요청 중입니다. 잠시만 기다려 주십시오...