cache_focus.php 626 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: cache_focus.php 24152 2011-08-26 10:04:08Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. function build_cache_focus() {
  12. $data = array();
  13. $focus = C::t('common_setting')->fetch('focus', true);
  14. $data['title'] = $focus['title'];
  15. $data['cookie'] = intval($focus['cookie']);
  16. $data['data'] = array();
  17. if(is_array($focus['data'])) foreach($focus['data'] as $k => $v) {
  18. if($v['available']) {
  19. $data['data'][$k] = $v;
  20. }
  21. }
  22. savecache('focus', $data);
  23. }
  24. ?>